Skip to main content

List WhatsApp Numbers

This endpoint will help you list the numbers you have connected to 2Chat.

Invocation

curl -L -G 'https://api.p.2chat.io/open/whatsapp/get-numbers' \
--header 'X-User-API-Key: your_api_key_here'

Response

The API will return an array of numbers based on the numbers you have connected to 2Chat. In the example below, only 1 number is returned.

{
"success": true,
"numbers": [
{
"uuid": "WPN95841312-b54d-46e3-b0bc-6414f4a5296b",
"friendly_name": "my testing number",
"phone_number": "+595981048477",
"iso_country_code": "PY",
"pushname": "✌️",
"server": "595981048477@c.us",
"platform": "iphone",
"connection_status": "C",
"enabled": true,
"is_business_profile": false,
"channel_type": "WW",
"sync_contacts": true,
"created_at": "2022-10-31 22:05:44",
"updated_at": "2022-12-01 21:40:04"
}
]
}
FieldDescriptionExample values
uuidThe unique identifier of the numberWPN95841312-b54d-46e3-b0bc-6414f4a5296b
friendly_namethe friendly name you chose for your numbermy number.
phone_numberthe phone number in international format+595981048477
iso_country_codethe two-letter country code of the numberUS
pushnamethe nickname you chose on WhatsAppMy business
serverWhatsApp-specific value595981048477@c.us
platformThe mobile device your WhatsApp app is running onandroid
connection_status2Chat value indicating the connection status to WhatsAppC = connected, D = disconnected, F = failure
enabledWhether the number is enabled or not on 2Chattrue
is_business_profileWhether the number is on Regular WhatsApp or WhatsApp for Businessfalse
channel_typeThe type of channelWW = WhatsApp Web, IG = Instagram, SMS = Phone Text Messages.
sync_contactsWhether you have enabled importing your phone directory to 2Chattrue