curl --request POST \
--url https://api.goyappr.com/phone-numbers/{id}/release \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.goyappr.com/phone-numbers/{id}/release"
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/phone-numbers/{id}/release', 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/phone-numbers/{id}/release",
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/phone-numbers/{id}/release"
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/phone-numbers/{id}/release")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goyappr.com/phone-numbers/{id}/release")
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{
"phone_number_id": "c0ffee00-0000-4000-8000-000000000001",
"released": false,
"release_at": "2026-11-18T04:16:32.000Z"
}Release Number
Release a number bought from Yappr. Requires phone_numbers:purchase.
A number whose subscription is paid up is kept until the end of the period already
paid for, then released: it keeps answering and placing calls until then, and its rent
does not renew. The answer is released: false with release_at, and
GET /phone-numbers lists the same date as scheduled_release_at. A number whose payment
is overdue, or that has no subscription, is released now: released: true, and it is no
longer listed.
POST /phone-numbers//keep undoes a scheduled
release until release_at. Releasing a number that is already scheduled answers the same
date and changes nothing.
A campaign that still calls from the number, or a call on it in progress, refuses the
release; nothing is changed. A number from your own Telnyx account (provider: external)
is removed with DELETE /carrier-accounts//numbers/ instead, and a
phone_system number is switched off on its SIP endpoint. It takes no body and no query
parameters.
curl --request POST \
--url https://api.goyappr.com/phone-numbers/{id}/release \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.goyappr.com/phone-numbers/{id}/release"
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/phone-numbers/{id}/release', 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/phone-numbers/{id}/release",
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/phone-numbers/{id}/release"
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/phone-numbers/{id}/release")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goyappr.com/phone-numbers/{id}/release")
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{
"phone_number_id": "c0ffee00-0000-4000-8000-000000000001",
"released": false,
"release_at": "2026-11-18T04:16:32.000Z"
}phone_numbers:purchase. In the dashboard, the same release is Release on
the number under Phone Numbers.
curl -X POST "$YAPPR_API_URL/phone-numbers/c0ffee00-0000-4000-8000-000000000001/release" \
--header "Authorization: Bearer $YAPPR_API_KEY"
400 PHONE_NUMBER_REQUEST_INVALID, and nothing is changed.
What happens to the number
- Paid up: kept until the end of the period already paid for, then released.
The number keeps answering and placing calls as before until
release_at, and its rent does not renew.GET /phone-numberslists the same date asscheduled_release_at, withnext_renewal_at: null. - Payment overdue, or no subscription: released now. The number stops working at once and is no longer listed.
- Changed your mind? Keep the number any
time before
release_at, and it renews as before. - Already scheduled? Releasing it again answers the same
release_atand changes nothing. - In use? A campaign that still calls from the number, or a call on it in progress, refuses the release, and nothing is changed. Give the campaign another caller number (or stop or delete it), or wait for the call to end.
release_at, and
buying it again is a new purchase.
When a payment keeps failing
You don’t have to release a number whose rent can’t be charged. When a monthly payment fails, the workspace is emailed and the payment is retried automatically for about three weeks; the number keeps working meanwhile. If no retry goes through, the subscription ends and the number is released the same way, without a call to this endpoint. A payment that goes through in time keeps the number.Response
{
"phone_number_id": "c0ffee00-0000-4000-8000-000000000001",
"released": false,
"release_at": "2026-11-18T04:16:32.000Z"
}
{
"phone_number_id": "c0ffee00-0000-4000-8000-000000000001",
"released": true,
"release_at": null
}
| Field | What it tells you |
|---|---|
phone_number_id | The number you released. |
released | true when the number is gone now. false when it is still yours until release_at. |
release_at | When a scheduled release happens: the end of the period already paid for. null when the number was released now. |
Numbers that are not released here
provider | What to do instead |
|---|---|
external | A number in your own Telnyx account. Yappr never releases it: remove it from this workspace with DELETE /carrier-accounts/{id}/numbers/{phone_number_id}, using its carrier_account.id. |
phone_system | The business number of an extension that calls out through your own phone system. Switch outbound calls off on its SIP endpoint with PATCH /sip-endpoints/{id} (register.outbound.enabled: false), or delete that endpoint. |
Errors
| HTTP | Code | When |
|---|---|---|
400 | PHONE_NUMBER_REQUEST_INVALID | A body field or query parameter was sent. It takes neither; issues[] names each one. Nothing was changed. |
403 | INSUFFICIENT_SCOPE | The key does not hold phone_numbers:purchase. |
403 | API_KEY_AGENT_SCOPED | The key is limited to some agents. Numbers belong to the whole workspace, so such a key cannot release one. |
404 | NOT_FOUND | No such number in this workspace, or it was released already. |
404 | RESOURCE_ID_INVALID | The id in the path is not an id. |
409 | NUMBER_IN_CAMPAIGN | A campaign that has not ended still calls from this number. Give it another caller number, or stop or delete it, first. Nothing was changed. |
409 | NUMBER_ON_LIVE_CALL | A call on this number is in progress. Try again when it ends. Nothing was changed. |
409 | PHONE_SYSTEM_NUMBER | The number calls out through your phone system. See the table above. Nothing was changed. |
409 | NUMBER_FROM_OWN_CARRIER | The number is in your own Telnyx account. See the table above. Nothing was changed. |
500 | PHONE_RELEASE_FAILED | A release that runs now could not run. Try again in a minute. |
500 | PHONE_RELEASE_INCOMPLETE | A release that runs now did not finish at the carrier, or the number is still listed. Yappr has been notified; contact support if it stays listed. |
503 | BILLING_UNAVAILABLE | Billing, or the number’s checks, could not be reached. Nothing was changed. 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
Scheduled (released: false, release_at the end of the paid period) or released now (released: true, release_at: null).