Delete Q&A documents
Delete Q&A documents
Halaman ini belum tersedia dalam Bahasa Indonesia. Menampilkan bahasa default (English).
Delete Q&A documents
DELETE
https://api.cekat.ai/api/documentsRemoves Q&A pairs from your AI agents’ knowledge. IDs that don’t exist are ignored.
Authorization
api_keystringheaderrequired
Your Cekat API key, from Settings → Developers & API in the Cekat dashboard.
Authorizationstringheader
Alternative to api_key: send the same key as Bearer YOUR_API_KEY.
Body application/jsonrequired
idsstring<uuid>[]required
min items:
1Response
200
400
401
404
429
Q&A deleted. data.ids lists what was deleted.
successboolean
messagestring
dataobject
Show child attributes
idsobject[]
Show child attributes
idstring
questionstring
answerstring
ids is missing or empty.
successboolean
messagestring
statusCodeinteger
errorobject
Show child attributes
messagestring
correlationIdstring
Request ID. Include it when contacting Cekat support.
The API key is missing or invalid.
successboolean
messagestring
statusCodeinteger
errorobject
Show child attributes
messagestring
correlationIdstring
Request ID. Include it when contacting Cekat support.
None of the IDs were found.
successboolean
messagestring
statusCodeinteger
errorobject
Show child attributes
messagestring
correlationIdstring
Request ID. Include it when contacting Cekat support.
Rate limit exceeded. Wait and retry.
messagestring
DELETE/api/documents
cURL
JavaScript
Python
PHP
curl --request DELETE \
--url 'https://api.cekat.ai/api/documents' \
--header 'api_key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}'
const response = await fetch('https://api.cekat.ai/api/documents', {
method: 'DELETE',
headers: { 'api_key': 'YOUR_API_KEY', 'Content-Type': 'application/json' },
body: JSON.stringify({
"ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
})
});
const data = await response.json();
console.log(data);
import requests
url = "https://api.cekat.ai/api/documents"
headers = {"api_key": "YOUR_API_KEY"}
payload = {
"ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
response = requests.delete(url, headers=headers, json=payload)
print(response.json())
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.cekat.ai/api/documents',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => ['api_key: YOUR_API_KEY', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
'ids' => ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
]),
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Response
200
400
401
404
429
{
"success": true,
"message": "<string>",
"data": {
"ids": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"question": "<string>",
"answer": "<string>"
}
]
}
}
{
"success": true,
"message": "<string>",
"statusCode": 1,
"error": {
"message": "<string>"
},
"correlationId": "<string>"
}
{
"success": true,
"message": "<string>",
"statusCode": 1,
"error": {
"message": "<string>"
},
"correlationId": "<string>"
}
{
"success": true,
"message": "<string>",
"statusCode": 1,
"error": {
"message": "<string>"
},
"correlationId": "<string>"
}
{
"message": "<string>"
}