curl --request DELETE \
--url https://api.goyappr.com/sip-endpoints/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.goyappr.com/sip-endpoints/{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/sip-endpoints/{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/sip-endpoints/{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/sip-endpoints/{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/sip-endpoints/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goyappr.com/sip-endpoints/{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{
"ok": true,
"campaigns_without_number": 1
}{
"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>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}Delete SIP Endpoint
Deletes the endpoint. Requires sip_endpoints:manage. Re-route the calls
in your phone system first: from then on, every call it sends here is
refused.
- Username-and-password trunk: Yappr first removes the trunk’s
username and password at its carrier, so they stop working within
seconds: your phone system’s next call is refused with SIP
403 Forbidden. Only then is the endpoint deleted. In the dashboard, only workspace owners and admins can delete one. To replace a lost or leaked password instead, use rotate-password. - SIP address endpoint: from then on, calls to its
sip_uriare refused before they are answered (SIP603 Decline). Calls already in progress finish normally. To replace an address that may have leaked, create a new endpoint (it gets a fresh random address), point your phone system at it, then delete the old one. - Extension endpoint: Yappr deletes the extension’s connection at its
carrier first, then the endpoint. Your phone system is not told: the
carrier can keep registering the extension on your phone system for hours
(observed: more than 4 hours 40 minutes), so your phone system keeps
routing its calls there and they are rejected. Meanwhile a new endpoint
with the same extension name fails with “already in use”, also when the
deleted endpoint never registered (for example a wrong password). Re-route or
remove the extension on your phone system before you delete. To
change the agent, call limit, server or password, edit the endpoint
(
PATCH): don’t delete and re-create it. If the extension called out through your phone system, its number (provider: "phone_system") is removed with it, andcampaigns_without_numbersays how many campaigns were calling from that number: they keep their history and have no number to call from until you pick one.
curl --request DELETE \
--url https://api.goyappr.com/sip-endpoints/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.goyappr.com/sip-endpoints/{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/sip-endpoints/{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/sip-endpoints/{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/sip-endpoints/{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/sip-endpoints/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goyappr.com/sip-endpoints/{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{
"ok": true,
"campaigns_without_number": 1
}{
"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>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}sip_endpoints:manage. Re-route the calls
in your phone system first: from then on, every call it sends here is refused.
- Username-and-password trunk. Yappr first removes the trunk’s username and
password at its carrier, so they stop working within seconds: your phone system’s
next call is refused with SIP
403 Forbidden. Only then is the endpoint deleted. If the carrier can’t be reached, nothing is deleted and the answer is502; try again. In the dashboard, only workspace owners and admins can delete a trunk. - Extension endpoint (
register). Yappr first deletes the extension’s connection at its carrier, then the endpoint. Your phone system is not told. The carrier can keep registering the extension on your phone system for hours after the delete (observed: one registration kept refreshing for more than 4 hours 40 minutes), so your phone system keeps routing the extension’s calls to the carrier, which rejects them meanwhile, and callers hear a failure. While that lasts, a new endpoint with the same extension name fails withalready in use, also when the deleted endpoint never registered (for example a wrong password). Re-route or remove the extension on your phone system before you delete. If the carrier can’t be reached, nothing is deleted and the answer is502; try again. In the dashboard, only workspace owners and admins can delete one. - SIP address endpoint. From then on, calls to its
sip_uriare refused before they are answered (SIP603 Decline). Calls already in progress finish normally. Every endpoint gets a fresh random address, so a deleted address is never handed out again.
- To replace a trunk’s password that may have leaked or was lost, issue a new one.
- To replace a SIP address that may have leaked, create a new endpoint first, point
your phone system at its
sip_uri, then delete the old one, so no call is dropped in between. - To change an extension’s agent, call limit, server or password, edit the endpoint
with update (send
register.passwordfor a new password). Don’t delete and re-create it. - To stop calls for a while, switch the endpoint off with
is_active: false(update). Re-route the calls in your phone system first: a trunk or SIP address endpoint then refuses calls with SIP603 Decline, and your system may not try its next route after it; an extension endpoint’s phone system isn’t told.
curl -X DELETE https://api.goyappr.com/sip-endpoints/8d0c5f4e-2b1a-4c3d-9e8f-7a6b5c4d3e2f \
-H "Authorization: Bearer ypr_live_..."
{ "ok": true }
campaigns_without_number. Its number (provider: "phone_system" under
Phone numbers) is removed with it, and this says
how many campaigns were calling from that number. They keep their history and lose
the number: from_phone_number_id becomes null, so each one calls from its agent’s
own number, or can’t launch until you pick another with
PATCH /campaigns/{id}.
{ "ok": true, "campaigns_without_number": 1 }
| Field | Type | When | Meaning |
|---|---|---|---|
ok | boolean | Always | true: the endpoint is deleted. |
campaigns_without_number | integer | Only for an extension endpoint that called out through your phone system | How many campaigns were calling from its number. 0 when none was. |
Errors
| Status | code | Meaning |
|---|---|---|
| 400 | SIP_ENDPOINT_QUERY_INVALID | The request has a query parameter: this call takes none. Nothing was deleted. |
| 403 | INSUFFICIENT_SCOPE | The API key does not hold sip_endpoints:manage, and the message names it. Nothing was deleted. |
| 403 | FORBIDDEN_ROLE | Dashboard: only workspace owners and admins can delete a username-and-password trunk or an extension endpoint. |
| 404 | SIP_ENDPOINT_NOT_FOUND | No SIP endpoint with this id in this workspace. |
| 404 | RESOURCE_ID_INVALID | The id in the path is not an id at all. Use an id exactly as the list or the create returned it. |
| 500 | INTERNAL_ERROR | Yappr could not load or delete the endpoint. On a trunk, its username and password may already have stopped working; try again to finish the delete. |
| 502 | SIP_TRUNK_PROVISIONING_FAILED | The trunk’s username and password could not be removed at Yappr’s carrier, so the trunk was not deleted. Try again in a minute. |
| 502 | SIP_REGISTER_PROVIDER_ERROR | The extension’s registration could not be removed at Yappr’s carrier, so the endpoint was not deleted. Try again in a minute. |
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).
Response
Deleted
Only for an extension endpoint that called out through your
phone system (it had a phone_system number). How many
campaigns were calling from that number, which is removed with
the endpoint: they keep their history and lose their number
(from_phone_number_id becomes null, so they call from their
agent's own number, or cannot launch until you pick one with
PATCH /campaigns/{id}). 0 when none was.
x >= 01