Phone numbers
A phone number is the voice line your agents answer and call from. Each number belongs to exactly one workspace and is bound to one agent: calls to the number reach that agent, and calls the agent places show that number as caller ID. You can get a number three ways: buy one through Jelliu, connect a number you already own over your SIP trunk, or keep your existing line and forward its calls to a Jelliu number.
The Phone Numbers API lets you browse available inventory, provision numbers, connect your own, change which agent answers, configure a phone menu, and get the dialing codes to forward a line.
How it works
Getting a number
Inbound calls. The number you call is the routing key: it identifies the workspace and the agent. Before an agent answers, Jelliu checks that the workspace is not suspended, that a trialing workspace still has trial minutes, and that a concurrent-call slot is free. If the workspace is suspended or out of trial minutes, the caller hears a short message and the call ends; if every slot is busy, the caller is told that all agents are busy.
- If the number has an agent, that agent answers. If that agent is paused, the call is not handed to a different agent.
- If the phone menu is enabled, the caller hears the greeting and the options, and has 10 seconds to press one digit. The option’s agent answers; if it is unavailable, Jelliu tries the option’s department, then another agent in the workspace.
Outbound calls. When an agent places a call, the caller ID is the workspace’s active number bound to that agent, or otherwise its most recently updated active number. See Calls.
A workspace on an active paid plan with no active, registered number cannot place calls: they fail with 403 PHONE_NUMBER_REQUIRED. Provision or connect a number before starting a voice campaign.
The phone number object
Returned by every endpoint on this page except GET /available and GET /{id}/forwarding-instructions.
Endpoints
GET /api/phone-numbers returns every number in the workspace, oldest first, in { "data": [ ... ] }. It takes no paging parameters.
The API has no endpoint to release or delete a number.
Common tasks
Buy a number
Browse available numbers
Search the inventory for a country. Nothing is bought.
ISO 3166-1 alpha-2 code, case-insensitive. Must be a country where Jelliu can provision numbers (see Countries).
local, mobile or tollfree. When omitted, all three types are searched and combined.
Three-digit area code. Applied only in the US and Canada; ignored elsewhere.
Pattern the number must contain: 1 to 15 digits, letters or *.
1 to 30. Applies per type, so a search without type can return up to three times this many numbers.
Only voice-capable numbers are returned. A country with no stock of the requested type returns an empty list. addressRequired: true means the number is subject to a local regulatory address requirement.
Provision it for an agent
Buy the number and bind the agent that answers it. The agent must belong to your workspace and have finished provisioning.
The response is 201 Created with the phone number object in data.
The agent that answers the number.
US or CA. Any other serviceable country returns 402 BILLING_ERROR: numbers elsewhere are paid add-ons bought under Settings → Plan.
Exact E.164 number to buy, taken from GET /available. Without it, Jelliu picks the first available number, trying local and then mobile.
Three-digit area code to prefer when Jelliu picks the number.
local, mobile or tollfree when Jelliu picks the number.
1 to 120 characters.
Provisioning is safe to retry. If the agent already has an active number, the request buys nothing and returns that number with 201, even if you pass a different country or phoneNumber. A second request for the same agent while the first is still running returns 409 CALL_ALREADY_IN_PROGRESS.
If registering the number or binding the agent fails after the number was bought, Jelliu releases the number and the request fails, so a failed request does not leave a half-configured number in your workspace.
Assign or change the agent
Send only the fields you want to change. null clears a nullable field; an omitted field is left untouched.
The response is 200 with the updated number in data. Changes apply to the next call.
The agent that answers. It must serve every channel in the number’s channels: a WhatsApp line needs an agent that answers WhatsApp. null unassigns the agent.
Up to 120 characters.
Deactivate or reactivate the number.
Turn the phone menu on or off. See Configure a phone menu.
Up to 1000 characters.
Up to 20 options with unique digits. [] clears the menu.
If a number is currently answered by an agent that was configured outside Jelliu, assigning a different agent returns 409 VALIDATION_FAILED so the line is not taken over by accident. Send { "agentId": null } first, then assign the new agent.
Numbers bought as plan add-ons arrive with agentId: null. Assigning an agent is what registers them for voice, so do it before you rely on the number.
Configure a phone menu
A phone menu lets callers choose where their call goes. Each option routes to a specific agent or to a department; when a department is given, the oldest available agent in that department answers.
Each option in ivrOptions:
The phone menu exists only on numbers bought through Jelliu (provider: "twilio"). Enabling it on a number connected over your SIP trunk, or on a WhatsApp-only line, returns 400 VALIDATION_FAILED. A menu also needs at least one option: ivrEnabled: true with no options is refused.
Connect a number you already own
Bring your number over your SIP trunk. Give inbound so the agent answers calls on the number, outbound so it can call from it, or both.
The response is 201 Created with the number in data, provider: "sip_trunk" and sipHost set to the outbound address.
Top-level fields
inbound: must include allowedAddresses or credentials, so the trunk does not accept calls from anyone.
outbound
Trunk credentials are passed to the voice platform and are not stored by Jelliu. The only trunk detail kept is sipHost, so you can see where the number lives.
If the number is already your workspace’s WhatsApp line, connecting it over SIP adds voice to that same number instead of failing as a duplicate. Because one number is answered by one agent, the agent must serve both voice and WhatsApp; otherwise the request returns 400 VALIDATION_FAILED.
Unknown fields in the body are ignored rather than rejected. Double-check field names such as allowedAddresses and enabledCodecs: a misspelled one is dropped silently.
Forward an existing line
If your business line cannot connect over SIP, forward it to a Jelliu number. Fetch the dialing codes for that number; they are standard mobile call-forwarding codes, dialed from the phone the line is on.
notes is written for the person dialing the code: in Spanish when Accept-Language starts with es, in English otherwise. The codes are the same in both.
The number must be a voice number, have an agent assigned and be active; otherwise the request returns 400 VALIDATION_FAILED.
Countries
Numbers can be searched and bought in these countries:
Any other country code returns 400 VALIDATION_FAILED with the list of available countries in the message.
- Plan-included number (
POST /provision):USandCAonly. - Add-on numbers (dashboard, Settings → Plan): any country above, priced by country.
- Connected numbers (
POST /connect-sip): not limited by this list; any E.164 number your trunk carries.
Some countries sell mostly mobile numbers, which is why provisioning without type falls back from local to mobile.
Errors
Every error uses the standard error envelope. Validation failures on these endpoints return details as a field map (formErrors, fieldErrors).
5xx responses carry the generic message Internal server error, including TELEPHONY_ERROR for a number that needs regulatory documents. If a purchase in a specific country keeps failing with 502, try another type or number, or contact support.
Limits
Rate limits. All /api/phone-numbers routes use the general API limit for your plan.
Scopes. Reads need a read key, PATCH needs write, and provision and connect-sip need full because they spend money or register numbers. See Authentication.
Numbers per plan. The limit counts active voice numbers: purchased and connected numbers alike. Inactive numbers and WhatsApp-only lines do not count.
On Starter, Growth and Business, the plan includes one number. Each additional purchased number is a paid add-on, so POST /provision can only buy a number while the workspace holds fewer than 1 plus its paid add-ons. On Enterprise the plan limit applies directly. Connecting your own number over SIP needs no add-on: it is limited only by the plan’s number limit.
Webhooks
There are no phone-number events. Calls answered on or placed from your numbers are reported with the call events, call.completed and call.failed. See Webhooks and Calls.

