Skip to content
Accounts

List connected WhatsApp accounts

GET
/accounts
const url = 'https://api.kirim.chat/v1/accounts?status=connected';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}

List the WhatsApp accounts attached to the calling organization. The returned business_phone_number_id is the value to use in /{phone_number_id}/... path-based endpoints (Meta-style — sender comes from the URL, not the body). Defaults to status=connected because that’s the only state in which sends are accepted; pass status=all to inspect onboarding-in-progress or disconnected accounts. Response is intentionally not paginated.

status
string
Allowed values: connected all

Account list

Media type application/json
object
data
required
Array<object>
object
object
required
string
Allowed values: account
phone_number_id
required

Meta WhatsApp Business phone_number_id. Use as the {phone_number_id} path parameter in /v1/{phone_number_id}/... endpoints. Nullable while onboarding is in flight.

string | null
phone_number
required
string | null
name
required
string | null
status
required

Lifecycle state of the account (e.g. connected, disconnected, degraded, onboarding).

string
has_more
required
boolean
next_cursor
required
string | null
request_id
required
string
Example
{
"data": [
{
"object": "account",
"phone_number_id": "106540352242922",
"phone_number": "+628111222333",
"name": "Customer Support",
"status": "connected"
}
]
}

Validation failure

Media type application/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
request_id
required
string
Example
{
"error": {
"type": "invalid_request_error",
"code": "invalid_phone_number",
"request_id": "req_01HXYZABCDEFGHJKMNPQRSTVWX"
}
}

Authentication failure

Media type application/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
request_id
required
string
Example
{
"error": {
"type": "invalid_request_error",
"code": "invalid_phone_number",
"request_id": "req_01HXYZABCDEFGHJKMNPQRSTVWX"
}
}

Rate limit exceeded

Media type application/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
request_id
required
string
Example
{
"error": {
"type": "invalid_request_error",
"code": "invalid_phone_number",
"request_id": "req_01HXYZABCDEFGHJKMNPQRSTVWX"
}
}

Internal server error

Media type application/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
request_id
required
string
Example
{
"error": {
"type": "invalid_request_error",
"code": "invalid_phone_number",
"request_id": "req_01HXYZABCDEFGHJKMNPQRSTVWX"
}
}