Get WhatsApp number
With this endpoint, you will be able to get a number by its corresponding UUID.
Parameters
You will need to know the UUID of the number you connected to 2Chat.
You can get it using the List Numbers Endpoint.
Invocation
For the following examples, we will use WPNf3ea6c85-0dca-4d8a-a9a6-2b918f59cc97 as the UUID of the number we want to get the status from.
- cURL
- Python
- JavaScript
curl --location 'https://api.p.2chat.io/open/whatsapp/channel/WPNf3ea6c85-0dca-4d8a-a9a6-2b918f59cc97' \
--header 'Content-Type: application/json' \
--header 'X-User-API-Key: your_api_key_here'
import requests
import json
url = "https://api.p.2chat.io/open/whatsapp/channel/WPNf3ea6c85-0dca-4d8a-a9a6-2b918f59cc97"
headers = {
'Content-Type': 'application/json',
'X-User-API-Key': 'your_api_key_here'
}
response = requests.request("GET", url, headers=headers)
print(response.text)
const axios = require('axios');
let config = {
method: 'GET',
maxBodyLength: Infinity,
url: 'https://api.p.2chat.io/open/whatsapp/channel/WPNf3ea6c85-0dca-4d8a-a9a6-2b918f59cc97',
headers: {
'Content-Type': 'application/json',
'X-User-API-Key': 'your_api_key_here'
}
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Response
{
"success": true,
"channel": {
"id": "WPNf3ea6c85-0dca-4d8a-a9a6-2b918f59cc97",
"uuid": "WPNf3ea6c85-0dca-4d8a-a9a6-2b918f59cc97",
"friendly_name": "Test Number",
"phone_number": "+525633334444",
"iso_country_code": "MX",
"pushname": "Tech",
"server": "525633334444@c.us",
"platform": "android",
"connection_status": "C",
"enabled": true,
"is_business_profile": true,
"channel_type": "WW",
"sync_contacts": false,
"timezone": "America/Mexico_City",
"lang": "es",
"created_at": "2025-11-05T17:50:42Z",
"updated_at": "2025-12-03T18:04:06Z"
}
}