curl --request DELETE \
--url https://api.goyappr.com/agents/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.goyappr.com/agents/{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/agents/{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/agents/{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/agents/{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/agents/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goyappr.com/agents/{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",
"archived": true,
"archived_at": "2026-10-02T08:00:00.123456+00:00",
"is_active": 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>"
}
]
}Remove Agent
Archives the agent, hides it from ordinary lists and blocks new calls; history is retained and running calls are not aborted. PATCH cannot clear the archive. Use PATCH is_active=false for reversible deactivation.
curl --request DELETE \
--url https://api.goyappr.com/agents/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.goyappr.com/agents/{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/agents/{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/agents/{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/agents/{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/agents/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goyappr.com/agents/{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",
"archived": true,
"archived_at": "2026-10-02T08:00:00.123456+00:00",
"is_active": 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>"
}
]
}404 AGENT_NOT_FOUND here as on
GET and PATCH: a second delete of the same agent answers that 404, it does not archive it
again. The archive cannot be cleared with PATCH. Creation retries
using its original Idempotency-Key return 410 AGENT_CREATION_GONE, not a new agent.
A 503 WORKFLOW_STORAGE_UNAVAILABLE means the archive could not be confirmed, so it may not have
gone through. Send the same delete again: 200 archives the agent now, and 404 AGENT_NOT_FOUND
means the first delete had already archived it. When the archive went through but its answer was
lost on the way back, Yappr reads the agent again before it answers and returns the 200 instead of
the 503.
The answer says it was archived, and when:
{ "success": true, "id": "7cf020c3-0f9d-413f-b460-6180723b2bfe", "archived": true, "archived_at": "2026-10-02T08:00:00.123456+00:00" }
archived_at is null on the rare occasion it could not be read back; the agent is archived all
the same. The answer used to carry is_active: false, which read like a switch-off. An agent from
before the workflow engine (type: "prompt" or "flow") is switched off rather than archived: it
answers "archived": false, "is_active": false and stays on the agent list.
To temporarily pause an agent instead, use PATCH /agents/{id} with
{"is_active":false}. The agent stays visible and can be reactivated with true.
The delete takes no query parameters. One sent with it — DELETE /agents/{id}?bogus=1 — is
refused with 400 AGENTS_QUERY_INVALID naming it, and the agent is left as it was; it used to be
archived. Every write refuses a query parameter it does not read (Errors).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
Agent archived: archived is true and archived_at says when (null on the rare occasion it could not be read back). It used to answer is_active false, which read like a switch-off. An agent from before the workflow engine is switched off rather than archived and answers archived false with is_active false; it stays listed.