Redact Chat Comment Attachment
PUT {{baseUrl}}/api/v2/chat_file_redactions/:ticket_id
Permanently removes one or more chat attachments from a chat ticket.
Note: This does not work on active chats. For chat tickets that predate March 2020, consider using Redact Ticket Comment In Agent Workspace.
Allowed For
- Agents
Agent Workspace must enabled for the account. Deleting tickets must be enabled for agents.
Request Body Properties
| Name | Type | Required | Description | 
|---|---|---|---|
| chat_id | string | true | The chat_idin theChatStartedEventevent in the ticket audit. See Ticket Audits | 
| chat_indexes | array | true | The array of chat_indexin theChatFileAttachmentevent in the ticket audit. See Ticket Audits | 
To get the required body properties, make a request to the Ticket Audits endpoint. Example response:
Status 200 OK
{
  "audits": [
    "events": [
      {
        "id": 1932802680168,
        "type": "ChatStartedEvent",
        "value": {
          "visitor_id": "10502823-16EkM3T6VNq7KMd",
          "chat_id": "2109.10502823.Sjuj2YrBpXwei",
          "history": [
            {
              "chat_index": 0,
              "type": "ChatFileAttachment",
              "filename": "image1.jpg"
            },
            {
              "chat_index": 1,
              "type": "ChatFileAttachment",
              "filename": "image2.jpg"
            }
          ]
        }
      }
    ]
  ]
}
HEADERS
| Key | Datatype | Required | Description | 
|---|---|---|---|
| Accept | string | 
RESPONSES
status: OK
{"chat_event":{"id":1932802680168,"type":"ChatStartedEvent","value":{"chat_id":"2109.10502823.Sjuj2YrBpXwei","history":[{"chat_index":0,"filename":"redacted.txt","type":"ChatFileAttachment"},{"chat_index":1,"filename":"redacted.txt","type":"ChatFileAttachment"}],"visitor_id":"10502823-16EkM3T6VNq7KMd"}}}