Delete Knowledge Document
curl --request DELETE \
--url https://app.thinnest.ai/api/v1/agents/{id}/knowledge/{documentId} \
--header 'Authorization: Bearer <token>'const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.thinnest.ai/api/v1/agents/{id}/knowledge/{documentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.thinnest.ai/api/v1/agents/{id}/knowledge/{documentId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text){
"error": "Send a valid API key as `Authorization: Bearer <key>`."
}{
"error": "This API key is read-only: it can read everything but change nothing."
}{
"error": "That document was not found."
}{
"error": "Over 240 requests a minute. Slow down and retry."
}Knowledge
Delete Knowledge Document
Removes the document and every passage indexed from it; the agent stops citing it at once. A build key may do this.
DELETE
/
agents
/
{id}
/
knowledge
/
{documentId}
Delete Knowledge Document
curl --request DELETE \
--url https://app.thinnest.ai/api/v1/agents/{id}/knowledge/{documentId} \
--header 'Authorization: Bearer <token>'const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.thinnest.ai/api/v1/agents/{id}/knowledge/{documentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.thinnest.ai/api/v1/agents/{id}/knowledge/{documentId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text){
"error": "Send a valid API key as `Authorization: Bearer <key>`."
}{
"error": "This API key is read-only: it can read everything but change nothing."
}{
"error": "That document was not found."
}{
"error": "Over 240 requests a minute. Slow down and retry."
}Authorizations
Your API key (ta_live_…) from Settings → API keys, sent as Authorization: Bearer <key>. Keep it on a server: it can message every customer you have. A key is full, build or read-only; a request its level does not allow is refused with 403.
Headers
Developers only: the customer workspace this request acts in — its org_… id from POST /customers. Leave it out to act in your own workspace.
Example:
"org_3fKq9TzQ1mN8vB2xR7cLpA"
Path Parameters
The agent's id (ag_…).
The document's id (doc_…), from List Knowledge Documents.
Response
Deleted. No body.