Account
List Phone Numbers
Retrieve all WhatsApp phone numbers connected to your account. Use the returned ID when sending messages.
GET /api/v1/public/phone-numbers
Use the id field from the response as the whatsapp_phone_number_id parameter when sending messages. If you only have one phone number, you can omit it and the API will use your primary number automatically.
Example Request
- cURL
- JavaScript
- Python
curl -X GET "https://chat.api.co.id/api/v1/public/phone-numbers" \
-H "Authorization: Bearer YOUR_API_KEY"
const response = await fetch("https://chat.api.co.id/api/v1/public/phone-numbers", {
headers: {
"Authorization": "Bearer YOUR_API_KEY"
}
});
const { data } = await response.json();
// Use data[0].id as whatsapp_phone_number_id
import requests
response = requests.get(
"https://chat.api.co.id/api/v1/public/phone-numbers",
headers={
"Authorization": "Bearer YOUR_API_KEY"
}
)
data = response.json()["data"]
# Use data[0]["id"] as whatsapp_phone_number_id
Response
{
"success": true,
"data": [
{
"id": "clyyy9876543210",
"phone_number_id": "890836697444150",
"display_phone_number": "+62 812-3456-7890",
"verified_name": "My Business",
"quality_rating": "GREEN",
"is_primary": true,
"waba_id": "123456789",
"business_name": "My Company"
},
{
"id": "clyyy1234567890",
"phone_number_id": "940323022498623",
"display_phone_number": "+62 878-9012-3456",
"verified_name": "My Business CS",
"quality_rating": "GREEN",
"is_primary": false,
"waba_id": "123456789",
"business_name": "My Company"
}
]
}
Response Fields
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | Phone number record ID. Use this as whatsapp_phone_number_id when sending messages. |
phone_number_id | string | yes | Meta phone number ID (from WhatsApp Business API). |
display_phone_number | string | yes | Formatted phone number for display. |
verified_name | string | yes | Business name verified by Meta. |
quality_rating | string | yes | Phone number quality rating: "GREEN", "YELLOW", or "RED". |
is_primary | boolean | yes | Whether this is the primary (default) phone number. |
waba_id | string | yes | WhatsApp Business Account ID this number belongs to. |
business_name | string | yes | WABA business name. |
List Instagram Accounts
Retrieve all Instagram accounts connected to your account. Use the returned ID when sending Instagram messages.
GET /api/v1/public/instagram-accounts
Use the id field from the response as the instagram_account_id parameter when sending Instagram messages. If you only have one Instagram account, you can omit it.
Example Request
- cURL
- JavaScript
- Python
curl -X GET "https://chat.api.co.id/api/v1/public/instagram-accounts" \
-H "Authorization: Bearer YOUR_API_KEY"
const response = await fetch("https://chat.api.co.id/api/v1/public/instagram-accounts", {
headers: {
"Authorization": "Bearer YOUR_API_KEY"
}
});
const { data } = await response.json();
// Use data[0].id as instagram_account_id
import requests
response = requests.get(
"https://chat.api.co.id/api/v1/public/instagram-accounts",
headers={
"Authorization": "Bearer YOUR_API_KEY"
}
)
data = response.json()["data"]
# Use data[0]["id"] as instagram_account_id
Response
{
"success": true,
"data": [
{
"id": "clxxx1234567890",
"ig_id": "17841400123456789",
"username": "mybusiness",
"profile_pic_url": "https://...",
"connection_status": "connected",
"connected_at": "2026-01-15T08:00:00.000Z"
}
]
}
Response Fields
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | Account record ID. Use this as instagram_account_id when sending messages. |
ig_id | string | yes | Instagram Professional Account ID. |
username | string | yes | Instagram username. |
profile_pic_url | string | no | Profile picture URL. |
connection_status | string | yes | Connection status (connected, disconnected, requires_reauth). |
connected_at | string | yes | When this account was connected (ISO 8601). |
List Facebook Pages
Retrieve all Facebook Pages (Messenger) connected to your account. Use the returned ID when sending Messenger messages.
GET /api/v1/public/facebook-pages
Use the id field from the response as the facebook_page_id parameter when sending Messenger messages. If you only have one Facebook Page, you can omit it.
Example Request
- cURL
- JavaScript
- Python
curl -X GET "https://chat.api.co.id/api/v1/public/facebook-pages" \
-H "Authorization: Bearer YOUR_API_KEY"
const response = await fetch("https://chat.api.co.id/api/v1/public/facebook-pages", {
headers: {
"Authorization": "Bearer YOUR_API_KEY"
}
});
const { data } = await response.json();
// Use data[0].id as facebook_page_id
import requests
response = requests.get(
"https://chat.api.co.id/api/v1/public/facebook-pages",
headers={
"Authorization": "Bearer YOUR_API_KEY"
}
)
data = response.json()["data"]
# Use data[0]["id"] as facebook_page_id
Response
{
"success": true,
"data": [
{
"id": "clzzz1234567890",
"page_id": "123456789012345",
"page_name": "My Business Page",
"page_category": "Business",
"profile_pic_url": "https://...",
"connection_status": "connected",
"connected_at": "2026-01-15T08:00:00.000Z"
}
]
}
Response Fields
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | Page record ID. Use this as facebook_page_id when sending Messenger messages. |
page_id | string | yes | Facebook Page ID. |
page_name | string | yes | Facebook Page name. |
page_category | string | no | Page category (e.g., Business, E-commerce). |
profile_pic_url | string | no | Page profile picture URL. |
connection_status | string | yes | Connection status. |
connected_at | string | yes | When this page was connected (ISO 8601). |
Try it out
Press Try it and paste your API key (kc_live_...) into the API key (Bearer) field. Get the key from API Keys. Requests run against your live account, so endpoints that send, create, or delete act on real data.
- GET/api/v1/public/phone-numbersList Phone Numbers
- GET/api/v1/public/instagram-accountsList Instagram Accounts
- GET/api/v1/public/facebook-pagesList Facebook Pages