Numbers API
The Numbers API allows you to manage phone numbers for your telephony operations.Prerequisites: Make sure you have your API Token. See Authentication for details.
Get Telephony Numbers
Retrieve a list of all telephony numbers in the system along with their details and current status.Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | API Key format: Token <token> |
| Org-Handle | string | Yes | Organization domain handle |
You can get the
Org-Handle by hitting the Get All Organizations API. The domain_handle field in the response is your Org-Handle.Example Request
Success Response (200)
Response Fields
| Field | Type | Description |
|---|---|---|
| status_code | integer | HTTP status code |
| message | string | Response message |
| data | array | Array of number objects |
Number Object Fields
| Field | Type | Description |
|---|---|---|
| id | integer | Number unique identifier |
| number | string | Phone number in E.164 format |
| active | boolean | Whether the number is active |
Error Response (400 — Bad Request)
Error Response (401 — Unauthorized)
Common Error Codes
| Status Code | Description |
|---|---|
| 200 | Success - Request completed successfully |
| 400 | Bad Request - Org-Handle header missing |
| 401 | Unauthorized - Invalid or missing API token |
| 403 | Forbidden - Access denied to the resource |
| 500 | Internal Server Error - Server-side error |
Code Examples
Best Practices
- E.164 Format: Phone numbers are returned in E.164 format (e.g.,
+1234567890) - Org-Handle Required: Always include the Org-Handle header in your requests
- Error Handling: Always handle potential errors and implement retry logic
- Security: Keep API tokens secure and rotate them regularly