# Phone Numbers

Read a WhatsApp number's live status from Meta, tell a dead channel from a live one, and register a number whose two-step PIN blocked it.

import { Tab, Tabs } from 'fumadocs-ui/components/tabs';

By the end of this page you can tell from the API whether a connected WhatsApp number is alive.

You can also read its live state from Meta and re-register a number whose two-step PIN blocked it.

## Before you start

A WhatsApp number is a [phone number](/platforms/phone-numbers) with WhatsApp enabled on it. Availability, pricing, buying, porting and KYC live on [Phone numbers](/platforms/phone-numbers).

Getting one is covered there and in [Connection & Setup](/platforms/whatsapp/connect).

`/v1/phone-numbers` is the current API. The `/v1/whatsapp/phone-numbers/*` routes are deprecated aliases with the same contracts.

## Number status

Call `GET /v1/whatsapp/number-info` with `accountId` for the number's live state from Meta:

- display name and its approval
- quality rating
- messaging-limit tier
- throughput
- the official-business badge
- connection status
- the owning WABA's verification status

<Tabs items={['Node.js', 'Python', 'curl']}>
<Tab value="Node.js">
```typescript
import Zernio from '@zernio/node';

const zernio = new Zernio();
const accountId = '66b2e19d8c3f5a7e9d0b1c2d';

const { data: info } = await zernio.whatsappphonenumbers.getWhatsAppNumberInfo({
  query: { accountId }
});

console.log(info.phone.quality_rating, info.phone.messaging_limit_tier);
```
</Tab>
<Tab value="Python">
```python
from zernio import Zernio

client = Zernio()
account_id = "66b2e19d8c3f5a7e9d0b1c2d"

info = client.whatsapp.get_whats_app_number_info(account_id=account_id)

print(info["phone"]["quality_rating"], info["phone"]["messaging_limit_tier"])
```
</Tab>
<Tab value="curl">
```bash
curl "https://zernio.com/api/v1/whatsapp/number-info?accountId=66b2e19d8c3f5a7e9d0b1c2d" \
  -H "Authorization: Bearer $ZERNIO_API_KEY"
```
</Tab>
</Tabs>

Response (`200`):

```json
{
  "phone": {
    "display_phone_number": "+1 310-555-1234",
    "verified_name": "Acme Corp",
    "name_status": "APPROVED",
    "quality_rating": "GREEN",
    "messaging_limit_tier": "TIER_1K",
    "throughput": { "level": "STANDARD" },
    "status": "CONNECTED",
    "is_official_business_account": false,
    "platform_type": "CLOUD_API"
  },
  "waba": {
    "name": "Acme WABA",
    "business_verification_status": "verified",
    "timezone_id": "1"
  }
}
```

`messaging_limit_tier` is the daily unique-contact cap Meta has granted (`TIER_250` for a new number, up to `TIER_UNLIMITED`).

`quality_rating` is `GREEN`, `YELLOW`, `RED` or `UNKNOWN`.

The call also refreshes the cached values shown on the connection card.

<Callout type="warn">
A number you bring has no Zernio line behind it, so [Calls](/platforms/voice) and [SMS](/platforms/sms) cannot be enabled on it; `GET /v1/phone-numbers` lists it under `connected`, not `numbers`. To run Calls or SMS alongside WhatsApp, [buy the number through Zernio](/platforms/phone-numbers/setup).
</Callout>

## Liveness check

`GET /v1/whatsapp/number-info` is the supported way to check whether a WhatsApp channel is alive. It reads the channel object from Meta at request time.

While the channel works, the read returns the snapshot above.

When Meta stops serving the object, the read fails with Meta Graph error 100, subcode 33, and the endpoint returns `400`. A [phone-side coexistence disconnect](/platforms/whatsapp/connect#whatsapp-business-app-coexistence) is one cause:

```json
{
  "error": "Meta will not let Zernio read this WhatsApp object (error 100, subcode 33). Most often the number or its Business Account is no longer shared with Zernio, so reconnect your WhatsApp Business account from Connections."
}
```

In measured disconnects this flips within seconds of the channel dying and does not flap.

- Treat a `400` with error 100/33 as "dead until reconnected".
- Treat a `200` as "the channel object is being served".

A live read also refreshes Zernio's cached view of the account. Polling it keeps `platformStatus` in `GET /v1/accounts` current.

### Other status endpoints and what they tell you

| Endpoint | What it reflects | Liveness check? |
|---|---|---|
| `GET /v1/whatsapp/number-info` | Live read of the channel object from Meta | Yes. Fails with error 100/33 when the channel is dead |
| `GET /v1/whatsapp/business-profile` | Live read of profile metadata (about, address, websites) | No. It returns `200` with a full profile even on a dead channel; a `200` says Meta served the profile, not that the number can send or receive |
| `GET /v1/accounts/{accountId}/health` | OAuth token validity and granted scopes, plus, for WhatsApp accounts, a live `platformConnection` probe of the Meta link | Yes, through `platformConnection` |
| `GET /v1/accounts` | Last stored state (`platformStatus`, `metadata.metaStatus`), refreshed by a periodic probe | No. It is a cache and can be hours or days stale |

For WhatsApp accounts, `GET /v1/accounts/{accountId}/health` runs the same live Meta read as `number-info` and reports it under `platformConnection`:

- `status`: `connected` (Meta served the channel object), `disconnected` (Meta refused it with error 100/33, and the overall health `status` becomes `error`), or `unknown` (the live read failed for another reason, such as a timeout, which is not evidence either way).
- `checkedAt`: when the probe ran, always the current request.
- `phoneStatus`: Meta's own `status` field from the phone-number node (for example `CONNECTED`) when it was readable. Anything other than `CONNECTED` adds an issue and raises `status` (`BANNED`: `error`, others: `warning`).
- `metaError`: the Meta error detail (`code`, `subcode`, `message`) when `status` is `disconnected`.

The token can be valid while the Meta link is dead, so `tokenStatus` alone is never a liveness signal.

**The cached `platformStatus`** in `GET /v1/accounts` is sticky. A periodic probe and live reads refresh it.

It can hold a stale value such as `restricted` days after the problem was resolved.

Before alarming on it, compare it with `metadata.metaStatusCheckedAt`, which records when the cached state was last verified against Meta.

A `metaStatusCheckedAt` far in the past means "re-verify with a live read", not "the channel is down".

**Messaging restrictions.** Meta can refuse sends because of:

- a payment issue (error 131042)
- a restricted or disabled WhatsApp Business Account (131031)
- a policy block (368)

`GET /v1/accounts/health` and `GET /v1/accounts/{accountId}/health` report it under `messagingRestriction` with the Meta `code`.

It is set on the refused send or failed delivery, and cleared by the next delivered message.

## Pricing analytics

Call `GET /v1/whatsapp/pricing-analytics` for the message volume and approximate cost Meta reports for this number. Pass:

- `accountId`
- `start` and `end` (ISO 8601)
- `granularity`: `HALF_HOUR`, `DAILY` or `MONTHLY`

Break it down with `dimensions` (`COUNTRY`, `PHONE`, `PRICING_CATEGORY`, `PRICING_TYPE`, `TIER`, comma-separated).

Filter with `pricingCategories`, `pricingTypes`, `countryCodes` or `metricTypes`.

Zernio always scopes the read to the account's own number. Meta's figures are approximate and can lag; Meta bills from its own invoice.

```bash
curl "https://zernio.com/api/v1/whatsapp/pricing-analytics?accountId=66b2e19d8c3f5a7e9d0b1c2d&start=2026-09-01&end=2026-09-30&granularity=DAILY&dimensions=PRICING_CATEGORY" \
  -H "Authorization: Bearer $ZERNIO_API_KEY"
```

Per-message pricing also arrives on the WhatsApp status webhooks as `pricing` ([inbox webhooks](/webhooks/inbox)).

## Verification with Meta

WhatsApp requires the number to be verified with Meta before it can send. There is no manual OTP endpoint.

- Numbers bought through Zernio are pre-verified or verified during the [connection flow](/platforms/whatsapp/connect).
- Numbers you bring are verified inside Meta's own flow.

One case after connecting needs an API call: a number with its own two-step verification PIN.

The connect flows register it with a default PIN, and Meta rejects that (error 133005). Every send then fails with a misleading `(#200) You do not have the necessary permission to send messages`, while the account still shows as connected.

Re-run the Cloud API registration with the right PIN through `POST /v1/accounts/{accountId}/whatsapp/register`. The PIN is used for that call only and is not stored.

```bash
curl -X POST "https://zernio.com/api/v1/accounts/66b2e19d8c3f5a7e9d0b1c2d/whatsapp/register" \
  -H "Authorization: Bearer $ZERNIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"pin": "481902"}'
```

Response (`200`):

```json
{
  "registered": true,
  "accountId": "66b2e19d8c3f5a7e9d0b1c2d",
  "phoneNumberId": "1875844705851813"
}
```

## If it fails
| Error | Cause | Fix |
|-------|-------|-----|
| `400` from `GET /v1/whatsapp/number-info`, Meta error 100 subcode 33 | Meta no longer serves the channel object, so the number or its WABA is not shared with Zernio any more | Reconnect from Connections, then re-run the [liveness check](#liveness-check) |
| `422` from `POST /v1/accounts/{accountId}/whatsapp/register` | Meta rejected the registration, most often a PIN mismatch | Check the PIN in the WhatsApp Business app or WhatsApp Manager and call again |
| `(#200) You do not have the necessary permission` on every send, account still shown as connected | The connect flow registered a default PIN and Meta rejected it (error 133005) | Re-register with the right PIN ([Verification with Meta](#verification-with-meta)) |
| `platformStatus` reads `restricted` long after the problem was fixed | The cached value is sticky and only a probe refreshes it | Compare `metadata.metaStatusCheckedAt`, then re-verify with a live `number-info` read |

Send-time codes are on [Limits and errors](/platforms/whatsapp/reference#common-errors), and every error uses the envelope in [error handling](/guides/error-handling).

## Related

- [Phone numbers](/platforms/phone-numbers): buy, port, price and KYC.
- [Connection & Setup](/platforms/whatsapp/connect): Embedded Signup, coexistence, credentials.
- [Calling](/platforms/whatsapp/calling): WhatsApp Business voice calling on the number.
- [Webhooks](/webhooks): `account.disconnected` and how detection works.
- [WhatsApp webhooks](/webhooks/whatsapp): activation, decline and suspension events.