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

NameTypeRequiredDescription
chat_idstringtrueThe chat_id in the ChatStartedEvent event in the ticket audit. See Ticket Audits
chat_indexintegertrueThe chat_index in the ChatMessage event in the ticket audit. See Ticket Audits
textstringtrueThe message in the ChatMessage event in the ticket audit. See Ticket Audits. Wrap message with <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

KeyDatatypeRequiredDescription
Acceptstring

RESPONSES

status: OK

{&quot;chat_event&quot;:{&quot;id&quot;:1932802680168,&quot;type&quot;:&quot;ChatStartedEvent&quot;,&quot;value&quot;:{&quot;chat_id&quot;:&quot;2109.10502823.Sjuj2YrBpXwei&quot;,&quot;history&quot;:[{&quot;chat_index&quot;:0,&quot;message&quot;:&quot;My ID number is ▇▇▇▇!&quot;,&quot;type&quot;:&quot;ChatMessage&quot;}],&quot;visitor_id&quot;:&quot;10502823-16EkM3T6VNq7KMd&quot;}}}