Skip to main content

Upload attachments

PUT 

/inbox/v1/virtual-agent/conversations/:conversationId/attachments/:filename

This allows you to upload an attachment that you can send in a conversation. You need to upload the attachment first, and then you can send a message with text and an attachment. For example, if you upload an attachment to /inbox/v1/virtual-agent/conversations/attachments/cat.jpg, you can send that attachment by sending

{
"sendMessage": {
"text": "This is a cat!",
"attachment": "cat.jpg"
}
}

to /inbox/v1/virtual-agent/conversations/{conversationId}. The file name should be unique within a conversation and is visible to the contact if they download your attachment.

The Content-Type header should contain the correct mime-type of the attachment (such as image/jpeg). The Content-Length header should contain the size of the attachment in bytes. Attachments should be fewer than 10 megabytes to prevent error.

Request​

Responses​

The attachment is uploaded and ready to use in your conversation. Note: after uploading the attachment to Inbox 2.0, you still need to specifically send it to the contact