Skip to main content

Delete a Virtual Number

Agent Skill

Automate this endpoint with an AI agent using the 2chat-calls skill:

npx skills add 2ChatCo/agent-skills -s 2chat-calls

Delete one of the virtual phone numbers connected to your 2Chat account.

Endpoint

DELETE https://api.p.2chat.io/open/voip/virtual-numbers/{virtual_number_uuid}

Authentication

Include your API key in the X-User-API-Key header. Learn more about authentication.

Parameters

FieldTypeRequiredDescription
virtual_number_uuidstring (path)YesThe UUID of the virtual number to delete. Must start with DID (e.g. DID64a54de2-8ebe-4c01-838f-a2235815dab4). Use the List Virtual Numbers endpoint to obtain it.

Invocation

curl --location --request DELETE 'https://api.p.2chat.io/open/voip/virtual-numbers/DID64a54de2-8ebe-4c01-838f-a2235815dab4' \
--header 'X-User-API-Key: your_api_key_here'

Response

Success (HTTP 200 OK)

{
"success": true
}
FieldDescription
successtrue when the number was deleted

Error

{
"error": true,
"error_message": "Description of what went wrong"
}
FieldDescription
errortrue when the request failed
error_messageA description of what went wrong