Skip to main content
POST
Reserve a direct upload for a conversation

Authorizations

api_access_token
string
header
required

This token can be obtained by visiting the profile page or via rails console. Provides access to endpoints based on the user permissions levels. This token can be saved by an external system when user is created via API, to perform activities on behalf of the user.

Path Parameters

id
integer
required

The numeric ID of the account

conversation_id
integer
required

The numeric ID of the conversation

Body

application/json
blob
object
required

Describe the file before sending it. All four fields are required, and the subsequent PUT is rejected if the bytes disagree with byte_size or checksum.

Response

Success

The stored blob plus the one-time URL to PUT the bytes to. This is Rails' ActiveStorage direct-upload response, passed through unchanged.

id
integer

The blob's numeric ID.

key
string

The storage key.

filename
string

The filename you declared.

content_type
string

The content type you declared.

byte_size
integer

The size you declared. The upload is rejected if the bytes do not match it.

checksum
string

The base64 MD5 you declared. The upload is rejected if the bytes do not match it.

metadata
object

Metadata ActiveStorage derives once the bytes arrive.

service_name
string

Which storage service holds it.

created_at
string

ISO-8601 timestamp.

signed_id
string

What you send as the attachment reference when creating the message.

attachable_sgid
string

Signed global ID for the blob, used by rich-text attachment flows.

direct_upload
object

Where and how to send the bytes.