Skip to content
TriedDocs
Phone numbers

Delete phone number

Remove a number, tear down its SIP resources and release it to the provider.

DELETEhttps://api.tried.com.au/delete-phone-number/{n}

Deletes a number from your workspace. Tried removes the LiveKit dispatch rule and trunks (or detaches the number from its shared SIP trunk), then releases the number:

  • telnyx numbers are released on Telnyx.
  • twilio numbers bought through Tried are released on Twilio. Imported Twilio numbers stay on your Twilio account.
  • custom numbers are only removed from Tried.

Needs keys Teardown and release talk to LiveKit SIP, Telnyx or Twilio. Without keys, mock mode records the LiveKit requests in List telephony operations.

Request#

Path parameter Type Required Description
n string Yes The number in E.164, with + encoded as %2B.

This endpoint takes no query or body parameters.

Example request#

curl -X DELETE https://api.tried.com.au/delete-phone-number/%2B61255501234 \
  -H "Authorization: Bearer $TRIED_API_KEY"
const n = encodeURIComponent("+61255501234");
await fetch(`https://api.tried.com.au/delete-phone-number/${n}`, {
  method: "DELETE",
  headers: { Authorization: `Bearer ${process.env.TRIED_API_KEY}` },
});
import os, requests
from urllib.parse import quote

requests.delete(
    f"https://api.tried.com.au/delete-phone-number/{quote('+61255501234')}",
    headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
)

Response#

204 No Content

The response has no body.

Errors#

Status When
401 Missing or invalid API key.
403 The key's IP allowlist or scopes reject the request. This route needs the numbers scope. Members get The member role is read-only.
404 Phone number ... not found in this workspace.
429 Rate limit exceeded. See Rate limits.

See Errors for the body format.

Retell compatibility#

Same path and method as Retell.