# Webhooks

> Events for orders, lines, eSIMs, texts, calls and release.

Set one HTTPS endpoint per account. Events are signed with
`X-Gather-Signature: t=<timestamp>,v1=<hmac-sha256>` over `{t}.{raw body}`. Delivery is at
least once, so dedupe on `id`.

## Events

| Event | When |
| --- | --- |
| `line.active` | The line has its number (and eSIM code). Billing starts. |
| `line.failed` | The line could not be set up. Includes `failure`. |
| `order.completed` | Every line in the order is `active` or `failed`. |
| `esim.installed` | A device downloaded the line's eSIM. Includes `iccid`. |
| `esim.reissued` | A new eSIM replaced the old one. |
| `esim.reissue_failed` | A reissue did not happen; the line keeps its current eSIM. |
| `line.number_changed` | The line has a new number on the same SIM. Includes `previous_number`. |
| `line.number_change_failed` | A number change did not happen; the line keeps its number. |
| `line.sim_changed` | The line moved to another physical card, same number. Includes `iccid` and `previous_iccid`. |
| `line.sim_change_failed` | A SIM move did not happen; the line stays on its card. |
| `line.area_code_mismatch` | A line ordered with `area_code` went active in another area code. Includes `requested_area_code`; the line stays active. |
| `line.roaming_on` | Roaming for activation abroad, or a [roaming window](/docs/esim#open-a-short-roaming-window), is on. Includes `roaming` with `state`, `on_at` and `off_by`. Sent a second time, once, when the eSIM is installed and `off_by` moves to the real end time; that one also has `roaming.installed_at`. |
| `line.roaming_off` | Roaming is off again (2 hours after the eSIM install, shorter for some accounts; 23 hours at most; for a roaming window, at its `off_by`). |
| `line.roaming_failed` | The network could not add roaming; the line stays active without it. |
| `line.released` | The line was released or ported out. |
| `message.received` | A text came in on one of your numbers. `data` is the message. See [Messaging](/docs/messaging#receiving-texts). |
| `number.sms_ratio_warning` | A number is sending well over what it gets back, or a send was just refused for it. See [Messaging](/docs/messaging#reply-ratio). |
| `call.ringing` | A call on one of your numbers is ringing. `data` is the call. |
| `call.answered` | The call was answered. |
| `call.ended` | The call ended. Includes `outcome`, `end_reason` and `duration_seconds`. |
| `webhook.test` | A test event you send from the portal. Sent once, not retried. |

Call events carry the call as `data`: `id`, `direction` (`inbound` or `outbound`), `from`, `to`,
`number` (your number), `line_id`, `status`, `created_at`, `answered_at`, `ended_at` and
`duration_seconds`. Inbound call ids start `call_in_`. `from` is `anonymous` when the caller's
number is withheld. `outcome` is one of `completed`, `busy`, `no_answer`, `rejected`, `failed`, or
`unknown` when we could not see the call end: then it has `finalized_at` instead of `ended_at`,
and `duration_seconds` is `null`. Each call sends each event at most once, and a late event for a
state the call has already passed is not sent. `GET /v1/gather/lines/call/list` lists your calls,
newest first (`number=`, `limit` up to 100, and `before=` from the last page).

Coming soon (not sent yet):

| Event | When |
| --- | --- |
| `line.suspended` / `line.reinstated` | The line was paused or resumed. Includes a `reason`. |
| `usage.threshold` | A line or your account crossed an SMS threshold you set. |

## Example

```json
{
  "id": "evt_31kQpX",
  "type": "line.active",
  "created_at": "2026-10-01T10:05:40Z",
  "data": { "line_id": "ln_8Hq2cV3k", "order_id": "ord_5Kd9Qw", "number": "+13055550142",
            "area_code": "305", "metadata": {} }
}
```
