Redact Chat Comment
PUT {{baseUrl}}/api/v2/chat_redactions/:ticket_id
Permanently removes words or strings from a chat ticket's comment.
Wrap <redact> tags around the content in the chat comment you want redacted. Example: 
{
  "text": "My ID number is <redact>847564</redact>!"
}
The characters contained in the tag will be replaced by the ▇ symbol.
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_index | integer | true | The chat_indexin theChatMessageevent in the ticket audit. See Ticket Audits | 
| text | string | true | The messagein theChatMessageevent in the ticket audit. See Ticket Audits.  Wrapmessagewith<redact>tags | 
To get the required body properties, make a request to the Ticket Audit 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": "ChatMessage",
              "message": "My ID number is 847564!"
            }
          ]
        }
      }
    ]
  ]
}
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,"message":"My ID number is ▇▇▇▇!","type":"ChatMessage"}],"visitor_id":"10502823-16EkM3T6VNq7KMd"}}}