curl --request POST \
--url https://us.api.bland.ai/v1/pathway/chat/{id} \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--data '
{
"message": "<string>"
}
'{
"data": {
"chat_id": "12345678-1234-1234-1234-123456789012",
"assistant_responses": ["Hey there, this is the Bland Bistro reservation line. Do you want to make a reservation?"],
"current_node_id": "1",
"current_node_name": "Start",
"chat_history": [
{"role": "user", "content": "hello"},
{"role": "assistant", "content": "Hey there, this is the Bland Bistro reservation line. Do you want to make a reservation?"}
],
"pathway_id": "87654321-4321-4321-4321-210987654321",
"pathway_version": null,
"use_candidate_model": false,
"variables": {
"callID": "12345678-1234-1234-1234-123456789012"
},
"completed": false
},
"errors": null
}
Send a message to a pathway and receive a response.
curl --request POST \
--url https://us.api.bland.ai/v1/pathway/chat/{id} \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--data '
{
"message": "<string>"
}
'{
"data": {
"chat_id": "12345678-1234-1234-1234-123456789012",
"assistant_responses": ["Hey there, this is the Bland Bistro reservation line. Do you want to make a reservation?"],
"current_node_id": "1",
"current_node_name": "Start",
"chat_history": [
{"role": "user", "content": "hello"},
{"role": "assistant", "content": "Hey there, this is the Bland Bistro reservation line. Do you want to make a reservation?"}
],
"pathway_id": "87654321-4321-4321-4321-210987654321",
"pathway_version": null,
"use_candidate_model": false,
"variables": {
"callID": "12345678-1234-1234-1234-123456789012"
},
"completed": false
},
"errors": null
}
Show data properties
null on success. Contains error details if the request failed.{
"data": {
"chat_id": "12345678-1234-1234-1234-123456789012",
"assistant_responses": ["Hey there, this is the Bland Bistro reservation line. Do you want to make a reservation?"],
"current_node_id": "1",
"current_node_name": "Start",
"chat_history": [
{"role": "user", "content": "hello"},
{"role": "assistant", "content": "Hey there, this is the Bland Bistro reservation line. Do you want to make a reservation?"}
],
"pathway_id": "87654321-4321-4321-4321-210987654321",
"pathway_version": null,
"use_candidate_model": false,
"variables": {
"callID": "12345678-1234-1234-1234-123456789012"
},
"completed": false
},
"errors": null
}
Was this page helpful?