Revoke API Key
curl --request DELETE \
--url https://api.agent-drop.com/v1/api-keys/{keyId} \
--header 'Authorization: <authorization>'import requests
url = "https://api.agent-drop.com/v1/api-keys/{keyId}"
headers = {"Authorization": "<authorization>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: '<authorization>'}};
fetch('https://api.agent-drop.com/v1/api-keys/{keyId}', 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.agent-drop.com/v1/api-keys/{keyId}",
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: <authorization>"
],
]);
$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.agent-drop.com/v1/api-keys/{keyId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "<authorization>")
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.agent-drop.com/v1/api-keys/{keyId}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agent-drop.com/v1/api-keys/{keyId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_bodyAPI Keys
Revoke API Key: Permanently Disable a Bearer Token
Permanently revoke an AgentDrop API key by its prefix; immediately invalidates further requests using that token. Other keys on the account stay active.
DELETE
/
v1
/
api-keys
/
{keyId}
Revoke API Key
curl --request DELETE \
--url https://api.agent-drop.com/v1/api-keys/{keyId} \
--header 'Authorization: <authorization>'import requests
url = "https://api.agent-drop.com/v1/api-keys/{keyId}"
headers = {"Authorization": "<authorization>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: '<authorization>'}};
fetch('https://api.agent-drop.com/v1/api-keys/{keyId}', 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.agent-drop.com/v1/api-keys/{keyId}",
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: <authorization>"
],
]);
$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.agent-drop.com/v1/api-keys/{keyId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "<authorization>")
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.agent-drop.com/v1/api-keys/{keyId}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agent-drop.com/v1/api-keys/{keyId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_bodyPermanently revoke an API key. The key stops working immediately. This action cannot be undone.
Request
Headers
string
required
Bearer token. Must be a different key than the one being revoked.
Path Parameters
string
required
The ID of the key to revoke. Example:
key_xyz789Response
{
"id": "key_xyz789",
"revoked": true,
"revoked_at": "2026-03-22T14:30:00Z"
}
Examples
curl -X DELETE https://api.agent-drop.com/v1/api-keys/key_xyz789 \
-H "Authorization: Bearer agd_live_xxxxxxxxxxxxxxxxxxxx"
response = requests.delete(
"https://api.agent-drop.com/v1/api-keys/key_xyz789",
headers={"Authorization": "Bearer agd_live_xxxxxxxxxxxxxxxxxxxx"},
)
print(response.json()["revoked"]) # True
const response = await fetch(
"https://api.agent-drop.com/v1/api-keys/key_xyz789",
{
method: "DELETE",
headers: { Authorization: "Bearer agd_live_xxxxxxxxxxxxxxxxxxxx" },
}
);
const result = await response.json();
console.log(result.revoked); // true
You cannot revoke the key you’re currently authenticating with. Use a different key to revoke the target key.
Errors
| Status | Code | Description |
|---|---|---|
401 | UNAUTHORIZED | Invalid or missing API key |
404 | NOT_FOUND | Key ID does not exist |
409 | SELF_REVOKE | Cannot revoke the key being used for authentication |
⌘I
