curl --request DELETE \
--url https://api.goyappr.com/carrier-accounts/{id}/numbers/{phone_number_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.goyappr.com/carrier-accounts/{id}/numbers/{phone_number_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.goyappr.com/carrier-accounts/{id}/numbers/{phone_number_id}', 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/{phone_number_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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}/numbers/{phone_number_id}"
req, _ := http.NewRequest("DELETE", 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.delete("https://api.goyappr.com/carrier-accounts/{id}/numbers/{phone_number_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goyappr.com/carrier-accounts/{id}/numbers/{phone_number_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"removed": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"number": "+972501234567",
"friendly_name": "<string>",
"carrier_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"telnyx_number_id": "<string>",
"inbound_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outbound_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"removed_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>"
}
]
}Remove Number from This Workspace
Takes any number of the account out of this workspace: one Telnyx still lists,
one a sync found gone from Telnyx, and one a disconnect kept for its history.
Agents stop calling from it. Nothing changes in your Telnyx account. This
workspace’s syncs skip it from then on (it is listed in the sync’s excluded),
so another workspace connected to the same Telnyx account can take it at its
next sync; add it back to have it
here again. Its past calls keep their carrier_account, from and to, and its
spend stays under its id in GET /billing/consumption?group_by=phone_number.
The number has no row here afterwards; its record stays on the account’s reads in
removed_numbers, and the answer carries it (removed). Requires carrier_accounts:manage.
curl --request DELETE \
--url https://api.goyappr.com/carrier-accounts/{id}/numbers/{phone_number_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.goyappr.com/carrier-accounts/{id}/numbers/{phone_number_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.goyappr.com/carrier-accounts/{id}/numbers/{phone_number_id}', 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/{phone_number_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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}/numbers/{phone_number_id}"
req, _ := http.NewRequest("DELETE", 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.delete("https://api.goyappr.com/carrier-accounts/{id}/numbers/{phone_number_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goyappr.com/carrier-accounts/{id}/numbers/{phone_number_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"removed": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"number": "+972501234567",
"friendly_name": "<string>",
"carrier_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"telnyx_number_id": "<string>",
"inbound_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outbound_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"removed_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>"
}
]
}carrier_accounts:manage.
curl -X DELETE https://api.goyappr.com/carrier-accounts/7c1e…/numbers/e2a4… \
-H "Authorization: Bearer ypr_live_..."
{
"success": true,
"id": "e2a4…",
"removed": {
"id": "e2a4…",
"number": "+972501234567",
"friendly_name": "Front desk",
"carrier_account_id": "7c1e…",
"telnyx_number_id": "1293…",
"inbound_agent_id": null,
"outbound_agent_id": "b41d…",
"created_at": "2026-09-23T10:02:00Z",
"removed_at": "2026-10-02T08:30:00Z"
}
}
What stays, and what to keep
The number leaves GET /phone-numbers and the account’snumbers. Its record stays on the account: GET /carrier-accounts/
and the list carry it in removed_numbers - the id it had, its number, its Telnyx id and
removed_at - and this answer carries it in removed.
Its history stays where it was: its past calls keep their carrier_account, from and
to on GET /calls (filter by carrier_account_id), and its
spend stays under its id in
GET /billing/consumption?group_by=phone_number.
What happens next
From then on this workspace’s syncs skip the number: each lists it inexcluded. That is
how a number moves to another Yappr workspace connected to the same Telnyx account: that
workspace’s next sync takes it, and this one never takes it back by itself.
To have it here again, add it back with its
number: the syncs then keep it up to date again. If the number leaves your Telnyx account
and comes back under a new Telnyx id, a sync brings it in as a new number.
A number that answers calls here (carrier_state.state: "ready") goes back to its own
connection first: stop answering here,
then remove it.
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, NUMBER_NOT_FOUND | Not in this workspace, or not a number of this account. |
| 404 | RESOURCE_ID_INVALID | The account or the number segment is not an id at all. |
| 409 | NUMBER_STILL_CONFIGURED | It still answers calls here. Stop answering here first. Nothing changed. |
| 409 | NUMBER_IN_CAMPAIGN | A campaign that has not ended (a draft, scheduled, running or paused one) calls from it. Give the campaign another number, stop it, or delete it, first. Nothing changed. |
| 409 | NUMBER_ON_LIVE_CALL | A call on it is in progress. Try again when it ends. Nothing changed. |
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).