Get avatar upload URL

Deprecated
View as Markdown

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

idstringRequired
Agent ObjectId

Request

This endpoint expects an object.
fileNamestringRequired

Original file name (used to construct the S3 key)

contentTypestringRequired

MIME type. Must start with image/

fileSizedoubleRequired

File size in bytes. Must be greater than 0 and at most 2 MB (2,097,152 bytes)

Response

Pre-signed upload URL and CDN URL

successbooleanOptional
dataobjectOptional

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
500
Internal Server Error