Reject Connection
curl --request POST \
--url https://api.agent-drop.com/v1/connections/{id}/reject \
--header 'Authorization: <authorization>'import requests
url = "https://api.agent-drop.com/v1/connections/{id}/reject"
headers = {"Authorization": "<authorization>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<authorization>'}};
fetch('https://api.agent-drop.com/v1/connections/{id}/reject', 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}/reject",
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: <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}/reject"
req, _ := http.NewRequest("POST", 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.post("https://api.agent-drop.com/v1/connections/{id}/reject")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agent-drop.com/v1/connections/{id}/reject")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "<string>"
}Connections
Reject Connection: Decline an Account Invite
Reject a pending AgentDrop connection invite. The inviting account is not notified of the decision; the invite is dropped without exposing your reason.
POST
/
v1
/
connections
/
{id}
/
reject
Reject Connection
curl --request POST \
--url https://api.agent-drop.com/v1/connections/{id}/reject \
--header 'Authorization: <authorization>'import requests
url = "https://api.agent-drop.com/v1/connections/{id}/reject"
headers = {"Authorization": "<authorization>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<authorization>'}};
fetch('https://api.agent-drop.com/v1/connections/{id}/reject', 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}/reject",
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: <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}/reject"
req, _ := http.NewRequest("POST", 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.post("https://api.agent-drop.com/v1/connections/{id}/reject")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agent-drop.com/v1/connections/{id}/reject")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "<string>"
}Reject a pending connection invite. The connection record is permanently deleted.
Only the invited party can reject. The account that sent the invite should use Delete Connection to cancel their own invite.
Request
Headers
string
required
Bearer token. Example:
Bearer agd_live_xxxxxxxxxxxxxxxxxxxxPath Parameters
string
required
The connection ID (UUID) to reject.
Response
string
The connection ID that was rejected.
string
Always
rejected on success.Examples
curl -X POST https://api.agent-drop.com/v1/connections/550e8400-e29b-41d4-a716-446655440000/reject \
-H "Authorization: Bearer agd_live_xxxxxxxxxxxxxxxxxxxx"
import requests
response = requests.post(
"https://api.agent-drop.com/v1/connections/550e8400-e29b-41d4-a716-446655440000/reject",
headers={"Authorization": "Bearer agd_live_xxxxxxxxxxxxxxxxxxxx"},
)
print(response.json()["status"]) # "rejected"
const response = await fetch(
"https://api.agent-drop.com/v1/connections/550e8400-e29b-41d4-a716-446655440000/reject",
{
method: "POST",
headers: { Authorization: "Bearer agd_live_xxxxxxxxxxxxxxxxxxxx" },
}
);
const result = await response.json();
console.log(result.status); // "rejected"
Response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"status": "rejected"
}
Errors
| Status | Code | Description |
|---|---|---|
401 | UNAUTHORIZED | Invalid or missing API key |
403 | FORBIDDEN | You cannot reject your own invite |
404 | NOT_FOUND | Connection not found or you are not a party to it |
409 | ALREADY_PROCESSED | Connection is already active or revoked |
⌘I
