Send a message
curl --request POST \
--url https://backend.drivehealth.ai/api/v1/chat/message \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"chat_id": "9f8e7d6c-5b4a-4938-8271-6a5b4c3d2e1f",
"message": "What time is my appointment?"
}
'import requests
url = "https://backend.drivehealth.ai/api/v1/chat/message"
payload = {
"chat_id": "9f8e7d6c-5b4a-4938-8271-6a5b4c3d2e1f",
"message": "What time is my appointment?"
}
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',
message: 'What time is my appointment?'
})
};
fetch('https://backend.drivehealth.ai/api/v1/chat/message', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"err": false,
"msg": "Success",
"results": {
"response": "Your appointment is on Thursday at 2pm.",
"chat_id": "9f8e7d6c-5b4a-4938-8271-6a5b4c3d2e1f"
}
}Chat
Send a message
Send a message to a chat session and wait for the caregiver’s reply.
POST
/
api
/
v1
/
chat
/
message
Send a message
curl --request POST \
--url https://backend.drivehealth.ai/api/v1/chat/message \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"chat_id": "9f8e7d6c-5b4a-4938-8271-6a5b4c3d2e1f",
"message": "What time is my appointment?"
}
'import requests
url = "https://backend.drivehealth.ai/api/v1/chat/message"
payload = {
"chat_id": "9f8e7d6c-5b4a-4938-8271-6a5b4c3d2e1f",
"message": "What time is my appointment?"
}
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',
message: 'What time is my appointment?'
})
};
fetch('https://backend.drivehealth.ai/api/v1/chat/message', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"err": false,
"msg": "Success",
"results": {
"response": "Your appointment is on Thursday at 2pm.",
"chat_id": "9f8e7d6c-5b4a-4938-8271-6a5b4c3d2e1f"
}
}Authorizations
organizationBearerorganizationApiKey
An organization API key starting with dh_, sent as Authorization: Bearer dh_your_api_key.
Body
application/json
