curl --request DELETE \
--url https://api.example.com/api/conversations/persons/{person_id} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.example.com/api/conversations/persons/{person_id}"
headers = {"x-api-key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.example.com/api/conversations/persons/{person_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.example.com/api/conversations/persons/{person_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 => [
"x-api-key: <api-key>"
],
]);
$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.example.com/api/conversations/persons/{person_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.example.com/api/conversations/persons/{person_id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/conversations/persons/{person_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"erased": true,
"person_id": "<string>",
"removed": 123
}
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Delete a conversation person
Erase a LINKED person ENTIRELY, forgetting every store that names it:
- the person’s aggregated
bridge:@person:{person_id}thread — its agent checkpoint, and across EVERY route the person wrote under its answer records, per-thread transcript indexes, route-thread index memberships and per-thread mode override (the thread-delete machinery, reused); - the person row
conversations:person:{person_id}; - every
person_indexdoor_address_key → person_idmapping of its addresses.
Caller authority is the door’s grantable write action — the same grant that forgets a
thread. IDEMPOTENT and retryable: the person row is the durable marker of an owed erase and
is deleted LAST (atomically with its index mappings), so an interruption re-reads it and a
retry FINISHES. A person that is already gone (a retry, or one that never existed) is not a
404 — its aggregated checkpoint is forgotten regardless (it defaults to keep-forever) and
the call answers erased=false. A turn IN FLIGHT on the aggregated thread is a 409
(retry once it drains), re-checked under the per-thread FIFO before any teardown so an
admitted turn cannot re-create memory behind the erase; a full queue is the retriable 503.
As a live-caller sync door the acquisition is bounded by sync_door_wait_seconds (both the
linked and the already-gone branch): a wait past it — behind a turn possibly HITL-paused on
another worker — is the loud, retriable 503 ThreadBusyError rather than a block past the
proxy timeout. A blank person_id is a 400; no backend is a loud 501.
Returns {"person_id", "removed", "erased"}, where removed counts the answer records
this call deleted across the person’s routes and erased says whether THIS call removed
the person row.
curl --request DELETE \
--url https://api.example.com/api/conversations/persons/{person_id} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.example.com/api/conversations/persons/{person_id}"
headers = {"x-api-key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.example.com/api/conversations/persons/{person_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.example.com/api/conversations/persons/{person_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 => [
"x-api-key: <api-key>"
],
]);
$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.example.com/api/conversations/persons/{person_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.example.com/api/conversations/persons/{person_id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/conversations/persons/{person_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"erased": true,
"person_id": "<string>",
"removed": 123
}
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}
