For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Login
HomeDocsAPI ReferenceMCP ServerChat SDKsRelease Notes
HomeDocsAPI ReferenceMCP ServerChat SDKsRelease Notes
  • Introduction
    • Overview
    • Authentication
    • Versioning
    • Limits
    • Pagination
    • Errors
    • Migrate to V2
    • Changelog
  • Knowledge
    • Overview
    • Sources
    • Articles
    • Tags
  • End Users
    • Overview
    • Getting started
    • Developer guide
  • Integrations
    • Overview
    • Getting started
  • Conversations
    • Overview
    • Getting started
      • POSTStart a conversation over Ada's email channel
      • POSTCreate a new conversation
      • GETGet a conversation
      • PATCHUpdate a conversation
      • GETGet conversation messages
      • POSTCreate a new message
      • POSTEnd a conversation
      • POSTEnd Handoff
      • POSTUpload a file attachment
  • Webhooks
    • Overview
  • Data Compliance
    • Overview
  • Data Export
    • Overview
    • Getting started
    • Conversations
    • Messages
Login
LogoLogo
ConversationsConversations

Upload a file attachment

POST
https://example.ada.support/api/v2/conversations/:conversation_id/attachments/
POST
/api/v2/conversations/:conversation_id/attachments/
1import requests
2
3url = "https://example.ada.support/api/v2/conversations/conversation_id/attachments/"
4
5files = { "file": "open('string', 'rb')" }
6headers = {"Authorization": "Bearer <token>"}
7
8response = requests.post(url, files=files, headers=headers)
9
10print(response.json())
1{
2 "url": "https://s3.amazonaws.com/bucket/conversations/5df263b7db5a7e6ea03fae9b/5df263b7db5a7e6ea03fae9b/a1b2c3d4-e5f6-7890-abcd-ef1234567890/document.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256",
3 "mime_type": "application/pdf",
4 "filename": "document.pdf"
5}
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
Was this page helpful?
Previous

Webhook: Conversation created

Next
Built with

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