Phone numbers
List phone numbers
The organization's phone number inventory.
GET https://api.diska.ai/v1/phone-numbers
Scope: phone-numbers:read
Numbers imported over SIP also carry the trunk fields; the SIP password is never returned, only sip_password_configured.
Parameters
Query string
| Name | Type | Required | Description |
|---|---|---|---|
search | string | null | No | Text in the number, the name or the SIP domain. Up to 200 characters. |
number_type | string | null | No | purchased (DISKA numbers) or imported (your own numbers over SIP). |
Examples
curl "https://api.diska.ai/v1/phone-numbers" \
-H "Authorization: Bearer $DISKA_API_KEY"
import os
import requests
response = requests.get(
"https://api.diska.ai/v1/phone-numbers",
headers={"Authorization": f"Bearer {os.environ['DISKA_API_KEY']}"},
timeout=30,
)
response.raise_for_status()
print(response.json())
// Node.js 18 or later, in a .mjs file
const response = await fetch('https://api.diska.ai/v1/phone-numbers', {
headers: { Authorization: `Bearer ${process.env.DISKA_API_KEY}` }
})
if (!response.ok) throw new Error(`${response.status} ${await response.text()}`)
console.log(await response.json())
<?php
$ch = curl_init('https://api.diska.ai/v1/phone-numbers');
curl_setopt_array($ch, [
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('DISKA_API_KEY')],
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 30,
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);
if ($status >= 400) {
throw new RuntimeException("HTTP $status: $body");
}
print_r(json_decode($body, true));
Try it
Send the request from this page, with your key. The key stays on this page: it is not stored and is only sent to api.diska.ai. Use a test key with the fewest scopes you need.
GET
https://api.diska.ai/v1/phone-numbersStarts with dsk_. It stays in this browser tab only.
query
query
Enter an API key (dsk_…).
Response 200
| Field | Type | Description |
|---|---|---|
items | array | The numbers. |
items[].id | string | ID. |
items[].organization_id | string | Organization it belongs to. |
items[].e164 | string | The number in E.164 format. |
items[].friendly_name | string | null | Name given to the number. |
items[].number_type | string | purchased (DISKA number) or imported (your own number over SIP). Default: purchased. |
items[].status | string | active or inactive. Default: active. |
items[].country_code | string | Number's country (ISO 3166). Default: AO. |
items[].capabilities | object | What the number supports. |
items[].capabilities.calls | boolean | Makes and receives calls. Default: true. |
items[].capabilities.sms | boolean | Sends SMS. Default: true. |
items[].monthly_price_kz | number | null | Monthly price in kwanzas, when applicable. |
items[].provider | string | null | Number's carrier. |
items[].provider_sid | string | null | The number's ID at the carrier. |
items[].agent_id | string | null | The number's main agent. |
items[].agents | array | Agents that use the number. |
items[].agents[].id | string | Agent. |
items[].agents[].name | string | Agent name. |
items[].agents[].status | string | null | Agent state. |
items[].sip_domain | string | null | SIP trunk: server domain. |
items[].sip_username | string | null | SIP trunk: username. |
items[].sip_password_configured | boolean | true when the SIP password is set (it is never returned). Default: false. |
items[].sip_outbound_proxy | string | null | SIP trunk: outbound proxy. |
items[].sip_auth_username | string | null | SIP trunk: authentication username, if different. |
items[].sip_outbound_register | boolean | true when Diska registers with the SIP server. Default: false. |
items[].origination_uri | string | null | SIP address the carrier sends incoming calls to. |
items[].sip_status | string | null | SIP trunk state. One of: pending_credentials, pending_provisioning, ready, error. |
items[].sip_status_detail | string | null | Trunk state detail. |
items[].sip_transport | string | SIP transport. One of: udp, tcp. Default: udp. |
items[].sip_allowed_ips | array | IP addresses allowed to send calls. |
items[].created_at | string | null | Creation date (ISO 8601). |
items[].updated_at | string | null | Last change date (ISO 8601). |
total | integer | How many numbers. |
{
"items": [
{
"id": "5c2e8a14-7d3b-4f9e-a1c6-0b8d2f4e6a93",
"organization_id": "5c2e8a14-7d3b-4f9e-a1c6-0b8d2f4e6a93",
"e164": "+244900000000",
"friendly_name": "Linha principal",
"number_type": "purchased",
"status": "active",
"country_code": "AO",
"capabilities": {
"calls": true,
"sms": true
},
"monthly_price_kz": 0,
"provider": "africell",
"provider_sid": null,
"agent_id": "3f1c2a7e-5b9d-4c1e-8f3a-2d6b7e9c1a40",
"agents": [
{
"id": "5c2e8a14-7d3b-4f9e-a1c6-0b8d2f4e6a93",
"name": "Recepção",
"status": "active"
}
],
"sip_domain": null,
"sip_username": null,
"sip_password_configured": false,
"sip_outbound_proxy": null,
"sip_auth_username": null,
"sip_outbound_register": false,
"origination_uri": null,
"sip_status": null,
"sip_status_detail": null,
"sip_transport": "udp",
"sip_allowed_ips": [],
"created_at": "2026-10-25T18:40:00Z",
"updated_at": "2026-10-25T18:40:00Z"
}
],
"total": 1
}
Errors
This endpoint has no errors of its own.
Errors common to every endpoint (401, 403, 422, 429 and 5xx) are in Errors.

