Worked sequences
The endpoint list below documents each operation with its parameters, but the two flows that integrate against this surface — renting a number and porting one in — span several calls, and their response bodies are what you branch on. These two sequences show every call in order with the body each one returns.Sequence 1 — rent a number
Go from inventory search to an active, capability-checked number in three calls. Step 1 — search inventory. Filter by country, line type, capability, and area code. Each result carries the per-number capability list and monthly price, so you can filter before you buy.200
For a regulated country (most of the EU/EEA, GB, and several others), run
GET /api/v1/numbers/regulatory-preview?country… before this step — it
returns the documents and data fields the carrier requires, and whether a
compliance profile you already hold satisfies them.201 body
returns the owned-number record — save the id, because every follow-up
operation (configure, suspend, release) addresses the number by it. Billing
starts immediately.
201
id
to confirm it is active and that the capabilities you ordered are the ones
the carrier actually provisioned — a regulated country can hold the number at
pending_compliance until the required documents clear.
200
Sequence 2 — port a number in
Move an existing number from a losing carrier onto the platform. A full port runseligibility check → LOA upload → submit → poll status; the check step
is optional but cheap, and it turns a multi-day carrier rejection into an
instant answer.
Step 1 — check eligibility (recommended). Run a live pre-flight against
the losing carrier’s database. The response tells you in seconds whether the
number can port; US and Canadian numbers are checked live, other countries
return check-not-supported and proceed straight to submission.
200
201 body
returns the request id and the starting status — porting requests move
submitted → reviewing → approved → completed, with rejected as the
carrier-declined terminal state. Branch on these values; there is no
pending state.
201
recommendedAction when the port is waiting on you (for example, a
supplement on a rejection). Porting typically takes 7–14 business days
depending on the country and carrier — subscribe to the number.ported
webhook instead of polling once you are past submission.
200
completed, the numbers appear in your
GET /api/v1/numbers/ inventory as active.
Error samples
Two purchase-time rejections account for most failed buys; both return the standard error envelope with a stablecode you can branch on.
Regulated country without a compliance profile — buying a number in a
country that requires verified end-user documents before the carrier will
activate it:
422
compliance_profile_id on the retry. No billing happens on this rejection —
your balance is untouched.
Number already owned — the number sold between your search and your
purchase, or is already on an account:
409