The /v1/users/avatar endpoint is a POST operation designed to handle the uploading or updating of a user’s image. It accepts a file (e.g., PNG or JPEG) via a multipart/form-data request and requires authentication via a bearer token. The endpoint processes the file, stores it, and returns a success response with the URL of the uploaded avatar or an error response if something goes wrong (e.g., invalid file, unauthorized access, or server issues).
Request
Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.