Skip to main content

List Templates

GET /api/projects/:projectId/templates
Returns all prompt templates for a project.
[
  {
    "id": 1,
    "projectId": 1,
    "name": "Feature Template",
    "content": "You are working on {{project_name}}...",
    "taskType": "feature",
    "model": "sonnet",
    "thinkingEffort": "medium",
    "createdAt": "2025-01-15T10:00:00Z"
  }
]

Get Template

GET /api/projects/:projectId/templates/:id

Create Template

POST /api/projects/:projectId/templates
Content-Type: application/json
{
  "name": "Feature Template",
  "content": "You are working on {{project_name}}.\nTask: {{task_title}}\nType: {{task_type}}\n\nWrite clean, tested code.",
  "taskType": "feature",
  "model": "sonnet",
  "thinkingEffort": "medium"
}
FieldRequiredDefaultDescription
nameYesTemplate display name
contentYesTemplate text with optional {{variables}}
taskTypeNoAuto-apply to this task type
modelNoDefault model when template is used
thinkingEffortNoDefault thinking effort

Template Variables

VariableResolves To
{{project_name}}Project name
{{task_title}}Task title
{{task_type}}Task type (feature, bugfix, etc.)
{{priority}}Priority level
{{model}}Selected model

Update Template

PUT /api/projects/:projectId/templates/:id
Content-Type: application/json
Accepts the same fields as Create.

Delete Template

DELETE /api/projects/:projectId/templates/:id