curl --request DELETE \
--url https://api.goyappr.com/dispositions/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.goyappr.com/dispositions/{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/dispositions/{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/dispositions/{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/dispositions/{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/dispositions/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goyappr.com/dispositions/{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
}{
"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 Disposition
Permanently deletes a disposition. Protected (system) dispositions cannot be deleted. The outcome leaves every campaign’s stop_disposition_ids (drafts, launched and archived); only a launched campaign it is the sole way to stop refuses the delete, with 409 DISPOSITION_IN_USE.
curl --request DELETE \
--url https://api.goyappr.com/dispositions/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.goyappr.com/dispositions/{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/dispositions/{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/dispositions/{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/dispositions/{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/dispositions/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goyappr.com/dispositions/{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
}{
"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>"
}
]
}dispositions:manage.
The delete is permanent and it reaches past the list. Every
call classified with this disposition has its
disposition_id set to null — those calls do not fall back to another
label, they end up with none, and a report grouped by outcome loses them. The
outcome also leaves the Stop list (stop_disposition_ids) of every
campaign that has it — drafts, launched and
archived campaigns alike — so those campaigns stop stopping on it. The one
exception is a launched campaign for which it is the only way to stop (no other
stop outcome, stop_on_no_answer and stop_on_voicemail both off): that
delete is refused with 409 DISPOSITION_IN_USE, naming the campaign. There is
no force flag and no count of what is about to be affected, so read the
blast radius first:
# How many calls carry it, before deciding.
curl "$YAPPR_API_URL/calls?disposition_id=1943aa72-afd8-48eb-bdd6-3ed0960715de&limit=1" \
--header "Authorization: Bearer $YAPPR_API_KEY"
curl --request DELETE "$YAPPR_API_URL/dispositions/1943aa72-afd8-48eb-bdd6-3ed0960715de" \
--header "Authorization: Bearer $YAPPR_API_KEY"
Response
{ "success": true }
200. Deleting an id that was already deleted answers 404, so the call is
safe to repeat but not idempotent in its reply.
Errors
| HTTP | Body | When |
|---|---|---|
400 | {"error":"Remove force. Deleting a disposition takes no query parameters.","code":"DISPOSITIONS_QUERY_INVALID"} | A query parameter. The delete reads only its path, so force=false — or anything else — is refused rather than ignored, and nothing is deleted. |
403 | {"error":"This disposition is system-protected and cannot be deleted","code":"PROTECTED"} | The disposition carries is_protected: true — a label seeded with the workspace. Read the flag from List rather than assuming which labels those are; it is six in an older workspace and all ten defaults in a newer one. Rename or recolour it instead, bearing the warning on Update in mind. |
404 | {"error":"Disposition not found","code":"NOT_FOUND"} | No disposition with that id belongs to this workspace. |
409 | {"error":"This outcome is the only thing that stops campaign(s) Spring renewals. Add another outcome to their Stop list (or archive a finished one), then delete this outcome.","code":"DISPOSITION_IN_USE"} | A campaign that has been launched (scheduled, running, paused, stopped or completed) stops on this outcome and on nothing else. Add another outcome to its stop_disposition_ids with PATCH /campaigns/{id} — or, for a finished one, archive it — then repeat the delete. Drafts never block a delete. Nothing was deleted. |
403 | {"error":"This key does not hold …","code":"INSUFFICIENT_SCOPE"} | The key does not hold dispositions:manage. |
429 | {"error":"Rate limit exceeded. Try again in a moment.","code":"RATE_LIMIT"} | 60 requests per minute per key. |
500 | {"error":"Failed to delete disposition","code":"INTERNAL_ERROR"} | The delete itself failed for a reason on our side. Retry; nothing was removed. A campaign that stops on the outcome is never the reason: that is the 409 above. |
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).