curl --request POST \
--url https://api.goyappr.com/carrier-accounts/{id}/sync \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.goyappr.com/carrier-accounts/{id}/sync"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.goyappr.com/carrier-accounts/{id}/sync', 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}/sync",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.goyappr.com/carrier-accounts/{id}/sync"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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}/sync")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goyappr.com/carrier-accounts/{id}/sync")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"synced_at": "2023-11-07T05:31:56Z",
"complete": true,
"seen": 123,
"added": 123,
"updated": 123,
"removed": 123,
"not_ready": 123,
"held_elsewhere": 123,
"held_elsewhere_numbers": [
"+972501234567"
],
"held_elsewhere_details": [
{
"phone_number": "+972501110000",
"reason": "other_workspace"
}
],
"excluded": [
{
"phone_number": "+972501110001",
"telnyx_number_id": "1293384261075731499"
}
],
"batch": {
"seen": 123,
"added": 123,
"updated": 123,
"unchanged": 123,
"restored": 123,
"removed": 123,
"not_ready": 123,
"skipped_stale": 123,
"invalid": 123,
"dropped": 123,
"missing": 123,
"held_elsewhere": 123,
"excluded": 123
},
"run": {
"seen": 123,
"added": 123,
"updated": 123,
"unchanged": 123,
"restored": 123,
"removed": 123,
"not_ready": 123,
"skipped_stale": 123,
"invalid": 123,
"dropped": 123,
"missing": 123,
"held_elsewhere": 123,
"excluded": 123
},
"numbers": [
{
"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": "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>"
}
]
}Sync Numbers
Reads every number in your Telnyx account with your key and brings each one
into this workspace as an external phone number. Calls out from them work
right away; to have an agent answer calls to one,
configure it. Changes
nothing in your Telnyx account and places no call. Yappr also runs it when you
choose the Call Control App, on every test and Turn back on, and once a day;
call it after you buy, port or release numbers in Telnyx. Requires
carrier_accounts:manage.
Limit: 48 sync runs a day per workspace (continuing a run is free).
- A new number starts able to call if Telnyx lists it as active and the account
is not paused. On a number already here, a sync refreshes only what Telnyx
says (
carrier_state): its name and agents stay as you set them. It switches a number back on only when it switched it off itself (off_until_active, once Telnyx lists it as active again), never one someone in your workspace switched off (off_by_owner); seeis_active. - Numbers Telnyx lists as deleted, ported out, or with a failed purchase or
port are skipped. Any other status than
activeshows asnot_ready. - A number Telnyx no longer lists is marked removed (
carrier_state.stateistelnyx_gone), never deleted: its call history stays. On a large account, read in parts, that happens only once two complete reads in a row miss it. - A number another Yappr workspace already uses is not added; it is counted in
held_elsewhere. - A large account is read in parts:
complete: falsemeans sync again, or let Yappr read the next part within 5 minutes.
curl --request POST \
--url https://api.goyappr.com/carrier-accounts/{id}/sync \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.goyappr.com/carrier-accounts/{id}/sync"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.goyappr.com/carrier-accounts/{id}/sync', 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}/sync",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.goyappr.com/carrier-accounts/{id}/sync"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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}/sync")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goyappr.com/carrier-accounts/{id}/sync")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"synced_at": "2023-11-07T05:31:56Z",
"complete": true,
"seen": 123,
"added": 123,
"updated": 123,
"removed": 123,
"not_ready": 123,
"held_elsewhere": 123,
"held_elsewhere_numbers": [
"+972501234567"
],
"held_elsewhere_details": [
{
"phone_number": "+972501110000",
"reason": "other_workspace"
}
],
"excluded": [
{
"phone_number": "+972501110001",
"telnyx_number_id": "1293384261075731499"
}
],
"batch": {
"seen": 123,
"added": 123,
"updated": 123,
"unchanged": 123,
"restored": 123,
"removed": 123,
"not_ready": 123,
"skipped_stale": 123,
"invalid": 123,
"dropped": 123,
"missing": 123,
"held_elsewhere": 123,
"excluded": 123
},
"run": {
"seen": 123,
"added": 123,
"updated": 123,
"unchanged": 123,
"restored": 123,
"removed": 123,
"not_ready": 123,
"skipped_stale": 123,
"invalid": 123,
"dropped": 123,
"missing": 123,
"held_elsewhere": 123,
"excluded": 123
},
"numbers": [
{
"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": "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". You don’t add numbers one
by one: they appear in GET /phone-numbers and on the
account’s numbers, with the same agent settings as any number. Requires
carrier_accounts:manage.
A sync changes nothing in your Telnyx account and places no call. Yappr runs one when
you choose the Call Control App, on every
test and Turn back on,
and once a day. Call it yourself after you buy, port or release numbers in Telnyx. A
workspace has 48 sync runs a day, whatever starts them; continuing a run already in
progress is free.
To learn whether an account is synced at all — and why not — without running one, read
its sync_status on GET /carrier-accounts/,
or sync on GET /carrier-accounts/status.
curl -X POST https://api.goyappr.com/carrier-accounts/7c1e…/sync \
-H "Authorization: Bearer ypr_live_..."
{
"data": {
"synced_at": "2026-09-27T09:14:02Z",
"complete": true,
"seen": 43,
"added": 40,
"updated": 1,
"removed": 0,
"not_ready": 1,
"held_elsewhere": 1,
"held_elsewhere_numbers": ["+972501110000"],
"held_elsewhere_details": [
{ "phone_number": "+972501110000", "reason": "other_workspace" },
{ "phone_number": "+972501110001", "reason": "own_removed" }
],
"excluded": [{ "phone_number": "+972501110001", "telnyx_number_id": "1293…" }],
"batch": { "seen": 43, "added": 40, "updated": 1, "unchanged": 0, "restored": 0, "removed": 0, "not_ready": 1, "skipped_stale": 0, "invalid": 0, "dropped": 0, "missing": 0, "held_elsewhere": 1, "excluded": 1 },
"run": { "seen": 43, "added": 40, "updated": 1, "unchanged": 0, "restored": 0, "removed": 0, "not_ready": 1, "skipped_stale": 0, "invalid": 0, "dropped": 0, "missing": 0, "held_elsewhere": 1, "excluded": 1 },
"numbers": [
{
"id": "e2a4…",
"number": "+972501234567",
"provider": "external",
"is_active": true,
"inbound_agent_id": null,
"outbound_agent_id": null,
"sip_inbound_configured": false,
"ownership_verified_at": "2026-09-27T09:14:02Z",
"carrier_account": { "id": "7c1e…", "name": "Main Telnyx account", "provider": "telnyx", "status": "active" },
"carrier_state": {
"state": "not_configured",
"telnyx_status": "active",
"current_connection_name": "Office PBX",
"previous_connection_name": null,
"blockers": [],
"notes": ["number_recording"],
"removed_at": null
}
}
]
}
}
What a sync does to each number
| In Telnyx | In Yappr |
|---|---|
| New to Yappr | Added. It can call out right away if Telnyx lists it as active and the account is not paused; otherwise it comes in switched off (is_active: false, see below). Calls to it keep going where they go in Telnyx until you configure it. |
| Already here | Only what Telnyx says is refreshed (carrier_state: its status, its connection, its settings). Its name and its agents stay as you set them. It is switched back on only if the sync itself had switched it off (see below). |
Any status other than active | Shown as not_ready, and switched off (off_until_active, or off_by_owner if someone in your workspace had switched it off): it cannot call, and Yappr does not answer calls to it. |
| Deleted, ported out, or a failed purchase or port | Skipped. |
| No longer listed | Shown as telnyx_gone (since carrier_state.removed_at), never deleted, so its call history stays. On a large account, once two complete reads in a row miss it (see below). It cannot call, and calls to it stop being answered. Remove it once you’re done with it. If it comes back to your account, the next sync lists it again and switches it back on, unless someone in your workspace had switched it off. |
| Already used by another Yappr workspace | Not added: counted in held_elsewhere. |
| Removed from this workspace by you | Skipped, and listed in excluded until you add it back (see below). |
When a number is switched off
A number that cannot call out hasis_active: false, and carrier_state.notes says why.
What switched it off decides what switches it back on:
| Note | Switched off because | Switched back on by |
|---|---|---|
off_until_active | Telnyx does not list it as active (a port still pending, say), it left your account, or the account was disconnected. | The sync switches it back on once Telnyx lists it as active again (on an account that is not paused). Nothing to do. |
off_while_paused | Its carrier account paused. | Turn back on, which switches on these numbers and only these. |
off_by_owner | Someone in your workspace switched it off. | Only someone in your workspace. It stays off: a sync or Turn back on never switches it on. |
ownership_verified_at), so you can
configure any of them and have its
calls answered, whether it is on or off.
A number another workspace uses
A number is in Yappr once. If several workspaces connect the same Telnyx account, a number one of them already has is never taken over by another: the sync counts it inheld_elsewhere and lists it in held_elsewhere_numbers (up to 100, without saying which
workspace has it). It is added here by the first sync after that workspace removes it
(DELETE …/numbers/, which
changes nothing in Telnyx and keeps its call history there). That workspace’s own syncs
then skip it.
held_elsewhere_details says why each number the sync kept out is not here
({phone_number, reason}, never which workspace): the numbers in held_elsewhere_numbers,
then the ones in excluded.
reason | Meaning |
|---|---|
other_workspace | Another workspace uses it. It comes here at the first sync after that workspace removes it. |
own_removed | You removed it from this workspace (it is in excluded). Add it back to bring it back (see Numbers you removed). |
pending_release | Another record holds it until it lets it go: a workspace that disconnected the account and keeps it for its call history, another connection of this workspace, or a number Yappr itself holds. It comes here at the first sync after that record lets it go; there is nothing to do here. |
Numbers you removed
A number you took out with DELETE …/numbers/ is skipped by every sync of this workspace, so another workspace connected to the same Telnyx account can take it. Each sync lists the ones it skipped inexcluded (up to 100). To have
one here again, send POST /carrier-accounts//numbers
with the number: it is added here again (201), and the syncs keep it up to date from then
on — unless another workspace has taken it since: then 409 NUMBER_ALREADY_REGISTERED
until that workspace removes it. A number that left your Telnyx account and came back under
a new Telnyx id is synced as usual.
Large accounts
A sync reads a large account in parts.complete: false means there is more to read:
call sync again, or let Yappr read the next part: it carries on within 5 minutes, where
this one stopped (the counts are the run’s so far, and synced_at is null). An account
with more than 10,000 numbers answers 422 TOO_MANY_NUMBERS.
run and batch hold every count, of the run so far and of the last part, including a few
the top level leaves out: unchanged, restored, missing, dropped, skipped_stale,
invalid and excluded.
Numbers that left your account are marked gone (telnyx_gone) only at the end of a whole
read. Telnyx’s list can shift while a large account is read in parts, so there a number is
marked gone only when two complete reads in a row miss it, and a read during which the list
changed removes nothing.
The account keeps what the last sync found on
GET /carrier-accounts/: last_synced_at, sync
(with in_progress: true while a large account is still being read) and, when it failed,
last_sync_error.
Errors
| Status | code | Meaning |
|---|---|---|
| 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. |
| 422 | TELNYX_KEY_REJECTED | Telnyx refused the saved key. The account pauses (key_rejected) and no number changes. |
| 422 | TELNYX_REFUSED_REQUEST | Telnyx accepted the key but refused to list the numbers. Check the key’s permissions in Telnyx. The account does not pause. |
| 422 | TOO_MANY_NUMBERS | The account holds more than 10,000 numbers. |
| 429 | RATE_LIMITED | 48 sync runs in this workspace today; continuing a run already in progress is free. Retry-After says when the day’s window resets. |
| 500 | INTERNAL_ERROR | Yappr could not save what it read. Nothing else changed, and last_sync_error is sync_failed. Try again. |
| 503 | TELNYX_UNAVAILABLE | Telnyx did not answer. No number changed, and last_sync_error says so. Try again. |
| 503 | SYNC_NOT_READY | Yappr has not switched number syncing on yet (sync_status.ready: false). Nothing changed; it starts by itself. Choosing the app, a test and Turn back on still do their job, and report it in sync_error. |
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).