curl --request PUT \
--url https://api.talkpilot.io/v1/agents/{agentId}/workflow \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Inbound Call Flow",
"description": "intent_analysis routes, callback_info is terminal.",
"steps": [
{
"id": "intent_analysis",
"name": "Anruf-Analyse",
"description": "Erkenne das Anliegen und route weiter.",
"completion": "Anliegen erkannt und weitergeleitet.",
"step_type": "prompt",
"next": [
{
"id": "callback_info"
}
]
},
{
"id": "callback_info",
"name": "Rückruf-Daten aufnehmen",
"description": "Nimm die fehlenden Pflichtangaben auf.",
"completion": "Daten erfasst, Anruf beendet.",
"step_type": "prompt",
"next": []
}
]
}
'{
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflow": {
"name": "<string>",
"steps": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"completion": "<string>",
"step_type": "prompt",
"tools": [
"<string>"
],
"next": [
{
"id": "<string>"
}
]
}
],
"description": "<string>"
},
"updated_at": "2023-11-07T05:31:56Z"
}Workflow
Replace workflow
Replaces the workflow completely — there is no partial update. The body
may be the workflow object itself or wrapped as {"workflow": {...}}.
Send {"workflow": null} to remove the workflow; the agent then runs as a
single-prompt agent again.
The workflow is validated against the same rules the voice runtime
enforces. An invalid workflow is rejected with 400 VALIDATION_ERROR
listing every problem found, and nothing is written.
PUT
/
v1
/
agents
/
{agentId}
/
workflow
curl --request PUT \
--url https://api.talkpilot.io/v1/agents/{agentId}/workflow \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Inbound Call Flow",
"description": "intent_analysis routes, callback_info is terminal.",
"steps": [
{
"id": "intent_analysis",
"name": "Anruf-Analyse",
"description": "Erkenne das Anliegen und route weiter.",
"completion": "Anliegen erkannt und weitergeleitet.",
"step_type": "prompt",
"next": [
{
"id": "callback_info"
}
]
},
{
"id": "callback_info",
"name": "Rückruf-Daten aufnehmen",
"description": "Nimm die fehlenden Pflichtangaben auf.",
"completion": "Daten erfasst, Anruf beendet.",
"step_type": "prompt",
"next": []
}
]
}
'{
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflow": {
"name": "<string>",
"steps": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"completion": "<string>",
"step_type": "prompt",
"tools": [
"<string>"
],
"next": [
{
"id": "<string>"
}
]
}
],
"description": "<string>"
},
"updated_at": "2023-11-07T05:31:56Z"
}Authorizations
API key for external access. Format: tp_live_<32-hex-chars>.
Create keys in the TalkPilot Dashboard under Settings > API.
Path Parameters
Agent UUID
Body
application/json