List caller IDs
Agent Skill
Automate this endpoint with an AI agent using the 2chat-calls skill:
npx skills add 2ChatCo/agent-skills -s 2chat-calls
Caller IDs are the numbers displayed to the recipient of a call when you call them using 2Chat. This endpoint will help you list the caller ID numbers you have in your 2Chat account.
API costโ
1API credit
Each call to this endpoint deducts 1 API credit from your plan's API credit pool.
Types of caller IDsโ
| Code | Type | Description |
|---|---|---|
VN | Virtual Number | A caller-ID derived from a virtual number you purchased on 2Chat. |
WW | If you connected a WhatsApp number to 2Chat, you can choose that number as caller-ID. | |
WA | WhatsApp Business API | Same as WhatsApp, but for numbers coming from the WhatsApp Business API. |
CI | Imported caller ID | This can be any number you want to display that is not a virtual number or a WhatsApp number. For example, you personal phone number. |
Query parametersโ
| Parameter | Description | Example |
|---|---|---|
page_number | Page number to return | 2 |
results_per_page | Number of results to return per page. Default is 50 | 20 |
- cURL
- Python
- JavaScript
curl -L -G 'https://api.p.2chat.io/open/voip/caller-ids?page_number=0' \
--header 'X-User-API-Key: your_api_key_here'
import requests
url = "https://api.p.2chat.io/open/voip/caller-ids?page_number=0"
payload = ""
headers = {
'X-User-API-Key': 'your_api_key_here'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var axios = require('axios');
var data = '';
var config = {
method: 'get',
url: 'https://api.p.2chat.io/open/voip/caller-ids?page_number=0',
headers: {
'X-User-API-Key': 'your_api_key_here'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
Responseโ
The API will return an array of numbers based on the numbers you have connected to 2Chat. In the example below, only 1 number is returned.
{
"success": true,
"count": 1,
"page": 0,
"caller_ids": [
{
"uuid": "VCI1bf5e39d-5a9e-46fe-84dd-d1c4386f51b4",
"account_uuid": "ACC91be87af-5a29-4034-b599-342f2aeb5d52",
"channel_uuid": "DID956dd470-92e4-451f-ab73-fc4f94f53276",
"phone_number": "+611300783904",
"friendly_name": "+611300783904",
"iso_country_code": "AU",
"type": "VN",
"verified": true,
"created_at": "2025-08-22T02:24:40Z",
"updated_at": "2025-09-23T23:41:11Z",
"expires_at": "2026-08-21T13:33:36Z"
}
]
}
| Field | Description | Example values |
|---|---|---|
uuid | The unique identifier of the caller-ID number | VCI1bf5e39d-5a9e-46fe-84dd-d1c4386f51b4 |
phone_number | the phone number in international format that will be displayed to the recipient of your calls | +18132522492 |
channel_uuid | Associated channel this virtual number derives from | DID956dd470-92e4-451f-ab73-fc4f94f53276 |
friendly_name | the friendly name you chose for your number | my number |
iso_country_code | the two-letter country code of the number | US |
type | Type of caller-id based on the channel it's derived from | VN. See types table above. |
verified | true when the caller-id has been verified and can be used for making calls | true |