Upload a file attachment

Upload a file attachment to a conversation. The file will be stored and a presigned URL will be generated that is valid for 7 days. The maximum file size is 50MB. The presigned URL can be used to create a file message by calling the `/v2/conversations/{conversation_id}/messages/` endpoint with `content.type` set to `file`. **Note:** Attachments can only be uploaded when the conversation is in a handoff state. **Allowed file types:** TXT, LOG, CSV, EML, PNG, SVG, JPEG, JPG, GIF, HEIF, HEIC, AVIF, WAV, M4A, MP3, MP4, M4V, MOV, MPEG, MPG, ZIP, PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, Keynote, Pages, Numbers

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

conversation_idstringRequiredformat: "id"
The ID of the conversation

Request

This endpoint expects a multipart form containing a file.
filefileRequired

The file to upload (max 50MB)

Response

Attachment uploaded
urlstringRead-onlyformat: "uri"

Presigned URL to access the uploaded file (valid for 7 days)

mime_typestringRead-only
MIME type of the uploaded file
filenamestringRead-only
Name of the uploaded file

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
429
Too Many Requests Error
500
Internal Server Error