Inbox

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.

post/inbox/v1/virtual-agent/conversations/{conversationId}/attachments/{filename}

Request

  • Base URL
    https://platform.hootsuite.com
  • URL
    https://platform.hootsuite.com/inbox/v1/virtual-agent/conversations/{conversationId}/attachments/{filename}
  • Auth
    OAuth 2
    Authorization code: https://platform.hootsuite.com/oauth2/auth
    Token URL: https://platform.hootsuite.com/oauth2/token

Path parameters

conversationIdstring required

ID of the conversation to manipulate. This can be retrieved from the webhook payload.

filenamestring required

Filename of the attachment. The filename can only contain uppercase and lowercase letters, numbers, -, _ and .

Headers

Content-Typestring required

mime-type of the attachment.

Content-Lengthstring required

Size of the attachment in bytes.

Request body application/octet-stream

string binary required

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

object required

Changes

No recorded changes to this operation across all 1 revision of this API.