Get avatar upload URL
Generates a pre-signed S3 upload URL for the agent’s widget avatar image. Upload the image directly to S3 using the returned presignedUrl, then save cdnUrl as the agent’s avatar via PATCH /agent/{id}/widget-config.
Authentication
AuthorizationBearer
API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.
Path parameters
id
Agent ObjectId
Request
This endpoint expects an object.
fileName
Original file name (used to construct the S3 key)
contentType
MIME type — must start with image/
fileSize
File size in bytes — must be > 0 and ≤ 2 MB (2,097,152 bytes)
Response
Pre-signed upload URL and CDN URL
success
data
Errors
400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
500
Internal Server Error

