Send a message
POST
/v2/health-navigator/messages
const url = 'https://client-api.abi.ai/v2/health-navigator/messages';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"userId":"abi12345","text":"I have a headache and a sore throat."}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://client-api.abi.ai/v2/health-navigator/messages \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "userId": "abi12345", "text": "I have a headache and a sore throat." }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
userId
required
Abi user identifier for the conversation.
string
Example
abi12345text
required
User message sent to Health Navigator.
string
Example
I have a headache and a sore throat.Example
{ "userId": "abi12345", "text": "I have a headache and a sore throat."}Responses
Section titled “Responses”Message accepted for delivery. The receipt contains the message identifier and current conversation status.
Media typeapplication/json
object
userId
Abi user identifier.
string
messageId
Identifier of the accepted user message.
string
conversationInfo
object
id
Conversation identifier.
string
status
Current conversation lifecycle status.
string
Example
{ "userId": "abi12345", "messageId": "01K9F5PWBM2AFT1RG7TMN3YG1R", "conversationInfo": { "id": "01HK8GGQ123456789ABCDEFGHI", "status": "OPEN" }}Request could not be completed.
Media typeapplication/json
object
code
Short machine-readable error code.
string
message
Human-readable explanation of the error.
string
Examplegenerated
{ "code": "example", "message": "example"}Request could not be completed.
Media typeapplication/json
object
code
Short machine-readable error code.
string
message
Human-readable explanation of the error.
string
Examplegenerated
{ "code": "example", "message": "example"}