List your numbers
const url = 'https://api.clearance.rest/numbers/list?sync=false';const options = {method: 'GET', headers: {'X-API-Key': '<X-API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.clearance.rest/numbers/list?sync=false' \ --header 'X-API-Key: <X-API-Key>'Lists every number attached to your project from all three providers, not only the usable ones. A number that left your project stays in the list and its status says why (see the NumberStatus values below). A usable number is one whose status is ACTIVE, so filter on that.
Each number carries a provider field. Mobile numbers add a mobile object and Hero SMS numbers a herosms object. status, statusReason, assignedAt and endedAt are always top-level.
A plain GET never writes anything. With sync=true the service first reconciles your Twilio account and Hero SMS activations, then lists, and adds a sync summary to the response. If the sync fails, the list is still returned and sync.error holds the reason.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”When true, reconcile with the providers before listing. This touches provider accounts, so leave it off unless you need it.
Responses
Section titled “Responses”Your numbers.
object
object
The number’s id. Use it with POST /release.
The provider’s own id: Twilio’s PN… SID, or Hero SMS’s activation id. Not present on mobile numbers.
E.164 format.
Your project’s id.
Where a number stands for your project.
| Value | Meaning |
|---|---|
ACTIVE |
Usable. |
OFFLINE |
Mobile only: no signal from the phone for 30+ minutes (or ever). Does not block delivery. |
SIM_REMOVED |
Mobile only: the SIM is not in the phone. |
MOVED |
The number was attached to another project. |
RELEASED |
A Twilio number was deleted, or a Hero SMS activation finished or was cancelled. |
EXPIRED |
Hero SMS only: the rental time ran out and the number is about to become RELEASED. |
UNASSIGNED |
Detached from your project, or never attached. |
Human-readable reason for a non-ACTIVE status.
When the number was attached to your project, in milliseconds since the Unix epoch.
When it stopped being attached, in milliseconds since the Unix epoch.
Hero SMS only, on the rent response. When the rental ends.
Hero SMS only, on the rent response.
Hero SMS only, on the rent response.
Hero SMS only, on the rent response.
Hero SMS only, on the rent response.
Present on mobile numbers.
object
Where a number stands for your project.
| Value | Meaning |
|---|---|
ACTIVE |
Usable. |
OFFLINE |
Mobile only: no signal from the phone for 30+ minutes (or ever). Does not block delivery. |
SIM_REMOVED |
Mobile only: the SIM is not in the phone. |
MOVED |
The number was attached to another project. |
RELEASED |
A Twilio number was deleted, or a Hero SMS activation finished or was cancelled. |
EXPIRED |
Hero SMS only: the rental time ran out and the number is about to become RELEASED. |
UNASSIGNED |
Detached from your project, or never attached. |
Whether the SIM is in the phone.
Last signal from the phone, in milliseconds since the Unix epoch.
Present on Hero SMS numbers in GET /list.
object
Only present when sync=true.
object
Present when the sync itself failed.
Examples
A Twilio number
{ "success": true, "numbers": [ { "sid": "c1aaeac1-ec52-44e2-b00a-d1350fb6bee6", "providerSid": "PNxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "provider": "twilio", "phoneNumber": "+14155550100", "friendlyName": "my-project", "smsUrl": "https://api.clearance.rest/numbers/callbacks/twilio/sms", "voiceUrl": null, "capabilities": { "voice": true, "sms": true, "mms": true, "fax": false }, "status": "ACTIVE", "statusReason": null, "assignedAt": 1785107162000, "endedAt": null } ]}A mobile number that later moved to another project
{ "success": true, "numbers": [ { "sid": "9e2f0c1a-6a3d-4b6f-8c1e-2d7b9a1f0e55", "provider": "mobile", "phoneNumber": "+905321119999", "friendlyName": "my-project", "smsUrl": null, "voiceUrl": null, "capabilities": { "voice": false, "sms": true, "mms": false, "fax": false }, "status": "MOVED", "statusReason": "başka bir projeye atandı", "assignedAt": 1785000000000, "endedAt": 1785100000000, "mobile": { "numberId": "9e2f0c1a-6a3d-4b6f-8c1e-2d7b9a1f0e55", "carrierName": "Turkcell", "status": "MOVED", "statusReason": "başka bir projeye atandı", "present": true, "verifiedAt": 1785000000000, "assignedAt": 1785000000000, "lastSeenAt": 1785100000000, "online": false } } ]}The X-API-Key header is missing or invalid.
Error envelope returned with a non-2xx status.
object
Human-readable error message.
Example
{ "success": false, "error": "geçersiz API anahtarı"}