Skip to content

support_attachment_purge

Delete every attachment of a thread that no message carries — pending, uploaded and rejected alike — and their files in storage, for example to erase an end user's data.

Tool

support_attachment_purge

Delete every attachment of a thread that no message carries — pending, uploaded and rejected alike — and their files in storage, for example to erase an end user's data.

Delete every attachment of a thread that no message carries — pending, uploaded and rejected alike — and their files in storage, for example to erase an end user's data. Attachments carried by messages are left alone and counted in skippedClaimed; remove them by deleting their messages with support_message_delete or support_message_delete_any, then purge. On a thread that is still in use this can also remove a file a user is attaching right now — that is intended for erasure, and there is no "older than" option; the user's message then fails to attach it and the file must be uploaded again. If storage fails part of the way the call answers 503 with a message beginning "attachment_cleanup_failed": files already deleted stay deleted, and repeating the call finishes the rest. A repeat after success answers zeros. A thread belonging to another product is reported as not found

Behavior

HTTP
POST /support/attachments/purge

Arguments

Name
Type
Required
Description
threadId
string
•
Thread whose attachments that no message carries should all be deleted

Response

Field
Type
Always
Description
deleted
object
•
Attachments deleted by this call, by the state they were in. Zeros on a repeat
threadId
string
•
The thread that was purged
objectsMissing
integer
•
Deleted attachments whose file storage no longer held, or never received
skippedClaimed
integer
•
Attachments of the thread carried by messages and therefore left alone. They are removed by deleting their message with support_message_delete or support_message_delete_any
objectsDestroyed
integer
•
Files storage held and removed

Try it

Delete every attachment of a thread that no message carries — pending, uploaded and rejected alike — and their files in storage, for example to erase an end user's data.

When to use

Delete every attachment of a thread that no message carries — pending, uploaded and rejected alike — and their files in storage, for example to erase an end user's data. Attachments carried by messages are left alone and counted in skippedClaimed; remove them by deleting their messages with support_message_delete or support_message_delete_any, then purge. On a thread that is still in use this can also remove a file a user is attaching right now — that is intended for erasure, and there is no "older than" option; the user's message then fails to attach it and the file must be uploaded again. If storage fails part of the way the call answers 503 with a message beginning "attachment_cleanup_failed": files already deleted stay deleted, and repeating the call finishes the rest. A repeat after success answers zeros. A thread belonging to another product is reported as not found

Example

Ask your agent something like this:

Delete every attachment of a thread that no message carries — pending, uploaded and rejected alike — and their files in storage, for example to erase an end user's data.

The agent will invoke support_attachment_purge with these arguments:

{
  "threadId": "<threadId>"
}

Esc

Start typing to search the docs.

↑↓navigate↵select