Skip to Content
Documentation

Redacting sensitive data

Speak OTP codes, PINs or confidential details on the phone without storing them in CallHuman's logs using [[…]] markers.

When a call reads out a one-time verification code, a temporary door PIN, a pickup code or another confidential value, you usually want the person to hear it without keeping that value in your call history.

Wrap any sensitive part of message (or an option's reply) in double square brackets: [[...]].

curl https://api.callhuman.es/v1/calls \
  -H "Authorization: Bearer $CALLHUMAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "+14155552671",
    "message": "Your verification code is [[4 8 2 9]]. Again, [[4 8 2 9]]."
  }'

What they hear vs. what is stored

The person hears the real message naturally — the [[ and ]] delimiters are never spoken. Your dashboard and call logs never store the sensitive value; it is replaced with a fixed [[REDACTED]] token and displayed as blurred text.

What the person hears on the phone
  1. CallHuman: Your verification code is 4 8 2 9. Again, 4 8 2 9.

What is stored in your call log
  1. CallHuman: Your verification code is . Again, .

Works in option replies too

You can also use [[...]] inside any option's reply (including inside submenus) — useful when you only reveal a PIN, pickup code or access code after the person confirms:

{
  "to": "+34600111222",
  "message": "Hi! Your pharmacy order is ready at the 24-hour locker.",
  "options": [
    {
      "id": "get_pin",
      "label": "Hear pickup PIN",
      "reply": "Your locker PIN is [[7 3 9 1]]. Again, [[7 3 9 1]]."
    },
    {
      "id": "later",
      "label": "Call me later",
      "reply": "No problem, you can collect it anytime today."
    }
  ]
}

If the person chooses Hear pickup PIN, they hear "Your locker PIN is 7 3 9 1. Again, 7 3 9 1.", while your dashboard stores "Your locker PIN is [[REDACTED]]. Again, [[REDACTED]].".

How it works under the hood

StageWhat happens to [[...]] content
Speech (TTS)Delimiters are stripped; the person hears the real text normally.
Anti-spam checkEvaluated on the full real text (including text inside [[...]]) before dialing, so markers cannot be used to hide spam or promotional content. Only the redacted version is written to moderation logs.
Plan character limitCounted on the spoken text only — the [[ and ]] characters do not consume your plan's character allowance.
Call logs & dashboardStored only in redacted form ([[REDACTED]]) from the moment the call is created. Neither your team nor CallHuman's review queue sees the secret.
While the call is activeBecause the call may ring or retry before being answered, the clean spoken text is held temporarily in an isolated internal field (inaccessible to dashboard or API clients) and permanently wiped to null the instant the call finishes (answered, not_answered, failed or canceled).

Anti-spam still checks the full message

Wrapping promotional or suspicious wording in [[...]] will not bypass allowed-call checks. The classifier inspects the exact words the recipient will hear, then immediately discards the unredacted text from its log.

Rules and edge cases

  • Multiple values: Use as many [[...]] blocks as you need in the same message ("Code [[4 8 2 9]] for account [[3041]]").
  • Inner spacing: Extra spaces right inside the brackets are trimmed automatically ([[ 4 8 2 9 ]] is spoken as "4 8 2 9").
  • Where it applies: Supported in message and every option's reply. Not applied to options[].label, because labels are short menu choices returned as option_label in API responses and webhooks.
  • Unclosed brackets: A lone [[ without a matching ]] is left untouched and spoken literally.
  • Empty markers: [[]] or [[ ]] produces nothing. If a message or reply contains only empty markers, the request is rejected with 422 invalid_request.
  • Keep secrets out of metadata: metadata is returned unchanged in GET /v1/calls/{id} and webhooks — pass an internal reference ID instead of sensitive values.

On this page