For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
HomeGet API key
DocumentationIntegrationsAPI Reference
DocumentationIntegrationsAPI Reference
  • API Reference
      • GETList Numbers
      • POSTCreate Number
      • GETGet Messages
      • DELDelete Number
LogoLogo
HomeGet API key
API Referencenumbers

Delete Number

DELETE
https://api.agentphone.ai/v1/numbers/:number_id
DELETE
/v1/numbers/:number_id
1const url = 'https://api.agentphone.ai/v1/numbers/number_id';
2const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
3
4try {
5 const response = await fetch(url, options);
6 const data = await response.json();
7 console.log(data);
8} catch (error) {
9 console.error(error);
10}
Release (delete) a phone number. This will: 1. Release the number from its upstream provider when supported 2. Mark the number as "released" in the database 3. Keep all messages and conversation history (for audit purposes) WARNING: This action is irreversible! The number cannot be recovered.
Was this page helpful?
Previous

Get Webhook

Next
Built with

Release (delete) a phone number.

This will:

  1. Release the number from its upstream provider when supported
  2. Mark the number as “released” in the database
  3. Keep all messages and conversation history (for audit purposes)

WARNING: This action is irreversible! The number cannot be recovered.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

number_idstringRequired

Response

Successful Response

Errors

422
Unprocessable Entity Error