Skip to main content
Templates let you define a reusable configuration — prompt, schema, and notifications — and apply it to multiple workflows. For an overview, see Templates.

Create a Template

Create a template, then publish a version with the configuration you want:
> "Create a template called 'Job Listing' with fields for title, company, location, and salary"
Each part (prompt, schema, notifications) is optional. Include only what you need.

Save a Workflow as a Template

Create a template from an existing workflow’s configuration:
> "Save workflow abc123 as a new template called 'Product Scraper'"
The includeParts parameter controls which parts of the workflow’s configuration to capture. If omitted, all parts are included. The source workflow is automatically linked to the template. You can also add a new version to an existing template by passing templateId instead of name:
// POST https://api.kadoa.com/v4/templates/from-workflow
{
  "workflowId": "abc456",
  "templateId": "template-789",
  "includeParts": ["schema"]
}

Publish a New Version

Every time you save changes to a template, a new version is published. Versions are immutable.
> "Add a new version to the Job Listing template with an additional 'remote' boolean field"
If a version includes a schema, you can provide fields inline with schemaFields and schemaEntity, or reference an existing schema with schemaId. These are mutually exclusive.
Associate existing workflows with a template. Linking applies the template’s latest version to the workflow and makes the template-managed parts read-only.
> "Link workflow abc123 to the Job Listing template"
A workflow can only be linked to one template at a time. If a workflow is already linked to a different template, the request returns a 409 conflict with details:
{
  "error": true,
  "code": "CONFLICT",
  "conflicts": [
    {
      "workflowId": "workflow-1",
      "workflowName": "My Workflow",
      "templateId": "other-template",
      "templateName": "Other Template"
    }
  ]
}
To override, pass force: true to relink the workflow. Remove the template association from workflows. The workflow keeps its current configuration — the prompt, schema, and notifications become editable again.
> "Unlink workflow abc123 from its template"

Apply Updates

When you publish a new template version, linked workflows are not updated automatically. Apply a specific version to workflows:
> "Apply version 2 of the Job Listing template to all linked workflows"
You can apply up to 100 workflows per request.

List Templates

> "List my templates"

Get Template Details

Retrieve a template with all its published versions:
> "Show me the Job Listing template"

List Linked Workflows

See which workflows are linked to a template and whether they’re on the latest version:
curl -X GET "https://api.kadoa.com/v4/templates/template-123/workflows" \
  -H "x-api-key: YOUR_API_KEY"
Each workflow in the response includes an isOutdated flag indicating whether a newer template version is available.

Update Template Metadata

Update a template’s name or description (this does not create a new version):
// PUT https://api.kadoa.com/v4/templates/template-123
{
  "name": "Updated Name",
  "description": "Updated description"
}

Delete a Template

Deleting a template unlinks all associated workflows. Their configurations are preserved.
> "Delete the Job Listing template"

API Reference