Skip to content

support_attachment_delete

Delete one attachment that no message carries — pending, uploaded or rejected — and its file in storage.

Tool

support_attachment_delete

Delete one attachment that no message carries — pending, uploaded or rejected — and its file in storage.

Delete one attachment that no message carries — pending, uploaded or rejected — and its file in storage. The file is removed at once: a download URL issued before the delete stops working. Use it when a user removes a file from a message they have not sent, or to erase personal data. An attachment a message carries is refused with 409 and a message beginning "attachment_claimed": delete the message instead with support_message_delete (your own) or support_message_delete_any (admin), which removes its files with it. If storage fails the call answers 503 with a message beginning "attachment_cleanup_failed", nothing is lost, and repeating it is safe. Deleting the same attachment again answers not found. An attachment belonging to another product is reported as not found

Behavior

HTTP
DELETE /support/attachments/:id

Arguments

Name
Type
Required
Description
id
string
•
The attachment to delete, as returned by the create call. It must not be carried by a message

Response

Field
Type
Always
Description
id
string
•
The attachment that was deleted
status
string
•
The state the attachment was in when it was deleted: pending, uploaded or rejected
threadId
string
•
Thread the attachment belonged to
objectDestroyed
boolean
•
true when storage held the file and removed it; false when there was nothing to remove — a pending attachment whose bytes never arrived, or a rejected one whose file was already deleted at finalize

Try it

Delete one attachment that no message carries — pending, uploaded or rejected — and its file in storage.

When to use

Delete one attachment that no message carries — pending, uploaded or rejected — and its file in storage. The file is removed at once: a download URL issued before the delete stops working. Use it when a user removes a file from a message they have not sent, or to erase personal data. An attachment a message carries is refused with 409 and a message beginning "attachment_claimed": delete the message instead with support_message_delete (your own) or support_message_delete_any (admin), which removes its files with it. If storage fails the call answers 503 with a message beginning "attachment_cleanup_failed", nothing is lost, and repeating it is safe. Deleting the same attachment again answers not found. An attachment belonging to another product is reported as not found

Example

Ask your agent something like this:

Delete one attachment that no message carries — pending, uploaded or rejected — and its file in storage.

The agent will invoke support_attachment_delete with these arguments:

{
  "id": "<id>"
}

Esc

Start typing to search the docs.

↑↓navigate↵select