curl --request POST \
--url https://api.goyappr.com/carrier-accounts/{id}/numbers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"number": "+972501234567",
"friendly_name": "<string>",
"outbound_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.goyappr.com/carrier-accounts/{id}/numbers"
payload = {
"number": "+972501234567",
"friendly_name": "<string>",
"outbound_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
number: '+972501234567',
friendly_name: '<string>',
outbound_agent_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.goyappr.com/carrier-accounts/{id}/numbers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.goyappr.com/carrier-accounts/{id}/numbers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'number' => '+972501234567',
'friendly_name' => '<string>',
'outbound_agent_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.goyappr.com/carrier-accounts/{id}/numbers"
payload := strings.NewReader("{\n \"number\": \"+972501234567\",\n \"friendly_name\": \"<string>\",\n \"outbound_agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.goyappr.com/carrier-accounts/{id}/numbers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"number\": \"+972501234567\",\n \"friendly_name\": \"<string>\",\n \"outbound_agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goyappr.com/carrier-accounts/{id}/numbers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"number\": \"+972501234567\",\n \"friendly_name\": \"<string>\",\n \"outbound_agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"number": "+972551234567",
"friendly_name": "<string>",
"provider": "telnyx",
"status": "active",
"is_active": true,
"inbound_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outbound_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"inbound_split": {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"percent": 50
},
"outbound_split": {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"percent": 50
},
"sip_inbound_configured": true,
"sip_outbound_configured": true,
"country_code": "<string>",
"monthly_cost": 123,
"rent": {
"included": true,
"reason": "own_carrier",
"monthly_price_cents": 123,
"last_charged_at": "2023-11-07T05:31:56Z"
},
"next_renewal_at": "2023-11-07T05:31:56Z",
"scheduled_release_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"phone_system": {
"sip_endpoint_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sip_endpoint_name": "<string>"
},
"carrier_account": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"provider": "telnyx",
"status": "untested"
},
"carrier_state": {
"state": "ready",
"telnyx_status": "<string>",
"current_connection_name": "<string>",
"previous_connection_name": "<string>",
"blockers": [
"forwarding_always"
],
"notes": [
"number_recording"
],
"removed_at": "2023-11-07T05:31:56Z"
},
"ownership_verified_at": "2023-11-07T05:31:56Z"
}
}{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"number": "+972551234567",
"friendly_name": "<string>",
"provider": "telnyx",
"status": "active",
"is_active": true,
"inbound_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outbound_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"inbound_split": {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"percent": 50
},
"outbound_split": {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"percent": 50
},
"sip_inbound_configured": true,
"sip_outbound_configured": true,
"country_code": "<string>",
"monthly_cost": 123,
"rent": {
"included": true,
"reason": "own_carrier",
"monthly_price_cents": 123,
"last_charged_at": "2023-11-07T05:31:56Z"
},
"next_renewal_at": "2023-11-07T05:31:56Z",
"scheduled_release_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"phone_system": {
"sip_endpoint_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sip_endpoint_name": "<string>"
},
"carrier_account": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"provider": "telnyx",
"status": "untested"
},
"carrier_state": {
"state": "ready",
"telnyx_status": "<string>",
"current_connection_name": "<string>",
"previous_connection_name": "<string>",
"blockers": [
"forwarding_always"
],
"notes": [
"number_recording"
],
"removed_at": "2023-11-07T05:31:56Z"
},
"ownership_verified_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "Calling out through your own Telnyx account is switched off for this workspace. Contact Yappr support.",
"code": "CARRIER_ACCOUNTS_NOT_ENABLED",
"enabled": false
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}Add Number to Carrier Account
Add a number you own in the connected Telnyx account. Yappr asks Telnyx, with
your 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:
use it as from on POST /calls, as a campaign’s
number, or as an agent’s outbound number. Requires carrier_accounts:manage.
Limit: 50 per workspace per day.
Add back. A number this workspace removed is added back the same way. If
the workspace still holds it as removed (a sync found it gone from Telnyx, or a
disconnect kept it for its call history), it is taken back in place on this
account and the answer is 200 with the same number: its history, name and
agents stay, and a name or agent you send replaces its own. It comes back
switched on, unless someone in your workspace had switched it off (it stays
off) or this account is paused (Turn back on switches it on). A number you
removed with Remove a number
has no row left here (only its record in removed_numbers), so it is added again (201), and the next sync that
finds it in this workspace stops skipping it, unless another workspace has taken
it since: then the answer is 409 NUMBER_ALREADY_REGISTERED until that
workspace removes it.
curl --request POST \
--url https://api.goyappr.com/carrier-accounts/{id}/numbers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"number": "+972501234567",
"friendly_name": "<string>",
"outbound_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.goyappr.com/carrier-accounts/{id}/numbers"
payload = {
"number": "+972501234567",
"friendly_name": "<string>",
"outbound_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
number: '+972501234567',
friendly_name: '<string>',
outbound_agent_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.goyappr.com/carrier-accounts/{id}/numbers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.goyappr.com/carrier-accounts/{id}/numbers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'number' => '+972501234567',
'friendly_name' => '<string>',
'outbound_agent_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.goyappr.com/carrier-accounts/{id}/numbers"
payload := strings.NewReader("{\n \"number\": \"+972501234567\",\n \"friendly_name\": \"<string>\",\n \"outbound_agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.goyappr.com/carrier-accounts/{id}/numbers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"number\": \"+972501234567\",\n \"friendly_name\": \"<string>\",\n \"outbound_agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goyappr.com/carrier-accounts/{id}/numbers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"number\": \"+972501234567\",\n \"friendly_name\": \"<string>\",\n \"outbound_agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"number": "+972551234567",
"friendly_name": "<string>",
"provider": "telnyx",
"status": "active",
"is_active": true,
"inbound_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outbound_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"inbound_split": {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"percent": 50
},
"outbound_split": {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"percent": 50
},
"sip_inbound_configured": true,
"sip_outbound_configured": true,
"country_code": "<string>",
"monthly_cost": 123,
"rent": {
"included": true,
"reason": "own_carrier",
"monthly_price_cents": 123,
"last_charged_at": "2023-11-07T05:31:56Z"
},
"next_renewal_at": "2023-11-07T05:31:56Z",
"scheduled_release_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"phone_system": {
"sip_endpoint_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sip_endpoint_name": "<string>"
},
"carrier_account": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"provider": "telnyx",
"status": "untested"
},
"carrier_state": {
"state": "ready",
"telnyx_status": "<string>",
"current_connection_name": "<string>",
"previous_connection_name": "<string>",
"blockers": [
"forwarding_always"
],
"notes": [
"number_recording"
],
"removed_at": "2023-11-07T05:31:56Z"
},
"ownership_verified_at": "2023-11-07T05:31:56Z"
}
}{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"number": "+972551234567",
"friendly_name": "<string>",
"provider": "telnyx",
"status": "active",
"is_active": true,
"inbound_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outbound_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"inbound_split": {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"percent": 50
},
"outbound_split": {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"percent": 50
},
"sip_inbound_configured": true,
"sip_outbound_configured": true,
"country_code": "<string>",
"monthly_cost": 123,
"rent": {
"included": true,
"reason": "own_carrier",
"monthly_price_cents": 123,
"last_charged_at": "2023-11-07T05:31:56Z"
},
"next_renewal_at": "2023-11-07T05:31:56Z",
"scheduled_release_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"phone_system": {
"sip_endpoint_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sip_endpoint_name": "<string>"
},
"carrier_account": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"provider": "telnyx",
"status": "untested"
},
"carrier_state": {
"state": "ready",
"telnyx_status": "<string>",
"current_connection_name": "<string>",
"previous_connection_name": "<string>",
"blockers": [
"forwarding_always"
],
"notes": [
"number_recording"
],
"removed_at": "2023-11-07T05:31:56Z"
},
"ownership_verified_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "Calling out through your own Telnyx account is switched off for this workspace. Contact Yappr support.",
"code": "CARRIER_ACCOUNTS_NOT_ENABLED",
"enabled": false
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}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.
curl -X POST https://api.goyappr.com/carrier-accounts/7c1e…/numbers \
-H "Authorization: Bearer ypr_live_..." \
-H "Content-Type: application/json" \
-d '{
"number": "+972501234567",
"friendly_name": "Sales line",
"outbound_agent_id": "5b0f…"
}'
{
"data": {
"id": "e2a4…",
"number": "+972501234567",
"friendly_name": "Sales line",
"provider": "external",
"status": "active",
"is_active": true,
"inbound_agent_id": null,
"outbound_agent_id": "5b0f…",
"sip_inbound_configured": false,
"sip_outbound_configured": true,
"country_code": "IL",
"monthly_cost": null,
"created_at": "2026-09-23T10:02:00Z",
"carrier_account": { "id": "7c1e…", "name": "Main Telnyx account", "provider": "telnyx", "status": "untested" },
"ownership_verified_at": "2026-09-23T10:02:00Z"
}
}
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. Settinginbound_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 is409 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
| Status | code | Meaning |
|---|---|---|
| 400 | INVALID_NUMBER | Not E.164. +972 numbers are +972 followed by 8 or 9 digits. |
| 400 | INVALID_AGENT | outbound_agent_id is not an id. |
| 404 | AGENT_NOT_FOUND | outbound_agent_id is not an agent in this workspace — it does not exist, belongs to another workspace, or has been archived. The message names the field. It used to answer 400 INVALID_AGENT. |
| 400 | INVALID_NAME, INVALID_JSON | Fix the field named in error. |
| 403 | CARRIER_ACCOUNTS_NOT_ENABLED | Yappr has switched carrier accounts off for this workspace. Contact Yappr support. |
| 404 | CARRIER_ACCOUNT_NOT_FOUND | Not in this workspace. |
| 409 | CONNECTION_REQUIRED | Choose the Call Control App first. |
| 409 | NUMBER_ALREADY_REGISTERED | The number is in use in Yappr, or held by a lapsed claim still in use there. |
| 422 | NUMBER_NOT_IN_YOUR_TELNYX_ACCOUNT | Telnyx does not list it as an active number in your account. Nothing was added. |
| 422 | TELNYX_KEY_REJECTED | Telnyx refused the saved key. |
| 429 | RATE_LIMITED | 50 numbers added in this workspace today. |
| 503 | TELNYX_UNAVAILABLE, OWNERSHIP_CHECK_UNAVAILABLE | Telnyx did not answer. Nothing was added. |
Authorizations
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).