Skip to content

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

ArgumentInTypeRequiredDescription
call_typebody"inbound" | "outbound"default "inbound"
channelbody"voice" | "chat"optionalWhere 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_casebodystringrequired
activity_descriptionbodystringdefault ""
objectivebodystringdefault ""
agent_namebodystringdefault ""
agent_designationbodystringdefault ""
company_namebodystringdefault ""
company_descriptionbodystringdefault ""
industrybodystringdefault ""
languagesbodystring[]optional
genderbodystringdefault ""
tonebodystringdefault ""
voicebodystringdefault ""
presetbodystringdefault ""
llm_tierbodystringdefault ""
welcome_messagebodystringdefault ""
conversation_flowbodystringdefault ""
guardrailsbodystring[]optional
closing_linebodystringdefault ""
hangup_promptbodystringdefault ""

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

StatusWhen
404Not found
422Validation Error