Skip to main content

Get Available Numbers

Get specific available phone numbers within a number group. Use this after finding a group via the Search Number Groups endpoint.

Endpoint

GET https://api.p.2chat.io/open/numbers/available

Authentication

Include your API key in the X-User-API-Key header. Learn more about authentication.

Parameters

These are query-string parameters.

FieldTypeRequiredDescription
group_idstringYesThe group ID from the Search Number Groups endpoint
number_containsstringNoFilter numbers containing this digit sequence

Invocation

curl --location --request GET 'https://api.p.2chat.io/open/numbers/available?group_id=abc-123' \
--header 'X-User-API-Key: your_api_key_here'

Response

Success

{
"success": true,
"data": {
"numbers": [
{
"id": "did-xyz",
"number": "+12135551234"
}
]
}
}
FieldDescription
numbers[].idThe DID identifier for this number
numbers[].numberThe phone number in E.164 format

Error

{
"success": false,
"error": true,
"error_message": "Description of what went wrong"
}