End a chat session
curl --request POST \
--url https://backend.drivehealth.ai/api/v1/chat/end \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"chat_id": "9f8e7d6c-5b4a-4938-8271-6a5b4c3d2e1f"
}
'import requests
url = "https://backend.drivehealth.ai/api/v1/chat/end"
payload = { "chat_id": "9f8e7d6c-5b4a-4938-8271-6a5b4c3d2e1f" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({chat_id: '9f8e7d6c-5b4a-4938-8271-6a5b4c3d2e1f'})
};
fetch('https://backend.drivehealth.ai/api/v1/chat/end', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"err": false,
"msg": "Chat ended"
}
Chat
End a chat session
End a chat session. Ending marks the session; it does not erase it, and the transcript stays readable.
POST
/
api
/
v1
/
chat
/
end
End a chat session
curl --request POST \
--url https://backend.drivehealth.ai/api/v1/chat/end \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"chat_id": "9f8e7d6c-5b4a-4938-8271-6a5b4c3d2e1f"
}
'import requests
url = "https://backend.drivehealth.ai/api/v1/chat/end"
payload = { "chat_id": "9f8e7d6c-5b4a-4938-8271-6a5b4c3d2e1f" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({chat_id: '9f8e7d6c-5b4a-4938-8271-6a5b4c3d2e1f'})
};
fetch('https://backend.drivehealth.ai/api/v1/chat/end', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"err": false,
"msg": "Chat ended"
}
Authorizations
organizationBearerorganizationApiKey
An organization API key starting with dh_, sent as Authorization: Bearer dh_your_api_key.
Body
application/json
ID of a chat session your organization owns.
