Skip to content
TriedDocs
Calls

Remove call sensitive data

Scrub every PII category from an ended call now.

POSThttps://api.tried.com.au/v2/remove-call-sensitive-data/{call_id}

Scrubs all PII categories from an ended call's transcripts, variables and analysis, beeps them out of the recordings, and sets the call's data storage setting to everything_except_pii. By default an encrypted unscrubbed copy is kept so an admin can reveal it with Get unscrubbed call until it expires. The action is written to the audit log.

Requires the admin or developer role. API keys act as admin.

Request#

Path parameters#

Parameter Type Required Description
call_id string Yes An ended call.

Body#

Field Type Required Description
keep_unscrubbed_copy boolean No Keep an encrypted copy for admins. Default true. The copy expires after TRIED_PII_REVEAL_RETENTION_DAYS (30 days by default). With false, the scrub step still stores a copy when the call has none yet, so false currently only changes unscrubbed_copy_until in the response.

Example request#

curl -X POST "https://api.tried.com.au/v2/remove-call-sensitive-data/call_8d1e0f2a3b4c5d6e7f8a9b0c" \
  -H "Authorization: Bearer $TRIED_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "keep_unscrubbed_copy": true
}'
const res = await fetch("https://api.tried.com.au/v2/remove-call-sensitive-data/call_8d1e0f2a3b4c5d6e7f8a9b0c", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.TRIED_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "keep_unscrubbed_copy": true
  }),
});
const data = await res.json();
import os, requests

res = requests.post(
    "https://api.tried.com.au/v2/remove-call-sensitive-data/call_8d1e0f2a3b4c5d6e7f8a9b0c",
    headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
    json={
        "keep_unscrubbed_copy": True,
    },
)
data = res.json()

Response#

200 OK

{
  "call_id": "call_8d1e0f2a3b4c5d6e7f8a9b0c",
  "redactions": { "person_name": 3, "phone_number": 1 },
  "unscrubbed_copy_until": 1794902465000
}
Field Type Description
redactions object Count of redactions per PII category, plus recording_beep when the call has a recording.
unscrubbed_copy_until integer or null When the unscrubbed copy expires, epoch ms. null when keep_unscrubbed_copy is false.

Errors#

Status When
400 The call has not ended.
401 Missing or invalid API key.
403 The key's IP allowlist or scopes reject the request. This route needs the admin scope. The member role cannot run this action.
404 No call with this ID in the workspace.
429 Rate limit exceeded. See Rate limits.

See Errors for the body format.