AI Numbers API
The AI Numbers API is a web service that returns the caller ID to use for a call. Send the number you are calling and your prefix, and the API replies with the caller ID.
This API requires an API key. Find your key on the Organization settings page of the Smart Carrier dashboard. If you cannot find it, contact support@smartcarrier.io.
To review past requests, see the AI Numbers log.
Web service information
| Field | Value |
|---|---|
| Endpoint | https://api.smartcarrier.io/v2/ai-numbers? |
| Method | GET |
| Parameters | ToNumber, FromNumber, clusterID |
| Header | x-api-key (get your API key) |
| Example | https://api.smartcarrier.io/v2/ai-numbers?ToNumber=15125550142&FromNumber=13125550100&clusterID=PREFIX_01 |
Request parameters
| Parameter | Type | Description |
|---|---|---|
ToNumber | string | The telephone number being called. |
FromNumber | string | The caller ID your dialer would use without this API. |
clusterID | string | Your prefix. |
Sample response
{
"RequestGuid": "11111111-2222-3333-4444-555555555555",
"AccountGuid": "12345678-1234-1234-1234-123456789012",
"UseANI": "13125550199",
"Identity": null,
"ResponseCode": "200",
"AsteriskHangupCause": "",
"ApplicationVersion": "7",
"ProcessingTimeMS": 980
}What do these values mean?
| Field | Description |
|---|---|
RequestGuid | A unique identifier assigned to this request. |
AccountGuid | The account associated with this request. |
UseANI | The caller ID to use for the call. |
Identity | The call’s identity header value, if one is set. null when none is set. |
ResponseCode | Result of the request. 200 means success. |
AsteriskHangupCause | The Asterisk hangup cause, if any. Empty when none is set. |
ApplicationVersion | The version of the service that handled the request. |
ProcessingTimeMS | Time the service took to process the request, in milliseconds. |