LemuAI

Create from Definition

Create a voice agent from an explicit workflow definition

Creates an agent from a node and edge graph you provide directly. Use this when you want full control over the workflow structure, or when programmatically generating agents.

The workflow_definition object contains nodes (the steps in the conversation) and edges (transitions between steps). See Editing a Workflow for the full schema.

POST/api/v1/workflow/create/definition

Request body#

FieldTypeRequiredDescription
namestringYes—
workflow_definitionobjectYes—

Example request body:

{
  "name": "Example Name",
  "workflow_definition": {}
}

Responses#

200 — Successful Response

{
  "id": 0,
  "name": "Example Name",
  "status": "string",
  "created_at": "2026-01-15T10:30:00Z",
  "workflow_definition": {},
  "current_definition_id": 0,
  "template_context_variables": {},
  "call_disposition_codes": {},
  "total_runs": 0,
  "workflow_configurations": {}
}

404 — Not found

422 — Validation Error

{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

© 2026 LemuAI. Built with our own docs platform.