bots.createFromTemplate
Describe the agent in plain words and get a working draft.
Decibyl uses an LLM to generate the initial workflow definition from your description. The result is a fully editable agent — use Update to refine it after creation.
This is the fastest way to get a working agent, especially for common use cases like appointment booking, lead qualification, or customer support.
Reference
POST/api/v1/workflows/create/template
- Auth
- API key in
X-API-Key - Content
- application/json
- Returns
- 200 · WorkflowResponse
Create a new workflow from a natural language template request. This endpoint: 1. Asks MPS to generate a workflow, falling back to a locally-built starter workflow when MPS is unconfigured or unreachable (self-hosted deployments) 2. Passes organization ID (authenticated mode) or created_by (OSS mode) 3. Creates the workflow in the database Args: request: The template creation request with call_type, use_case, and activity_description user: The authenticated user Returns: The created workflow Raises: HTTPException: If MPS API call fails
Arguments
| Argument | In | Type | Required | Description |
|---|---|---|---|---|
call_type | body | "inbound" | "outbound" | default "inbound" | |
channel | body | "voice" | "chat" | optional | Where a bot does its work: on the phone, or in writing. Deliberately two values, and deliberately *not* the publisher-facing ``Channel`` in ``services/packs/_base.py``. That one names WhatsApp, email, Slack and Telegram because a marketplace listing can promise them; this one is read by the runtime, and the runtime has exactly two -- the pipecat pipeline and the text-chat runner. A third value here would be a claim the product cannot keep. ``VOICE`` says nothing about direction. Who rings whom is ``WorkflowModel.call_type``, which is unchanged: a voice bot is inbound or outbound as it always was, and a chat bot is neither, which is the whole point of this enum existing rather than a third ``CallType``. Stored in ``workflow_configurations``, so no migration and no new column on a table telephony reads. Absent means VOICE -- every bot that existed before this did was a call bot, and an unset field has to keep meaning what it meant. |
use_case | body | string | required | |
activity_description | body | string | default "" | |
objective | body | string | default "" | |
agent_name | body | string | default "" | |
agent_designation | body | string | default "" | |
company_name | body | string | default "" | |
company_description | body | string | default "" | |
industry | body | string | default "" | |
languages | body | string[] | optional | |
gender | body | string | default "" | |
tone | body | string | default "" | |
voice | body | string | default "" | |
preset | body | string | default "" | |
llm_tier | body | string | default "" | |
welcome_message | body | string | default "" | |
conversation_flow | body | string | default "" | |
guardrails | body | string[] | optional | |
closing_line | body | string | default "" | |
hangup_prompt | body | string | default "" |
Example request
curl -X POST "https://api.decibyl.ai/api/v1/workflows/create/template" \
-H "X-API-Key: dcb_your_key" \
-H "Content-Type: application/json" \
-d '{"call_type":"inbound","channel":"voice","use_case":"string","activity_description":"","objective":"","agent_name":"","agent_designation":"","company_name":"","company_description":"","industry":"","languages":["string"],"gender":"","tone":"","voice":"","preset":"","llm_tier":"","welcome_message":"","conversation_flow":"","guardrails":["string"],"closing_line":"","hangup_prompt":""}'Response
{
"id": 1,
"name": "string",
"status": "string",
"is_live": true,
"visibility": "everyone",
"created_at": "2026-09-14T09:30:00Z",
"workflow_definition": {},
"current_definition_id": 1,
"template_context_variables": {},
"call_disposition_codes": {
"disposition_codes": []
},
"total_runs": 1,
"workflow_configurations": {},
"version_number": 1,
"version_status": "string",
"workflow_uuid": "string"
}Errors
| Status | When |
|---|---|
404 | Not found |
422 | Validation Error |