Uploads an image and makes it the user's avatar, replacing the current one.Basic User, Advanced User, Simple User, and Call Center Agent can change their own avatar only. Site Manager can change its own and those of users at its own site. Office Manager and Call Center Supervisor can change those of any user in their domain, Reseller those of users in domains of its territory, and Super User any user's. Office Manager Read-Only, Super User Read Only, and any other user get 403.Send the image as multipart/form-data in a part named file. JPEG, PNG, GIF, and WebP are accepted, recognized from the file's content rather than its name or content type; a GIF keeps its first frame only. The image must be square, at most 20 MB, and at most 8,000 pixels on a side; the size is checked before the image is decoded. It is re-encoded as WebP, which drops embedded metadata, in two sizes: at most 256 by 256 pixels and 100 KB, and at most 48 by 48 pixels and 20 KB. A smaller image is not enlarged. file-modified-for-limits: yes means the image had to be scaled down or compressed further to fit. The request body is the image itself, so this page shows no request example.202 means the change was published over the service bus (SBUS), not yet applied. The image is stored, and the user record points at it, shortly after, so path can return 404 for a moment. The previous avatar is deleted the same way. If the change can't be published, the call returns 503 and nothing changes. POST and PUT on this path do the same thing.The image itself is served without authentication at path (at most 48 by 48 pixels), path-small (the same image), and path-large (at most 256 by 256 pixels), so anyone who has the filename can load it.
Request
Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Path Params
Body Params multipart/form-dataRequired
Responses
🟢202Accepted
application/json
The upload was published over SBUS and is applied shortly after; see the description.
Bodyapplication/json
🟠400Bad Request
🟠401Unauthorized
🟠403Forbidden
🟠404Not Found
🔴500Server Error
🔴503Service Unavailable
🔴507Insufficient Storage
Request Request Example
Shell
JavaScript
Java
Swift
curl--location--request PUT 'https://awqacore01.crexendocloud.com/ns-api/v2/domains//users//avatar' \
--header'Authorization: Bearer <token>' \
--form'file=@""'