Skip to main content

Search Number Groups

Search for available number groups — catalogs of phone numbers you can purchase. This is the main search endpoint for finding numbers.

Endpoint

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

Authentication

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

Parameters

These are query-string parameters.

FieldTypeRequiredDescription
countrystringYesISO country code (e.g. US, BR, DE)
region_idstringNoFilter by region (from the Get Regions endpoint)
city_idstringNoFilter by city (from the Get Cities endpoint)
city_name_or_prefixstringNoSearch by city name or number prefix
did_typestringNoFilter by DID type: local, mobile, tollfree, national, global, sharedcost, or all

Invocation

curl --location --request GET 'https://api.p.2chat.io/open/numbers/groups?country=US&did_type=local' \
--header 'X-User-API-Key: your_api_key_here'

Response

Success

{
"success": true,
"data": {
"groups": [
{
"id": "abc-123",
"prefix": "+1 (213)",
"location": "Los Angeles",
"price": {
"setup_price": "0.00",
"monthly_price": "3.50"
},
"type": "local",
"requirements": [],
"allow_number_selection": true,
"is_eligible_for_free_number": false,
"features": ["voice", "sms_in", "sms_out", "whatsapp_business"]
}
]
}
}
FieldDescription
groups[].idGroup ID to use with the Available Numbers and Reserve Number endpoints
groups[].prefixPhone number prefix for numbers in this group
groups[].locationCity or location name
groups[].price.setup_priceOne-time setup fee
groups[].price.monthly_priceRecurring monthly fee
groups[].typeDID type (e.g. local, mobile, tollfree)
groups[].requirementsRegulatory requirements for this group (empty if none)
groups[].allow_number_selectionWhether you can pick a specific number from this group
groups[].is_eligible_for_free_numberWhether this group qualifies for a free number
groups[].featuresSupported features for numbers in this group
Features
  • voice — Always included for all number types
  • sms_in / sms_out — Included for non-US countries
  • whatsapp — Added for mobile numbers
  • whatsapp_business — Added for all number types

Error

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