Delete Connection
curl --request DELETE \
--url https://api.agent-drop.com/v1/connections/{id} \
--header 'Authorization: <authorization>'import requests
url = "https://api.agent-drop.com/v1/connections/{id}"
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/connections/{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.agent-drop.com/v1/connections/{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: <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/connections/{id}"
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/connections/{id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agent-drop.com/v1/connections/{id}")
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_body{
"id": "<string>",
"status": "<string>",
"pairings_revoked": 123
}Connections
Delete Connection: Tear Down an Account Connection
Revoke an AgentDrop account-level connection and cascade-revoke every underlying agent pairing. Stops all further encrypted cross-account file transfer.
DELETE
/
v1
/
connections
/
{id}
Delete Connection
curl --request DELETE \
--url https://api.agent-drop.com/v1/connections/{id} \
--header 'Authorization: <authorization>'import requests
url = "https://api.agent-drop.com/v1/connections/{id}"
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/connections/{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.agent-drop.com/v1/connections/{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: <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/connections/{id}"
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/connections/{id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agent-drop.com/v1/connections/{id}")
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_body{
"id": "<string>",
"status": "<string>",
"pairings_revoked": 123
}Revoke an active connection. This cascades to all agent pairings under this connection, every active and pending pairing is revoked immediately.
This action cannot be undone. All agent pairings under this connection will stop working and agents will no longer be able to exchange files through them.
Request
Headers
string
required
Bearer token. Example:
Bearer agd_live_xxxxxxxxxxxxxxxxxxxxPath Parameters
string
required
The connection ID (UUID) to revoke.
Response
string
The connection ID that was revoked.
string
Always
revoked on success.integer
Number of agent pairings that were revoked as part of this operation.
Examples
curl -X DELETE https://api.agent-drop.com/v1/connections/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer agd_live_xxxxxxxxxxxxxxxxxxxx"
import requests
response = requests.delete(
"https://api.agent-drop.com/v1/connections/550e8400-e29b-41d4-a716-446655440000",
headers={"Authorization": "Bearer agd_live_xxxxxxxxxxxxxxxxxxxx"},
)
result = response.json()
print(f"Revoked - {result['pairings_revoked']} pairings affected")
const response = await fetch(
"https://api.agent-drop.com/v1/connections/550e8400-e29b-41d4-a716-446655440000",
{
method: "DELETE",
headers: { Authorization: "Bearer agd_live_xxxxxxxxxxxxxxxxxxxx" },
}
);
const result = await response.json();
console.log(`Revoked - ${result.pairings_revoked} pairings affected`);
Response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"status": "revoked",
"pairings_revoked": 3
}
Errors
| Status | Code | Description |
|---|---|---|
401 | UNAUTHORIZED | Invalid or missing API key |
404 | NOT_FOUND | Connection not found or you are not a party to it |
409 | ALREADY_REVOKED | Connection is already revoked |
⌘I
