Skip to main content

Templates API

The template library holds starting points you begin an app or a workflow from instead of building it from scratch.

  • Platform templates are on every instance. The platform owns them (ownerId "system"): every user may use them, and no one changes or deletes them. Each has a key, and its id is platform-<key>.
    • react-starter (kind app) is the starter app that every app build starts from.
    • The workflow templates are rag-document-qa, rag-knowledge-ingest, rag-knowledge-search, scheduled-report, inbound-triage, webhook-llm-store and scheduled-llm-store.
  • Your templates are workflows you saved as templates. You share them like any Library resource.

A workflow template names the choices it leaves to whoever uses it, in bindings: a model, an add-on, an endpoint and the like. Each one is a setting of one of its nodes. Its guide says how to adapt it.

All endpoints require authentication via the X-API-Key header and the scope shown.


Template Object​

{
"_id": "platform-rag-document-qa",
"key": "rag-document-qa",
"kind": "workflow",
"name": "RAG Document Q&A",
"description": "Ingest documents into a vector store and answer questions from them.",
"tags": ["rag", "documents", "qa"],
"version": "1.0.0",
"guide": "A STARTER you adapt to the user's docs and tools ...",
"bindings": [
{ "node": "answer", "key": "model", "kind": "ai-model", "description": "A CHAT model (list_ai_models)." },
{ "node": "vector_store", "key": "addonId", "kind": "addon", "description": "A Milvus add-on for the vector store." }
],
"source": "platform",
"ownerId": "system",
"ownerName": "System",
"organizationId": null,
"sharedWith": [],
"isPublic": false,
"nodeCount": 11,
"createdAt": "2026-10-21T03:00:00.000Z",
"updatedAt": "2026-10-21T03:00:00.000Z"
}
FieldDescription
kindapp (a starter app) or workflow (a graph to start from)
sourceplatform (the template library, on every instance) or user (a workflow a user saved)
keyA platform template's key; its _id is platform-<key>
bindingsA workflow template's choices: node (a node id), key (its setting), kind (ai-model, addon, datasource, endpoint, credential or value) and description
guideHow to adapt it to a use case
workflowA workflow template's graph, { nodes, connections }, on GET /library/templates/:id
fromWorkflowIdThe workflow a user's template was saved from

GET /api/v1/library/templates​

List the templates you may use, a page at a time. Each template is its summary: _id, key, kind, name, description, tags, version, source, ownerId, ownerName, organizationId, sharedWith, isPublic, fromWorkflowId, createdAt, updatedAt and, for a workflow template, nodeCount. Its guide, bindings and graph are on GET /library/templates/:id.

Scope: templates:read

QueryDescription
kindapp or workflow
sourceplatform or user
qText in the name, description or tags
limit, cursorPaging

GET /api/v1/library/templates/:id​

Get a template, with a workflow template's graph.

Scope: templates:read


POST /api/v1/library/templates​

Save one of your workflows as a template. An agent cannot be saved this way: agents start from the Agent Builder. The template copies the workflow's graph, and keeps the names of its environment variables but never their values.

Scope: templates:write

FieldTypeRequiredDescription
workflowIdstringYesThe workflow to save
kindstringNoworkflow, the only kind you save
namestringNoIts name (default: the workflow's)
descriptionstringNoIts description (default: the workflow's)
tagsstring[]NoIts tags (default: the workflow's)
guidestringNoHow to adapt it

Response 201 Created: the Template object.


PATCH /api/v1/library/templates/:id​

Change the name, description, tags or guide of a template you saved. A platform template cannot be changed (403).

Scope: templates:write


DELETE /api/v1/library/templates/:id​

Delete a template you saved. Workflows started from it are not affected. A platform template cannot be deleted (403).

Scope: templates:write

Response 204 No Content.


POST /api/v1/library/templates/:id/use​

Start from a template.

Scope: templates:write

A workflow template makes a new draft workflow that you own.

  • bindings fills the choices the template names: { "<node id>.<setting>": value }. For a template you saved, any setting of its nodes can be filled this way.
  • A choice you do not fill stays a placeholder (__SELECT_CHAT_MODEL__ and the like). The workflow names it as not selected until you set it in the node's settings.
FieldTypeRequiredDescription
namestringNoThe new workflow's name (default: the template's)
descriptionstringNoIts description
tagsstring[]NoIts tags
bindingsobjectNo{ "<node id>.<setting>": value }

Response 201 Created:

{ "data": { "kind": "workflow", "templateId": "platform-rag-document-qa", "workflowId": "a1b2c3d4e5f6g7h8i" } }

An app template makes a workspace on its starter app and a code session driving a coding assistant there, in a new project or an existing one:

  • Without projectId, a new project named name whose code is the starter app (codeFolder is "").
  • With projectId, an existing project you can edit, on the Strongly filesystem: the starter app is added to the project's code as one commit, in a new folder named after name (lowercased, with dashes for other characters; codeFolder). The project's own files are not changed. A folder that already exists is refused with 409, a project you cannot edit with 403, and a GitHub project with 400.
FieldTypeRequiredDescription
namestringYesThe new project's name, or with projectId the starter app's folder name
projectIdstringNoAn existing project to start in
descriptionstringNoIts description
environmentIdstringOne of theseThe workspace's size, as an environment
customResourcesobjectOne of theseOr a custom size { cpu, memory, disk, gpu? }
assistantstringNoclaude-code (default) or codex

Response 201 Created:

{ "data": { "kind": "app", "templateId": "platform-react-starter", "projectId": "p1", "codeFolder": "customer-portal", "sessionId": "s1", "workspaceId": "w1", "status": "provisioning" } }

Unknown bindings (a setting the template does not name) are refused with 400.


Permissions​

A template you saved is shared with /api/v1/library/templates/:id/permissions (scopes templates:read and templates:write), as every shareable resource is (see the API overview's sharing rules: GET …/permissions, POST …/permissions/members, DELETE …/permissions/members/:userId, PATCH …/permissions).