Delete context entry
curl --request DELETE \
--url https://api.trycomp.ai/v1/context/{id} \
--header 'X-API-Key: <api-key>'const options = {method: 'DELETE', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.trycomp.ai/v1/context/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/context/{id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text){
"message": "Context entry deleted successfully",
"deletedContext": {
"id": "ctx_abc123def456",
"question": "How do we handle user authentication in our application?"
},
"authType": "apikey"
}{
"message": "Unauthorized",
"statusCode": 401
}{
"message": "Context entry with ID ctx_abc123def456 not found in organization org_xyz789uvw012",
"statusCode": 404
}{
"message": "Internal server error",
"statusCode": 500
}Context
Delete context entry | Comp AI API
Permanently removes a context entry from the organization. This action cannot be undone.
DELETE
/
v1
/
context
/
{id}
Delete context entry
curl --request DELETE \
--url https://api.trycomp.ai/v1/context/{id} \
--header 'X-API-Key: <api-key>'const options = {method: 'DELETE', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.trycomp.ai/v1/context/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/context/{id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text){
"message": "Context entry deleted successfully",
"deletedContext": {
"id": "ctx_abc123def456",
"question": "How do we handle user authentication in our application?"
},
"authType": "apikey"
}{
"message": "Unauthorized",
"statusCode": 401
}{
"message": "Context entry with ID ctx_abc123def456 not found in organization org_xyz789uvw012",
"statusCode": 404
}{
"message": "Internal server error",
"statusCode": 500
}Was this page helpful?

