Uploads an image and makes it the avatar of one of the domain's shared contacts, replacing the current one. Every user in the domain sees it.Needs domain tier or above, as for the shared contact itself: Office Manager can change the avatars of its own domain's shared contacts, Reseller those of domains in its territory, and Super User any domain's. Scopes that can only read shared contacts, including Site Manager and Call Center Supervisor, get 403.The contact must be a shared contact of the domain, or the call returns 404.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 contact 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//contacts/5f2b7c9e1a4d8e3b6c0f9a2d7e1b4c8a/avatar' \
--header'Authorization: Bearer <token>' \
--form'file=@""'