Skip to main content
POST
Add a number
Add a number you own in the connected Telnyx account. Yappr asks Telnyx, with your API key, whether it is an active number in your account, and adds it only if it is. It becomes a phone number of your workspace with provider: "external", and from then on it works everywhere a number you bought does for outbound: from on POST /calls, a campaign’s number, or the number an outbound agent calls from. Requires carrier_accounts:manage. Choose the Call Control App first.

Outbound only

Calls to the number keep going where they go today in Telnyx. The agent calls out from it but does not answer it. Setting inbound_agent_id on it answers 422 INBOUND_NOT_AVAILABLE_ON_EXTERNAL_NUMBER. To have an agent answer, route the number in Telnyx to a SIP address endpoint (a username-and-password trunk doesn’t work for this: Telnyx doesn’t sign in to one when it routes a call). Leave the number’s own settings in Telnyx as they are.

A number someone else registered

Every number is in Yappr once. If another workspace registered your number but its Telnyx key no longer proves it, Yappr releases that claim and adds the number to you. If it is a number bought from Yappr, or its holder still proves it, the answer is 409 NUMBER_ALREADY_REGISTERED, which does not say where. The same 409 comes back when the lapsed claim is still in use there (a campaign calls from it, or past calls were made from it): that claim is switched off so it can never call, but it is not removed, so the other workspace’s history stays intact. Contact Yappr support to move the number.

Errors

Authorizations

Authorization
string
header
required

Your Yappr API key (e.g. ypr_live_...). Generate one in the dashboard under Settings → API Keys. No key is 401 MISSING_KEY; a key that is not one of ours, or is revoked, is 401 INVALID_KEY; an expired one is 401 EXPIRED_KEY. A valid key without the scope an operation needs is 403 INSUFFICIENT_SCOPE on every operation, and the message names the scope. Every response, a 401 included, carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset: the budget is 60 requests a minute per API key. Every 429, whatever its code, carries Retry-After (whole seconds, never zero): the per-key budget's RATE_LIMIT asks for what is left of the minute, a route's daily cap (RATE_LIMITED) for the time until that cap resets. All four headers are listed in Access-Control-Expose-Headers, so a browser can read them. A path the API does not serve (an unknown sub-path, an id left empty) is 404 ROUTE_NOT_FOUND, and a method a served path does not take is 405 METHOD_NOT_ALLOWED with an Allow header; both are answered before any scope check, and nothing is read or changed. A trailing slash is ignored where it cannot be an id left empty (POST /calls/ is POST /calls) and refused where it can (GET /calls/). A doubled slash inside a path is merged into one before the request reaches the API (GET //calls is GET /calls).

Path Parameters

id
string<uuid>
required

Body

application/json
number
string
required

An active number in the Telnyx account you connected, in E.164 (+972 numbers are 12 or 13 characters). Yappr checks it with your key before adding it.

Example:

"+972501234567"

friendly_name
string | null
Maximum string length: 100
outbound_agent_id
string<uuid> | null

The agent that calls from this number by default.

Response

Added back. This workspace still held the number as removed (a sync found it gone from Telnyx, or a disconnect kept it), and it is taken back in place, with its history, name and agents.

data
object