Upload a file attachment

Upload a temporary file attachment to a conversation. The file is stored on Ada-managed storage and a presigned URL is returned that is valid for up to 7 days. Use that URL to create a file message by calling the `/v2/conversations/{conversation_id}/messages/` endpoint with `content.type` set to `file`. The maximum file size is 50MB. This endpoint provides temporary media storage for use within a conversation. It is **not** equivalent to the native attachment experience in Ada's widget handoff integrations (for example, the paperclip in Zendesk Messaging). With native widget attachments, files are uploaded directly into your agent platform (such as Sunshine Conversations / Zendesk) and hosted there. That native path is only available to Ada's web channel and is not accessible through the Conversations API. If you are building a headless Conversations API integration and want to send an attachment from an end user to a human agent mid-conversation so that it appears natively in your agent platform, upload the file using your agent platform's own attachment endpoints (for example, the Sunshine Conversations Attachments API for Zendesk) and consult that platform's documentation. **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