Read a chat session
curl --request GET \
--url https://backend.drivehealth.ai/api/v1/chat/{chat_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://backend.drivehealth.ai/api/v1/chat/{chat_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://backend.drivehealth.ai/api/v1/chat/{chat_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"err": false,
"msg": "Success",
"results": {
"chat_id": "9f8e7d6c-5b4a-4938-8271-6a5b4c3d2e1f",
"assistant_id": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"assistant_name": "Appointments",
"status": "active",
"user_message_count": 1,
"assistant_message_count": 2,
"history": [
{
"role": "assistant",
"content": "Hello, how can I help?"
},
{
"role": "user",
"content": "What time is my appointment?"
},
{
"role": "assistant",
"content": "Your appointment is on Thursday at 2pm."
}
]
}
}Chat
Read a chat session
Read one chat session and its message history.
GET
/
api
/
v1
/
chat
/
{chat_id}
Read a chat session
curl --request GET \
--url https://backend.drivehealth.ai/api/v1/chat/{chat_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://backend.drivehealth.ai/api/v1/chat/{chat_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://backend.drivehealth.ai/api/v1/chat/{chat_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"err": false,
"msg": "Success",
"results": {
"chat_id": "9f8e7d6c-5b4a-4938-8271-6a5b4c3d2e1f",
"assistant_id": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"assistant_name": "Appointments",
"status": "active",
"user_message_count": 1,
"assistant_message_count": 2,
"history": [
{
"role": "assistant",
"content": "Hello, how can I help?"
},
{
"role": "user",
"content": "What time is my appointment?"
},
{
"role": "assistant",
"content": "Your appointment is on Thursday at 2pm."
}
]
}
}Authorizations
organizationBearerorganizationApiKey
An organization API key starting with dh_, sent as Authorization: Bearer dh_your_api_key.
Path Parameters
ID of a chat session your organization owns.
