OpenAPI 3.0.0raw.githubusercontent.com2026-08-1315378562.5 KB

9fd13f607823

Widget

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.

post/agent/{id}/avatar/presigned-url

Path parameters

idstring required

Agent ObjectId

Request body

fileNamestring required

Original file name (used to construct the S3 key)

contentTypestring required

MIME type. Must start with image/

fileSizenumber required

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

successboolean

Example response

{
  "success": true
}