Upload attachment
Uploads a file (image or PDF) to attach it to a message. The response returns a{ url, name, type } object that you pass as-is in the attachment field of Send message. The file isn’t sent in the chat body: first you upload it with this endpoint and then you reference it by its URL.
Uploading a file doesn’t consume credits. The cost is charged when you send the message.
chat:write
Path parameters
Request body
The body must bemultipart/form-data with a single field:
Allowed types and sizes
Response
Code:201 Created
Response fields
Full example: upload and send
1. Upload the filedata object from the previous response as attachment. The message field is still required.
Only attachments uploaded with this endpoint are processed. If
attachment.url points to another site, the agent can’t see the file.
