# Your account's status by API: service, numbers and webhooks

`GET /v1/status/me`

`GET /v1/status/me`, with your API key, tells how **your** account is doing: what the public status page cannot show because it does not know who is reading it. Only the key's account; never a full URL, a secret or amounts.

**`service`.** `status` (the same as `GET /v1/account`), `sending.paused` with `reason` (trial expired, payment failed…), `receiving.stopped` or `receivingUntil` (until when your numbers receive if nothing changes) and `trial`. It answers even while sending is paused for billing.

**`numbers`.** Each number: `status`, `qualityRating`, `canSend` and `canSendReason` (as in `GET /v1/connections/{id}/sending-status`), `reasonCodes` and `metaBlocks`: Meta's blocks `141006` (payment method), `141010` (business verification) and `131031` (account locked), each with its `explanation` in `lang`.

**`webhooks`.** Each endpoint: `id`, `host` (the domain only: no path, query or credentials), `scope` (`account` or `number`), `state` (`active`, `paused`, `auto_disabled` when we turned it off after consecutive failures, `number_disconnected`), `consecutiveFailures`, `failingSince`, `lastSuccessAt`, `lastFailureAt`, `lastStatusCode`, its deliveries of the last 24 h and up to 5 `failureReasons24h` with `cause`, `httpStatus`, `count` and a plain `text` («Your endpoint responded 500.»). `deliveries24h` adds everything up: `delivered`, `retrying`, `abandoned`, `pending`.

## Examples

### cURL

```bash
# your account's status, with your webhooks (only your account; never full URLs nor amounts)
curl "https://api.waiaconnect.com/v1/status/me?lang=en" -H "Authorization: Bearer wc_live_YOUR_API_KEY"
# → { "status": { "service": { "status": "active", "sending": { "paused": false, … }, … },
#       "numbers": [ { "id": "conn_…", "status": "connected", "canSend": "blocked", "metaBlocks": [ { "code": 141006, "explanation": "…" } ] } ],
#       "webhooks": [ { "id": "wh_…", "host": "hooks.example.com", "state": "active", "consecutiveFailures": 3,
#                       "failureReasons24h": [ { "cause": "http_error", "httpStatus": 500, "count": 6, "text": "Your endpoint responded 500." } ] } ],
#       "deliveries24h": { "delivered": 1180, "retrying": 4, "abandoned": 2, "pending": 0 } } }
```

### Node.js

```javascript
const H = { "Authorization": "Bearer wc_live_YOUR_API_KEY" };
const { status } = await (await fetch("https://api.waiaconnect.com/v1/status/me?lang=en", { headers: H })).json();
if (status.service.sending.paused) console.log("sending paused:", status.service.sending.reason);
for (const w of status.webhooks) if (w.state !== "active" || w.consecutiveFailures) console.log(w.host, w.state, w.failureReasons24h.map(r => r.text));
for (const n of status.numbers) for (const b of n.metaBlocks) console.log(n.id, b.code, b.explanation);
```

### PHP

```php
<?php
$ch = curl_init("https://api.waiaconnect.com/v1/status/me?lang=en");
curl_setopt_array($ch, [CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => ["Authorization: Bearer wc_live_YOUR_API_KEY"]]);
$s = json_decode(curl_exec($ch), true)["status"];
foreach ($s["webhooks"] as $w) echo $w["host"], " ", $w["state"], " ", $w["consecutiveFailures"], "
";
```

### Python

```python
import requests
s = requests.get("https://api.waiaconnect.com/v1/status/me", params={"lang": "en"}, headers={"Authorization": "Bearer wc_live_YOUR_API_KEY"}).json()["status"]
print(s["service"]["status"], s["deliveries24h"])
for w in s["webhooks"]:
    print(w["host"], w["state"], [r["text"] for r in w["failureReasons24h"]])
```

## Notes

- `?lang=es|en|pt|it` picks the language of the texts (default `en`); decide on `cause`, `state` and the codes, never on the text.
- An abandoned delivery is listed and redelivered with `GET /v1/webhooks/{id}/deliveries` and `POST …/redeliver`.
- A suspended or cancelled account gets `403 ACCOUNT_SUSPENDED`.
