Delete Session
curl --request DELETE \
--url https://www.ninjachat.ai/api/v1/sessions/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.ninjachat.ai/api/v1/sessions/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://www.ninjachat.ai/api/v1/sessions/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"deleted": true
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
},
"message": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
},
"message": "<string>",
"code": "<string>",
"request_id": "<string>"
}Sessions
Delete Session
Permanently delete a session and its stored messages.
DELETE
/
api
/
v1
/
sessions
/
{id}
Delete Session
curl --request DELETE \
--url https://www.ninjachat.ai/api/v1/sessions/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.ninjachat.ai/api/v1/sessions/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://www.ninjachat.ai/api/v1/sessions/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"deleted": true
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
},
"message": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
},
"message": "<string>",
"code": "<string>",
"request_id": "<string>"
}⌘I