Gather Gather Lines Sign in Get started

Endpoints

SIMs

eSIM activation codes and physical SIMs.

Get the eSIM payload

GET /v1/gather/lines/esim/id?id={line_id}

Available once the line is active and until the eSIM is installed. The lpa_code is the standard activation code, so you can render it as a QR code if you install by scanning.

{
  "lpa_code": "LPA:1$smdp.example.net$K2-4Z7Q-19XVTP",
  "smdp_address": "smdp.example.net",
  "matching_id": "K2-4Z7Q-19XVTP",
  "status": "ready"
}

Caution. Treat the lpa_code like a password. Anyone who has it can install the line.

Know when it is installed

esim.status is ready until a device downloads the eSIM, then installed. We check the network for the download, so the change shows up within about 10 minutes of the install (less often for an eSIM that has waited more than 3 days). At the same moment the line gets its iccid and we send an esim.installed webhook. An eSIM line's iccid stays empty until then. After a reissue the new eSIM is ready again and its install is found the same way.

In sandbox an eSIM reads as installed about a minute after its line goes active.

Reissue

POST /v1/gather/lines/esim/reissue?id={line_id}

Lost a device or wiped the eSIM? A reissue gives the same number a new eSIM and voids the old one.

Send an Idempotency-Key header. On a live line the network takes about a minute, so the call returns 202 with esim.status reissuing and no code yet. When it is done you get esim.reissued and esim/id returns the new code. If it fails you get esim.reissue_failed and the line keeps its current eSIM. Asking again while a reissue is under way returns 202 without starting another. In sandbox the call returns 200 with the new eSIM at once.

Moving the line to a phone that is outside the US? Send {"roaming": "activation"} as the body. Once the line has its new eSIM it gets the same short roaming pass as a line ordered for activation abroad, so the new phone can install the eSIM and register the number. The pass is $1 and needs roaming turned on for your account (otherwise 403 roaming_unavailable).

{ "roaming": "activation" }

A reissue without roaming is free. 503 reissue_unavailable means the network cannot do it right now, or the line has another change in progress (a number or SIM change, roaming). Retry later with the same Idempotency-Key.

To give a line a new number without reinstalling its eSIM, use number/change instead.

Open a short roaming window

POST /v1/gather/lines/number/roaming-window?id={line_id}

A phone abroad that already has the line's eSIM but shows no network? Turning roaming on for a few minutes often lets it latch on, with no new eSIM. This adds the same $1 roaming pass as a reissue with roaming, then turns roaming off again on its own.

Send an Idempotency-Key header. The body is optional: minutes is how long roaming stays on, from 5 to 120 (30 if you leave it out). Anything else is 422 invalid_request.

{ "minutes": 30 }

The call returns 202 with the line, its roaming showing mode window, state requested and your minutes. Once the pass is live you get line.roaming_on with off_by, the time roaming goes off, then line.roaming_off once it has. If the pass cannot be added (a declined card included) you get line.roaming_failed and the line carries on as before. Asking again while a window is open returns the line as it is, with no second pass.

Each window buys a 1-day pass, so a line gets one paid window per 24 hours. Asking again within 24 hours of the last pass returns 409 roaming_window_cooldown with retry_after, the time you can open the next one.

It needs roaming turned on for your account (otherwise 403 roaming_unavailable) and an active line on an eSIM: a suspended line, a line being released or a physical SIM is 422 invalid_request. 409 line_busy means the line has another change in progress (an eSIM reissue, a number or SIM change, a suspend or resume, roaming); retry once it finishes.

Physical SIMs

We ship you physical SIM cards in bulk, for example a few months of supply at a time. A card does nothing until you order a line with its iccid, so keep them in stock and activate them as you need. Order more from your account contact; delivery takes a few weeks, so plan ahead.

1# SIMs
2
3> eSIM activation codes and physical SIMs.
4
5## Get the eSIM payload
6
7```http
8GET /v1/gather/lines/esim/id?id={line_id}
9```
10
11Available once the line is `active` and until the eSIM is installed. The `lpa_code` is the
12standard activation code, so you can render it as a QR code if you install by scanning.
13
14```json
15{
16 "lpa_code": "LPA:1$smdp.example.net$K2-4Z7Q-19XVTP",
17 "smdp_address": "smdp.example.net",
18 "matching_id": "K2-4Z7Q-19XVTP",
19 "status": "ready"
20}
21```
22
23> **CAUTION** Treat the `lpa_code` like a password. Anyone who has it can install the line.
24
25## Know when it is installed
26
27`esim.status` is `ready` until a device downloads the eSIM, then `installed`. We check the
28network for the download, so the change shows up within about 10 minutes of the install (less
29often for an eSIM that has waited more than 3 days). At the same moment the line gets its
30`iccid` and we send an `esim.installed` webhook. An eSIM line's `iccid` stays empty until then.
31After a reissue the new eSIM is `ready` again and its install is found the same way.
32
33In sandbox an eSIM reads as installed about a minute after its line goes `active`.
34
35## Reissue
36
37```http
38POST /v1/gather/lines/esim/reissue?id={line_id}
39```
40
41Lost a device or wiped the eSIM? A reissue gives the same number a new eSIM and voids the
42old one.
43
44Send an `Idempotency-Key` header. On a live line the network takes about a minute, so the call
45returns `202` with `esim.status` `reissuing` and no code yet. When it is done you get
46`esim.reissued` and [`esim/id`](#get-the-esim-payload) returns the new code. If it fails you get
47`esim.reissue_failed` and the line keeps its current eSIM. Asking again while a reissue is under way
48returns `202` without starting another. In sandbox the call returns `200` with the new eSIM at once.
49
50Moving the line to a phone that is outside the US? Send `{"roaming": "activation"}` as the body.
51Once the line has its new eSIM it gets the same short roaming pass as a line
52[ordered for activation abroad](/docs/numbers#activating-abroad), so the new phone can install
53the eSIM and register the number. The pass is $1 and needs roaming turned on for your account
54(otherwise `403 roaming_unavailable`).
55
56```json
57{ "roaming": "activation" }
58```
59
60A reissue without roaming is free. `503 reissue_unavailable` means the network cannot do it right now, or the line
61has another change in progress (a number or SIM change, roaming). Retry later with the same
62`Idempotency-Key`.
63
64To give a line a new number without reinstalling its eSIM, use
65[`number/change`](/docs/numbers#change-a-lines-number) instead.
66
67## Open a short roaming window
68
69```http
70POST /v1/gather/lines/number/roaming-window?id={line_id}
71```
72
73A phone abroad that already has the line's eSIM but shows no network? Turning roaming on for a
74few minutes often lets it latch on, with no new eSIM. This adds the same $1 roaming pass as a
75[reissue with roaming](#reissue), then turns roaming off again on its own.
76
77Send an `Idempotency-Key` header. The body is optional: `minutes` is how long roaming stays on,
78from 5 to 120 (30 if you leave it out). Anything else is `422 invalid_request`.
79
80```json
81{ "minutes": 30 }
82```
83
84The call returns `202` with the line, its `roaming` showing `mode` `window`, `state` `requested`
85and your `minutes`. Once the pass is live you get `line.roaming_on` with `off_by`, the time
86roaming goes off, then `line.roaming_off` once it has. If the pass cannot be added (a declined
87card included) you get `line.roaming_failed` and the line carries on as before. Asking again
88while a window is open returns the line as it is, with no second pass.
89
90Each window buys a 1-day pass, so a line gets one paid window per 24 hours. Asking again within 24
91hours of the last pass returns `409 roaming_window_cooldown` with `retry_after`, the time you can
92open the next one.
93
94It needs roaming turned on for your account (otherwise `403 roaming_unavailable`) and an active
95line on an eSIM: a suspended line, a line being released or a physical SIM is
96`422 invalid_request`. `409 line_busy` means the line has another change in progress (an eSIM
97reissue, a number or SIM change, a suspend or resume, roaming); retry once it finishes.
98
99## Physical SIMs
100
101We ship you physical SIM cards in bulk, for example a few months of supply at a time. A card
102does nothing until you order a line with its `iccid`, so keep them in stock and activate them
103as you need. Order more from your account contact; delivery takes a few weeks, so plan ahead.
104
$ curl -s https://lines.gatherat.ai/docs/esim.md
200 OK · text/markdown; charset=utf-8 · 4,491 bytes
# SIMs > eSIM activation codes and physical SIMs. ## Get the eSIM payload ```http GET /v1/gather/lines/esim/id?id={line_id} ``` Available once the line is `active` and until the eSIM is installed. The `lpa_code` is the standard activation code, so you can render it as a QR code if you install by scanning. ```json …