Reserve a direct upload for a conversation
Reserves storage for a file and returns a one-time URL to PUT the bytes to. Two steps, not one:
POSThere with the file’s name, size, MIME type and base64 MD5 checksum.PUTthe bytes todirect_upload.urlwith the headers it gives you. The upload is rejected if the bytes disagree with the size or checksum you declared.
Then send signed_id as the attachment when you create the message. Prefer POST /upload if you just want Tied to store a file for you — it takes the file directly and hands back a blob_id in one call. Direct upload exists so a large file can go straight to storage without passing through the application.
Authorizations
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
The numeric ID of the account
The numeric ID of the conversation
Body
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.
The blob's numeric ID.
The storage key.
The filename you declared.
The content type you declared.
The size you declared. The upload is rejected if the bytes do not match it.
The base64 MD5 you declared. The upload is rejected if the bytes do not match it.
Metadata ActiveStorage derives once the bytes arrive.
Which storage service holds it.
ISO-8601 timestamp.
What you send as the attachment reference when creating the message.
Signed global ID for the blob, used by rich-text attachment flows.
Where and how to send the bytes.