Run one turn of the flow builder conversation.
Changed onNot released and not yet evaluated by a human; do not build on it. There is no on/off setting: wherever the platform key is configured this endpoint answers and the platform pays for each call.
Sends the whole conversation so far and receives the builder's next message, plus a draft flow once it has enough information. Nothing is saved: the draft only fills the flow editor, and the user reviews it and saves it through POST /flows.
The server keeps no conversation. The client sends the full history and the latest draft on every turn. Each message must be user or assistant, and the last one must be user. Strict alternation is not enforced.
supported_action_types is the list of action types the client's editor can render and round-trip faithfully. The server uses only the types that are both allowed for the builder and in this list, so a client can only narrow what the builder offers.
The draft is decided by the server, not by the model's prose. Every id is generated by the server and every reference between actions is resolved by it. Resource references (queues, assistants, other flows, and so on) are always left empty and reported with select_resource in draft_warnings; the user picks them in the editor.
The request body may not exceed 512 KiB (524288 bytes), which is enforced while the body is read; a larger body is answered with BUILDER_INPUT_TOO_LARGE (400). The per-message and total limits of the conversation are the ones reported by GET /ai_builder/status. A draft may have at most 60 actions.
Each call counts against a per-customer daily limit that is separate from the assistant builder's, from the moment it starts running. That includes a call that then fails (a provider error, a timeout, or a model answer that could not be used). A call refused because the request was invalid, the builder was unavailable, or the service was busy, is not counted.
Requires an Agent identity with the customer admin or manager permission. Availability is reported by GET /ai_builder/status.
Request
- Base URL: https://api.voipbin.net/v1.0
- URL: https://api.voipbin.net/v1.0/flow_builder/chat
- Auth: none declared
Request body
Example request
{
"messages": [
{
"role": "user",
"content": "I run a dental clinic and want an assistant that answers the phone."
}
],
"current_draft": {
"actions": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"next_id": "550e8400-e29b-41d4-a716-446655440000",
"type": "talk",
"tm_execute": "2026-01-15T09:30:00.000000Z"
}
]
},
"supported_action_types": [
"talk",
"digits_receive",
"branch",
"hangup"
]
}Response
The builder's next message and, when ready, a draft.
Example response
{
"message": "Should callers be able to leave a message when nobody answers?",
"draft": {
"actions": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"next_id": "550e8400-e29b-41d4-a716-446655440000",
"type": "talk",
"tm_execute": "2026-01-15T09:30:00.000000Z"
}
]
},
"assumptions": [
"Callers speak English."
],
"draft_warnings": [
"select_resource: sales.queue_id"
],
"sensitive_nodes": [
"550e8400-e29b-41d4-a716-446655440000"
]
}Changes
- ○
endpoint added
- ○