Skip to content

Support

support_attachment_create

Reserve a file on a support thread and get a short-lived signed URL to upload it to.

Tool

support_attachment_create

Reserve a file on a support thread and get a short-lived signed URL to upload it to.

Reserve a file on a support thread and get a short-lived signed URL to upload it to. The bytes never pass through this API: PUT them to the returned uploadUrl with the same Content-Type, then call support_attachment_finalize. Until finalized the attachment is pending — it cannot be attached to a message and is invisible in message output. A thread belonging to another product is reported as not found

Behavior

HTTP
POST /support/attachments

Arguments

NameTypeRequiredDescription
fileNamestringDisplay name of the file, e.g. "invoice.pdf". Only the base name is used for the storage key; any directory part is discarded
threadIdstringThread the file belongs to. An attachment is created against a thread first and claimed by one of its messages later, when that message is posted
sizeBytesintegerSize of the file in bytes, at most 26214400. Declared up front so an oversized upload is refused before a URL is issued; finalize checks the real size again
contentTypestringMIME type of the file. The upload URL is signed for exactly this type, so the PUT must send the same Content-Type header or storage rejects it

Response

FieldTypeAlwaysDescription
idstringAttachment id
statusstringpending: the row exists and an upload URL was issued, but no bytes have been confirmed. uploaded: finalize saw the object in storage. Only uploaded attachments can be attached to a message or downloaded
fileNamestringDisplay name of the file
threadIdstringThread this attachment belongs to
createdAtstringISO-8601 creation timestamp
messageIdstringThe message that carries this attachment, or null while nothing claims it yet
sizeBytesintegerSize in bytes: what the caller declared while the attachment is pending, what storage reported once it is uploaded
uploadUrlstringShort-lived signed URL. PUT the file bytes here with the same Content-Type, then call support_attachment_finalize. The URL is a bearer credential for this one object
uploadedAtstringISO-8601 timestamp of the confirmed upload, or null while pending
contentTypestringMIME type declared when the attachment was created
uploadExpiresAtstringISO-8601 moment the upload URL stops working

Try it

Reserve a file on a support thread and get a short-lived signed URL to upload it to.

When to use

Reserve a file on a support thread and get a short-lived signed URL to upload it to. The bytes never pass through this API: PUT them to the returned uploadUrl with the same Content-Type, then call support_attachment_finalize. Until finalized the attachment is pending — it cannot be attached to a message and is invisible in message output. A thread belonging to another product is reported as not found

Example

Ask your agent something like this:

Reserve a file on a support thread and get a short-lived signed URL to upload it to.

The agent will invoke support_attachment_create with these arguments:

{
  "fileName": "<fileName>",
  "threadId": "<threadId>",
  "sizeBytes": "<sizeBytes>",
  "contentType": "<contentType>"
}

Esc

Start typing to search the docs.

navigateselect