Skip to content
TriedDocs
Account

Delete phone number data

Delete every call, recording, SMS and contact stored for one caller's phone number.

POSThttps://api.tried.com.au/privacy/delete-phone-number

Deletes all data the workspace holds for one phone number, for example to answer a data subject access or erasure request. This cannot be undone. It removes:

  • every call where the number is the from_number or to_number, with its recordings (mixed and multi-channel) and privacy record
  • every SMS message sent from or to the number, or linked to one of those calls
  • every SMS chat with the number
  • every contact with that phone number

Request#

Field Type Required Description
phone_number string Yes The number to erase, at least 3 characters. Matched exactly as you send it and in E.164 form. Numbers without a country code are read as Australian, so 0412 345 678 also matches +61412345678. For US numbers, send E.164 such as +14155550123.

Example request#

curl -X POST https://api.tried.com.au/privacy/delete-phone-number \
  -H "Authorization: Bearer $TRIED_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"phone_number": "+61412345678"}'
const res = await fetch("https://api.tried.com.au/privacy/delete-phone-number", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.TRIED_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ phone_number: "+61412345678" }),
});
const result = await res.json();
import os, requests

res = requests.post(
    "https://api.tried.com.au/privacy/delete-phone-number",
    headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
    json={"phone_number": "+61412345678"},
)
result = res.json()

Response#

200 OK

{
  "phone_number": "+61412345678",
  "calls_deleted": 7,
  "sms_deleted": 12,
  "sms_chats_deleted": 1,
  "contacts_deleted": 1
}
Field Type Description
phone_number string The number in E.164 form, or as sent if it could not be parsed.
calls_deleted integer Calls removed, with their recordings.
sms_deleted integer SMS messages removed.
sms_chats_deleted integer SMS conversations removed.
contacts_deleted integer Contacts removed.

All counts are 0 when nothing matched; that is not an error.

Errors#

Status When
400 phone_number is missing or shorter than 3 characters.
401 Missing or invalid API key.
403 The key's IP allowlist or scopes reject the request. This route needs the numbers scope. Dashboard members get The member role is read-only.
429 Rate limit exceeded. See Rate limits.

See Errors for the body format.