Developers · Preview
An API that behaves like software, not a carrier.
Plain REST and JSON. Idempotent writes. One signed webhook when the work is done. Full reference docs and keys are shared with partners during onboarding.
How it works
Accepted now. Confirmed when it's real.
Carriers don't finish work instantly, so neither do we pretend to. A change returns 202 Accepted immediately, and a webhook follows when the carrier confirms it.
- Idempotency keys on every writeSend the same request twice and get the same result — never two lines.
- One change per line at a timeA second change while one is pending is refused with a clear error.
- Server-side keys onlySecret keys per partner, scoped to your own lines. Never ship them to a browser.
POST /v1/lines/ln_7Hq2kR/suspend
Idempotency-Key: invoice_5512_overdue
// 202 Accepted — the carrier is working on it
{
"id": "req_91Fa",
"object": "request",
"operation": "suspend",
"status": "pending"
}Webhooks
One event per change. Exactly what happened.
Carrier systems repeat themselves and sometimes contradict themselves. We deduplicate, reconcile and send you one signed event with a clear outcome.
- Signed with your secretVerify the signature and timestamp before acting on any event. Failed deliveries are retried for about a day; we never follow redirects.
- Three honest outcomes
succeeded(aline.*event),request.failed, orrequest.needs_reviewwhen a carrier's answer can't be trusted as-is.
# Every event is signed. Verify before you trust it.
# v1 = hex HMAC-SHA256(secret, t + "." + raw body); reject a t older than 5 min
CarrierLayer-Signature: t=1792200000,v1=5f2b…c9e1
CarrierLayer-Event-Id: evt_3kV9
{
"id": "evt_3kV9",
"object": "event",
"type": "line.suspended",
"line": "ln_7Hq2kR",
"request": "req_91Fa",
"data": { "request": {
"id": "req_91Fa", "operation": "suspend",
"status": "succeeded", …
} },
"created_at": "2026-10-16T18:20:00.000Z"
}Endpoints
The API at a glance.
The core resources in the developer preview. Partners receive the full reference, including request and response schemas, during onboarding.
| Endpoint | What it does |
|---|---|
POST/v1/lines | Activate a line — eSIM or physical SIM |
GET/v1/lines | List lines, filtered by status or customer |
GET/v1/lines/{id} | A line's current state and network |
POST/v1/lines/{id}/suspend | Suspend service |
POST/v1/lines/{id}/restore | Restore a suspended line |
POST/v1/lines/{id}/plan | Change plan |
POST/v1/lines/{id}/network | Set the primary network (multi-network SIMs) |
POST/v1/lines/{id}/swap | Swap SIM or device |
POST/v1/lines/{id}/sms | Send an SMS to the device |
GET/v1/lines/{id}/esim | eSIM QR code and install status |
GET/v1/usage | Data usage by line and billing cycle |
GET/v1/requests/{id} | Status of a write: pending, succeeded, failed, needs_review |
GET/v1/events | Events for your lines, filtered by type |
Sandbox
Test every outcome before you go live.
Test keys run against a simulated carrier with fake lines; results arrive a few seconds after the 202. Any ICCID or EID works. To force an outcome, end the ICCID or EID with one of these digits. Sandbox eSIM QR codes are placeholders, not real eSIMs.
| ICCID or EID ends in | What happens |
|---|---|
…0002 | The request fails with a carrier error (carrier_rejected). You get a request.failed event. |
…0003 | The request ends as needs review (outcome_unconfirmed). You get a request.needs_review event. |
…0004 | The request succeeds. The simulated carrier reports the result twice; you still get exactly one event. |
…0005 | The request stays pending. After about 35 minutes it ends as needs review (outcome_unconfirmed), with a request.needs_review event. |