# List the connected accounts this key may use

`GET https://api.whatsable.app/v1/channel-accounts`

Required scope: `numbers:read`.

Lists the connected accounts this key may use, on every channel: WhatsApp numbers first (the primary, then the oldest), then Instagram accounts and Facebook Pages by when they connected. Every account comes in one page. A conversation and a message name theirs as `channel_account_id`.

## Authorization

`Authorization: Bearer <API key>` (HTTP bearer, `bearerAuth`). The key looks like `nfy_live_<32 characters>`. An API key from Settings > API keys, sent as `Authorization: Bearer <key>`.

## Parameters

- `channel` (query) string, optional. Only accounts on this channel. Absent or `all`: every channel. One of: `"whatsapp"`, `"instagram"`, `"messenger"`, `"tiktok"`, `"all"`.

## Responses

### 200

Every account this key may use, in one page.

- `object` `"list"`, required.
- `data` array of object, required.
  - `object` `"channel_account"`, required.
  - `id` string, required. The account id: `channel_account_id` on conversations and messages. At most 64 characters.
  - `channel` string, required. The channel: `whatsapp`, `instagram`, `messenger` or `tiktok`. More may be added. One of: `"whatsapp"`, `"instagram"`, `"messenger"`, `"tiktok"`. New values may appear within v1.
  - `number_id` string or null, required. The business number of a WhatsApp account (`GET /v1/numbers/{id}`). Null on every other channel. At most 64 characters.
  - `handle` string or null, required. How the account reads: the phone in E.164 for WhatsApp, the username without `@` for Instagram, the Page name for Messenger. Null until known.
  - `name` string or null, required. The business name WhatsApp shows, for a WhatsApp account. Null on every other channel.
  - `status` string, required. Only `active` sends. A disconnected account keeps its conversations. One of: `"active"`, `"paused"`, `"disconnected"`, `"pending"`.
  - `is_default_for_key` boolean, required. True for the account of the number this key sends from when a send names no `from`.
- `has_more` boolean, required. True when another page follows this one.
- `next_cursor` string or null, required. Pass as `cursor` to read the next page. Null on the last page. Valid for 24 hours.

### 400

invalid_request: `validation_failed`.

Body: the error body, under "Error body" below.

### 401

authentication: `api_key_in_wrong_place`, `api_key_missing`, `invalid_access_token`, `invalid_api_key`, `legacy_api_key_not_accepted`.

Body: the error body, under "Error body" below.

### 403

permission: `feature_not_in_plan`, `insufficient_scope`, `plan_inactive`.

Body: the error body, under "Error body" below.

### 429

rate_limit: `rate_limited`.

Body: the error body, under "Error body" below.

### 500

internal: `internal_error`.

Body: the error body, under "Error body" below.

### Error body

Every 4xx and 5xx response above has this body.

- `error` object, required.
  - `type` string, required. The class of the error. Each type has exactly one HTTP status, such as `invalid_request` for 400. One of: `"invalid_request"`, `"authentication"`, `"permission"`, `"not_found"`, `"conflict"`, `"precondition_failed"`, `"unprocessable"`, `"rate_limit"`, `"internal"`, `"unavailable"`.
  - `code` string, required. The stable code a program branches on. Open: new codes are added under an existing status. One of: `"validation_failed"`, `"invalid_address"`, `"template_variable_missing"`, `"invalid_cursor"`, `"from_conflicts_with_conversation"`, `"media_too_large"`, `"media_type_unsupported"`, `"api_key_missing"`, `"invalid_api_key"`, `"api_key_in_wrong_place"`, `"legacy_api_key_not_accepted"`, `"invalid_access_token"`, `"insufficient_scope"`, `"number_not_allowed_for_key"`, `"plan_inactive"`, `"feature_not_in_plan"`, `"organization_not_live"`, `"number_over_plan"`, `"number_not_found"`, `"template_not_found"`, `"contact_not_found"`, `"conversation_not_found"`, `"message_not_found"`, `"label_not_found"`, `"media_not_found"`, `"route_not_found"`, `"scheduled_message_not_found"`, `"broadcast_not_found"`, `"ai_bot_not_found"`, `"knowledge_file_not_found"`, `"ai_bot_file_not_found"`, `"conversation_note_not_found"`, `"idempotency_key_reused"`, `"idempotency_request_in_progress"`, `"template_name_conflict"`, `"template_waba_not_connected"`, `"template_used_by_broadcast"`, `"label_name_conflict"`, `"ai_bot_name_conflict"`, `"precondition_failed"`, `"session_window_closed"`, `"template_not_approved"`, `"template_wrong_waba"`, `"template_not_supported"`, `"template_rejected_by_meta"`, `"number_not_sending"`, `"contact_has_no_address"`, `"label_limit_reached"`, `"free_tier_limit"`, `"ai_bot_limit_reached"`, `"scheduled_message_not_pending"`, `"broadcast_not_cancellable"`, `"broadcast_not_pausable"`, `"broadcast_not_resumable"`, `"ai_bot_not_archived"`, `"ai_bot_archived"`, `"ai_bot_file_limit_reached"`, `"ai_bot_text_too_long"`, `"label_not_available_on_number"`, `"reply_target_not_quotable"`, `"message_has_no_figures"`, `"message_not_reactable"`, `"channel_window_closed"`, `"channel_not_supported"`, `"channel_account_ambiguous"`, `"channel_conflicts_with_conversation"`, `"username_ambiguous"`, `"rate_limited"`, `"internal_error"`, `"service_unavailable"`. New values may appear within v1.
  - `title` string, required. A short summary for a person. Wording may change.
  - `message` string, required. What happened, for a person. Wording may change.
  - `how_to_fix` string, required. What to change so the request succeeds.
  - `param` string or null, required. The offending field in dotted path form (`template.variables.2`), or null.
  - `source` string, required. Who returned the error: `meta` (WhatsApp) or `whatsable`. One of: `"meta"`, `"whatsable"`.
  - `owner` string, required. Who must act: `caller` (change the request or the account), `whatsable`, or `meta`. One of: `"caller"`, `"whatsable"`, `"meta"`.
  - `retryable` boolean, required. Whether the same request may succeed later without a change.
  - `docs_url` string, required. The docs page for this code.
  - `details` object, required. Structured facts for this code, such as `required_scope` or `meta_code`. Empty when there are none.
  - `request_id` string, required. The `X-Request-Id` of this response. Quote it to support.
  - `plans_url` string, optional. The public page that explains the plans and their limits. Present only on `plan_inactive`, `feature_not_in_plan`, `free_tier_limit` and `number_over_plan`.

## Example request

```bash
curl -X GET 'https://api.whatsable.app/v1/channel-accounts' \
  -H 'Authorization: Bearer <API key>'
```
