# Lines

> Order, list, get, renumber, move and release lines.

## Order lines

```http
POST /v1/gather/lines/order/create
```

One order holds 1 to 50 lines. Each line is a new number or a number you port in, on an eSIM
or a physical SIM. Send an `Idempotency-Key` so a retry never orders twice.

| Field | Type | Description |
| --- | --- | --- |
| `lines` | array | 1 to 50 lines, described below. |
| `metadata` | object | Up to 20 string keys, copied onto every line in the order. |

Each line:

| Field | Type | Description |
| --- | --- | --- |
| `zip` | string | Where the line should be. Use this or `area_code`. See [Area codes](/docs/area-codes). |
| `area_code` | string | Preferred area code, best effort. |
| `sim` | string | `esim` (default) or `physical`. |
| `iccid` | string | Required for `physical`: the ICCID printed on one of the SIM cards we shipped you. |
| `port_in` | object | Optional. Bring an existing number instead of getting a new one. |
| `roaming` | string | Optional. `activation` to set the line up from outside the US. eSIM only; see [Activating abroad](#activating-abroad). |

`port_in` takes `number`, `account_number`, `transfer_pin`, `first_name`, `last_name`, and
the service address your current carrier has for the number: `street`, `city` and `zip`. All are
required; the carrier rejects a port without the full address. Use the details exactly as they
are on the account with the current carrier.

| Field | Type | Description |
| --- | --- | --- |
| `number` | string | The number to bring, in E.164 form, like `+13055550188`. |
| `account_number` | string | Your account number with the current carrier. |
| `transfer_pin` | string | The transfer PIN from the current carrier. |
| `zip` | string | The 5-digit ZIP on that account. |
| `first_name` | string | The account holder's first name. |
| `last_name` | string | The account holder's last name. |
| `street` | string | The street of the service address (number and street), 1 to 100 characters. |
| `city` | string | The city of the service address, 1 to 100 characters. |

```json
{
  "lines": [
    { "zip": "33101" },
    { "area_code": "415", "sim": "physical", "iccid": "8901280000000000001" },
    { "zip": "33101", "port_in": { "number": "+13055550188", "account_number": "123456789",
      "transfer_pin": "1234", "zip": "33101", "street": "100 Biscayne Blvd", "city": "Miami",
      "first_name": "Jo", "last_name": "Rivera" } }
  ]
}
```

The order is accepted straight away (`202`) and the lines are set up in the background:

```json
{
  "id": "ord_5Kd9Qw",
  "state": "processing",
  "lines": [
    { "id": "ln_8Hq2cV3k", "state": "pending" },
    { "id": "ln_2Rt7pLx0", "state": "pending" },
    { "id": "ln_7Vn3cQe4", "state": "port_pending" }
  ]
}
```

New numbers are usually ready within minutes. A port-in waits until the current carrier
releases the number. Follow progress with the `line.active` webhook or by polling the order.

## Activating abroad

Our lines are US lines. To set one up on a device that is outside the US, order it with
`"roaming": "activation"`. Activation abroad works in most countries; India is not supported yet,
so [talk to us](https://cal.com/delbert-ty-jabegr/30min) if your devices are there. The line then gets a short roaming pass, just long enough to
install the eSIM and register the number with iMessage and FaceTime.

```json
{ "lines": [ { "zip": "33101", "roaming": "activation" } ] }
```

- **Only for activation.** Roaming is not for using the line abroad day to day. It turns off by
  itself 2 hours after the eSIM is installed (the window may be shorter for some accounts), and
  23 hours after the line went active at the latest. After that the line has no cellular service outside the US; iMessage keeps working
  over Wi-Fi.
- **A small allowance.** The pass includes a little data (10 MB), enough to activate. Calls and
  texts work while it is on.
- **Cost.** $1 per activation request, on top of the line's monthly fee.
- **Turned on per account.** Ask us to enable roaming for your account first; otherwise the
  order fails with `403 roaming_unavailable`.

The line shows `roaming.state` (`requested`, `on`, `off` or `failed`) with `on_at`, `off_by`
and `off_at`, and you get `line.roaming_on` and `line.roaming_off` webhooks. If the network
could not add the pass, you get `line.roaming_failed` and the line stays active without
roaming.

## Get an order

```http
GET /v1/gather/lines/order/id?id={order_id}
```

The order and its lines. The order is `completed` when every line is `active` or `failed`.

## The line object

```json
{
  "id": "ln_8Hq2cV3k",
  "order_id": "ord_5Kd9Qw",
  "number": "+13055550142",
  "area_code": "305",
  "state": "active",
  "sim": "esim",
  "esim": { "status": "ready", "url": "/v1/gather/lines/esim/id?id=ln_8Hq2cV3k" },
  "activated_at": "2026-10-01T10:05:40Z",
  "metadata": {}
}
```

`number` and `area_code` are set once the line is `active`. For a physical SIM, `iccid` is
returned instead of `esim`.

## List lines

```http
GET /v1/gather/lines/number/list
```

Your lines, newest first. Filter with `state`, `area_code`, `order_id` or
`metadata[key]=value`. Lists use cursor pagination with `limit` (max 100) and
`starting_after`.

## Get a line

```http
GET /v1/gather/lines/number/id?id={line_id}
```

## Change a line's number

```http
POST /v1/gather/lines/number/change?id={line_id}
```

Gives an `active` line a new number on the same SIM: nothing to reinstall, and the eSIM or
physical SIM keeps working. The network assigns the new number, so you cannot choose its area
code. To pick an area code, order a new line instead.

The call is accepted straight away (`202`, with `number_change_requested_at`) and the line keeps
its old number until the network confirms the change, usually within minutes. Then `number` and
`area_code` update and `line.number_changed` is sent, with the old number in `previous_number`.
If the change fails, the line keeps its number and `line.number_change_failed` is sent. A line
cannot be released while its number is changing. Honours `Idempotency-Key`; asking again while a
change is under way returns the line as it is.

## Move a line to another SIM card

```http
POST /v1/gather/lines/sim/change?id={line_id}
```

```json
{ "iccid": "8901280000000000002" }
```

Moves an `active` line to one of your physical SIM cards and keeps its number, for a lost or
damaged card, or to move an eSIM line onto a physical card. Put the new card in the device; the
old card (or eSIM) stops working once the move completes and is never used again. An eSIM line
becomes a physical SIM line: `sim` reads `physical` and `esim` is gone. The new `iccid` must be one of the cards we shipped you
that is not in use (`409 iccid_unavailable` otherwise).

The call is accepted straight away (`202`, with `sim_change_requested_at`) and the line stays on
its old card until the network confirms the move, usually within minutes. Then `iccid` updates
and `line.sim_changed` is sent, with the old card in `previous_iccid`. If the move fails, the line
stays on its card, the new card is free again and `line.sim_change_failed` is sent. A line cannot
be released while it is moving. Honours `Idempotency-Key`; asking again for the same card while a
move is under way returns the line as it is.

## Port a number out

```http
POST /v1/gather/lines/number/portout?id={line_id}
```

Returns the `account_number` and `transfer_pin` your new carrier needs. The line keeps working
until the port completes, then it is released.

## Release a line

```http
DELETE /v1/gather/lines/number/id?id={line_id}
```

Disconnects the line. The call is accepted straight away (`202`, with `release_requested_at`) and
billing stops from then. The line becomes `released`, and `line.released` is sent, once the network
confirms the disconnect, usually within minutes.

The same call cancels a line that is still `pending` or `port_pending`: its order on the network
is cancelled (a port-in with it) and the line becomes `released` without ever going `active`, so it
is never billed. If the network finishes setting the line up before the cancel lands, the line is
disconnected instead, with the same result.

If new orders are paused for billing, `order/create` fails with `402 billing_hold` and your
existing lines keep working. See [Billing](/docs/billing).
