Pathway Chat
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
}
Pathway Chat
Pathway Chat
Send a message to a pathway and receive a response.
POST
/
v1
/
pathway
/
chat
/
{id}
Pathway Chat
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
}
Headers
Your API key for authentication.
Path Parameters
The chat ID created from the /pathway/chat/create endpoint.
Body
The message to send to the pathway (optional)
Response
Contains the response data for the pathway chat message.
Show data properties
Show data properties
The ID of the chat instance.
An array of strings containing the assistant’s responses to the message sent.
The ID of the current node in the pathway after processing the message.
The name of the current node in the pathway.
An array of objects containing the role and content of each message in the external chat history.
The ID of the pathway the chat is associated with.
The version of the pathway being used, or null if not specified.
Whether the candidate model is being used for this pathway chat.
The current state of variables in the pathway execution.
Whether the pathway has completed execution.
Will be
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
}
Docs for agents: llms.txt
Was this page helpful?
⌘I