List accounts
Discover the phone_number_id for every connected line.
API →
Every resource exposed through the Public API has a stable, prefixed
identifier of the form <prefix>_<26 base32 chars>.
msg_01HXYZABCDEFGHJKMNPQRSTVWXThe one exception is the WhatsApp phone_number_id — that’s
Meta’s identifier and uses a different format. See phone_number_id below.
| Prefix | Resource |
|---|---|
msg_ | Message |
cnv_ | Conversation |
ctc_ | Contact |
lbl_ | Label |
tmpl_ | Template |
wbs_ | Webhook subscription |
wbd_ | Webhook delivery |
evt_ | Event (KCKit envelope payload id) |
key_ | API key |
sec_ | Webhook signing secret |
req_ | Request id (response envelope + X-Request-Id header) |
org_ | Organisation |
usr_ | User (conversation assignee) |
_) + 26 (id body) = 31 characters
total for most resources. tmpl_* is 32 chars (5-char prefix).0-9 and A-Z minus I L O U).
Always uppercase in the id body.created_at
(always returned alongside).404 resource_not_found — never 403, to
avoid leaking existence.phone_number_idThe phone_number_id is the WhatsApp Business phone number’s
identifier as assigned by Meta. It’s a different beast from
kirim.dev’s prefixed ids and appears in every path-scoped
endpoint.
GET /v1/106540352242922/messagesPOST /v1/106540352242922/messagesGET /v1/106540352242922/messages/msg_01HXYZABCDEFGHJKMNPQRSTVWXGET /v1/106540352242922/conversationsGET /v1/106540352242922/templates| Property | Value |
|---|---|
| Format | Digits only, typically 15–17 characters |
| Issuer | Meta (WhatsApp Business Platform) |
| Stability | Permanent for the lifetime of the phone number |
| Position | URL path segment, never request body |
| Discovery | GET /v1/accounts exposes it as the phone_number_id field on each connected account |
// GET /v1/accounts → 200{ "data": [ { "id": "wba_01HXYZABCDEFGHJKMNPQRSTVWX", "phone_number_id": "106540352242922", "display_phone_number": "+62 811 1222 333", "verified_name": "Acme Inc", "quality_rating": "GREEN", "status": "approved" } ], "has_more": false, "next_cursor": null}Pluck phone_number_id from there and use it as the path segment for
every message, conversation, contact, and template operation against
that line.
Internally kirim.dev uses 12-character nanoids as primary keys. The
public id (msg_…) is stored on a separate column (external_id)
and is the only id form ever returned through the API. If you see a
shorter id-shaped string somewhere in a payload (e.g. assigned_to
on conversations), it’s the internal user id — the only resource
without a prefixed external_id contract today.
created_at instead.400 invalid_field_value.phone_number_id with kirim.dev’s wba_ id. The
WhatsApp Business Account row has its own prefixed id, but
path-scoped endpoints take Meta’s digit-only phone_number_id. The
two travel together in GET /v1/accounts for that reason.phone_number_id in source. Fetch it from
/v1/accounts at startup or load it from config. Reconnecting a
phone number issues a new id.