Skip to content
Accounts

List connected WhatsApp accounts

GET
/accounts
const url = 'https://api.kirimdev.com/v1/accounts?status=connected&customer_id=cus_01HXYZABCDEFGHJKMNPQRSTVWX';
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

Account lifecycle filter. Omit for connected accounts; use all to include onboarding and disconnected accounts.

string
default: connected
Allowed values: connected all
Example
connected

Account lifecycle filter. Omit for connected accounts; use all to include onboarding and disconnected accounts.

customer_id

Return accounts owned by this end-customer. Unknown or cross-organization IDs produce an empty list.

string
/^cus_[0-9A-HJKMNP-TV-Z]{26}$/
Example
cus_01HXYZABCDEFGHJKMNPQRSTVWX

Return accounts owned by this end-customer. Unknown or cross-organization IDs produce an empty list.

Account list

Media type application/json
object
data
required

Items in this page, ordered as documented by the operation.

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
meta_status
required

Meta’s own phone-number status (CONNECTED, PENDING, UNVERIFIED, DISCONNECTED, …), or null if never fetched. Distinct from status: a value other than CONNECTED — or a status other than connected — means the number likely needs registration via POST /v1/{phone_number_id}/register.

string | null
customer_id
required

Public id of the end-customer (multi-tenant platform mode) that owns this account. NULL for direct-org accounts. Filter the list endpoint via ?customer_id=cus_....

string | null
has_more
required

Whether another page is available.

boolean
next_cursor
required

Pass this value unchanged as cursor to fetch the next page. null marks the final page.

string | null
request_id
required

Unique request identifier to include when contacting support.

string
Example
{
"data": [
{
"object": "account",
"phone_number_id": "106540352242922",
"phone_number": "+628111222333",
"name": "Customer Support",
"status": "connected",
"meta_status": "CONNECTED",
"customer_id": "cus_01HXYZABCDEFGHJKMNPQRSTVWX"
}
],
"has_more": false,
"next_cursor": null,
"request_id": "req_01HXYZABCDEFGHJKMNPQRSTVWX"
}

Validation failure

Media type application/json
object
error
required
object
type
required
string
Allowed values: invalid_request_error authentication_error permission_error not_found conflict rate_limit_error api_error
code
required
string
message
required

Human-readable explanation of the error.

string
param

Request field associated with the error, when applicable.

string
request_id
required

Unique request identifier to include when contacting support.

string
Examples
Example default

A field value is invalid.

{
"error": {
"type": "invalid_request_error",
"code": "invalid_field_value",
"message": "A field value is invalid.",
"request_id": "req_01HXYZABCDEFGHJKMNPQRSTVWX"
}
}

Authentication failure

Media type application/json
object
error
required
object
type
required
string
Allowed values: invalid_request_error authentication_error permission_error not_found conflict rate_limit_error api_error
code
required
string
message
required

Human-readable explanation of the error.

string
param

Request field associated with the error, when applicable.

string
request_id
required

Unique request identifier to include when contacting support.

string
Examples
Example default

The provided API key is invalid.

{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "The provided API key is invalid.",
"request_id": "req_01HXYZABCDEFGHJKMNPQRSTVWX"
}
}

Rate limit exceeded

Media type application/json
object
error
required
object
type
required
string
Allowed values: invalid_request_error authentication_error permission_error not_found conflict rate_limit_error api_error
code
required
string
message
required

Human-readable explanation of the error.

string
param

Request field associated with the error, when applicable.

string
request_id
required

Unique request identifier to include when contacting support.

string
Examples
Example default

Rate limit exceeded.

{
"error": {
"type": "rate_limit_error",
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded.",
"request_id": "req_01HXYZABCDEFGHJKMNPQRSTVWX"
}
}

Internal server error

Media type application/json
object
error
required
object
type
required
string
Allowed values: invalid_request_error authentication_error permission_error not_found conflict rate_limit_error api_error
code
required
string
message
required

Human-readable explanation of the error.

string
param

Request field associated with the error, when applicable.

string
request_id
required

Unique request identifier to include when contacting support.

string
Examples
Example default

An unexpected error occurred.

{
"error": {
"type": "api_error",
"code": "internal_error",
"message": "An unexpected error occurred.",
"request_id": "req_01HXYZABCDEFGHJKMNPQRSTVWX"
}
}