Numbers

Numbers

A number is a phone line. You need one as your caller ID for outbound calls, and it's the line that inbound calls arrive on. (The Voice Socket needs no number.)

Adding numbers is done in the dashboard. Over the API you can list them and set their default agent.

IDs are UUIDs, no prefix. The num_xxxx/agt_xxxx style below is a shortened placeholder for readability.


Getting a number

Three ways, all set up in the dashboard:

Way What it is
Bring your own A number you already have with a supported provider (e.g. Plivo). Add it with your provider credentials.
Managed A number on our provider account — no credentials of your own.
Rent from us Buy a number in a click, billed to your wallet. Coming soon.

After adding a number, assign it to a product — only then can that product's keys dial from it.


List numbers

GET /v1/numbers · scope numbers:read

curl https://platform.eurekatechlabs.com/v1/numbers -H "Authorization: Bearer ek_live_..."
[
  {
    "id": "5c9e6e2a-1b3d-4e2a-9c1a-7d5e8b9a0c4f",
    "e164": "+918008001234",
    "alias": "Sales line",
    "inHouse": true,
    "providerId": "plivo",
    "defaultAgentId": "9c1f0f5e-2a77-4a1e-9a0c-6f2f1c8b77aa",
    "routingMode": "PLATFORM"
  }
]
Field What
id The number's id.
e164 The phone number.
alias A label you gave it, or null.
inHouse true = our managed account; false = your own provider.
providerId The phone provider.
defaultAgentId The agent that answers inbound calls here, or null.
routingMode PLATFORM (rules + default agent) or WEBHOOK (call answer webhook decides).

Set the default agent or routing mode

PATCH /v1/numbers/{id} · scope numbers:write

curl -X PATCH https://platform.eurekatechlabs.com/v1/numbers/num_xxxxxxxxxxxx \
  -H "Authorization: Bearer ek_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "defaultAgentId": "agt_xxxxxxxxxxxx", "routingMode": "PLATFORM" }'

Send defaultAgentId: null explicitly to clear it — omitting the field entirely leaves the current value untouched. The agent must be in the same product as the number. Set routingMode to WEBHOOK to have your server decide each call via the call answer webhook. For more inbound options, see Inbound calls.


Next