support_attachment_finalize
Confirm that an upload landed.
Confirm that an upload landed. Storage is asked whether the object exists and how large it is; if it is not there the call is refused and the attachment stays pending. On success the attachment becomes uploaded — it can now be named in support_message_create and carries a download URL. Calling it again on an uploaded attachment is safe and simply returns a fresh download URL
Behavior
- HTTP
POST /support/attachments/finalize
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
| attachmentId | string | • | The attachment whose upload should be confirmed, as returned by the create call |
Response
| Field | Type | Always | Description |
|---|---|---|---|
| id | string | • | Attachment id |
| status | string | • | pending: 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 |
| fileName | string | • | Display name of the file |
| threadId | string | • | Thread this attachment belongs to |
| createdAt | string | • | ISO-8601 creation timestamp |
| messageId | string | • | The message that carries this attachment, or null while nothing claims it yet |
| sizeBytes | integer | • | Size in bytes: what the caller declared while the attachment is pending, what storage reported once it is uploaded |
| uploadedAt | string | • | ISO-8601 timestamp of the confirmed upload, or null while pending |
| contentType | string | • | MIME type declared when the attachment was created |
| downloadUrl | string | • | Short-lived signed URL to read the uploaded file |
Try it
Confirm that an upload landed.