Revoke agent access
curl --request DELETE \
--url https://api.natural.com/customers/{customerPartyId}/agents/{agentId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.natural.com/customers/{customerPartyId}/agents/{agentId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.natural.com/customers/{customerPartyId}/agents/{agentId}', 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.natural.com/customers/{customerPartyId}/agents/{agentId}",
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.natural.com/customers/{customerPartyId}/agents/{agentId}"
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.natural.com/customers/{customerPartyId}/agents/{agentId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.natural.com/customers/{customerPartyId}/agents/{agentId}")
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{
"data": {
"id": "pty_019cd1798d627ad9bc302511c4f2c115",
"type": "customer",
"attributes": {
"name": "Bistro Roma",
"email": "ops@bistroroma.com",
"phone": "+14155550123",
"avatarUrl": "https://static.natural.com/avatars/bistro-roma.png",
"createdAt": "2026-01-04T15:30:00.000Z",
"connection": {
"id": "dlg_019cd1798d937c77f6c0ecee3c32893b",
"status": "active",
"permissions": [],
"createdAt": "2026-01-10T12:00:00.000Z",
"revokedAt": null
},
"agents": []
}
}
}Customers
Revoke agent access
Remove an agent’s access to a customer. Returns the Customer object.
DELETE
/
customers
/
{customerPartyId}
/
agents
/
{agentId}
Revoke agent access
curl --request DELETE \
--url https://api.natural.com/customers/{customerPartyId}/agents/{agentId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.natural.com/customers/{customerPartyId}/agents/{agentId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.natural.com/customers/{customerPartyId}/agents/{agentId}', 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.natural.com/customers/{customerPartyId}/agents/{agentId}",
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.natural.com/customers/{customerPartyId}/agents/{agentId}"
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.natural.com/customers/{customerPartyId}/agents/{agentId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.natural.com/customers/{customerPartyId}/agents/{agentId}")
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{
"data": {
"id": "pty_019cd1798d627ad9bc302511c4f2c115",
"type": "customer",
"attributes": {
"name": "Bistro Roma",
"email": "ops@bistroroma.com",
"phone": "+14155550123",
"avatarUrl": "https://static.natural.com/avatars/bistro-roma.png",
"createdAt": "2026-01-04T15:30:00.000Z",
"connection": {
"id": "dlg_019cd1798d937c77f6c0ecee3c32893b",
"status": "active",
"permissions": [],
"createdAt": "2026-01-10T12:00:00.000Z",
"revokedAt": null
},
"agents": []
}
}
}Authorizations
Headers
Path Parameters
Was this page helpful?