Search for available phone numbers to purchase. Requires `countryCode` (e.g. US, CA). Use before ordering a number.
const url = 'https://api.pingram.io/numbers/available?countryCode=example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
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.pingram.io/numbers/available?countryCode=example' \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”ISO 3166-1 alpha-2 country code (e.g., US, CA)
Comma-separated
National destination / area code filter
Max results (default 10, max 50)
Responses
Section titled “ Responses ”Successful response
object
One available number returned from search
object
E.164
E.g. local, toll_free
E.g. sms, voice, mms
Monthly cost in USD
Example generated
{ "numbers": [ { "phoneNumber": "example", "locality": "example", "administrativeArea": "example", "phoneNumberType": "example", "features": [ "example" ], "monthlyPrice": 1 } ]}Bad Request - validation errors, invalid input
Standard error response for API errors.
object
Unique tracking ID for the request.
Structured error details for API error responses.
object
Machine-readable error code.
Human-readable error message.
Actionable hint for fixing the error.
Example generated
{ "trackingId": "example", "error": { "code": "example", "message": "example", "fix": "example" }}Unauthorized
Payment Required - usage limits exceeded
Standard error response for API errors.
object
Unique tracking ID for the request.
Structured error details for API error responses.
object
Machine-readable error code.
Human-readable error message.
Actionable hint for fixing the error.
Example generated
{ "trackingId": "example", "error": { "code": "example", "message": "example", "fix": "example" }}Internal Server Error
Bad Gateway - provider error
Standard error response for API errors.
object
Unique tracking ID for the request.
Structured error details for API error responses.
object
Machine-readable error code.
Human-readable error message.
Actionable hint for fixing the error.
Example generated
{ "trackingId": "example", "error": { "code": "example", "message": "example", "fix": "example" }}