Skip to main content
Version: v4

Upload file attachments

POST 

/conversations/messages/upload

Post the necessary fields for the API to upload files. The files need to be a buffer with the key "fileAttachment".

Note: One of conversationId or contactId must be provided.

File Size Limits:

  • Maximum file size: 5 MB
  • Maximum files per upload: 5

Allowed file types:

Images: JPG, JPEG, PNG, GIF, SVG, HEIC, AI

Videos: MP4, MPEG, 3GP

Audio: MP3, WAV, WAVE, AIFF, AIF, AIFC, GSM, ULAW, OGG, AAC, M4A, AMR

Documents: PDF, DOC, DOCX, TXT, CSV, XLS, XLSX, PPT, PPTX, ODT

Archives: ZIP, RAR

Other: VCF, VCARD (contact files), ICS (calendar files)

The API will return an object with the URLs

File-service storage: Attachments are stored in the files service, and every response includes uploadedFileDetails. The returned file-service URLs are publicly accessible for one hour after upload. After that window, the attachment becomes private. To render, download, or retry access, extract the {slug} from the returned /files/d/{slug} URL and call GET /files/d/{slug} with a bearer token that includes the files.readonly OAuth scope. The Files API returns a short-lived signed download URL.

Request​

Version stringrequired

API Version

Available optionsv4
multipart/form-data

Bodyrequired

    conversationIdstring

    Conversation Id

    contactIdstring

    Contact Id

    workflowIdstring

    Workflow Id

    campaignIdstring

    Campaign Id

    locationIdstringrequired
    attachmentUrlsstring[]required
application/json

Uploaded the file successfully

Schema
    uploadedFilesobjectrequired
    uploadedFileDetailsobject[]required

    Per-file metadata for each uploaded attachment.