Upload attachments
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
- Base URLhttps://platform.hootsuite.com
- URLhttps://platform.hootsuite.com/inbox/v1/virtual-agent/conversations/{conversationId}/attachments/{filename}
- AuthOAuth 2Authorization code: https://platform.hootsuite.com/oauth2/authToken URL: https://platform.hootsuite.com/oauth2/token
Path parameters
ID of the conversation to manipulate. This can be retrieved from the webhook payload.
Filename of the attachment. The filename can only contain uppercase and lowercase letters, numbers, -, _ and .
Headers
mime-type of the attachment.
Size of the attachment in bytes.
Request body application/octet-stream
Response
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
Changes
No recorded changes to this operation across all 1 revision of this API.