Skip to main content
POST
/
templates
Create template
curl --request POST \
  --url https://app.harmonica.chat/api/v1/templates \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "description": "<string>",
  "icon": "<string>",
  "facilitation_prompt": "<string>",
  "default_session_name": "<string>",
  "default_goal": "<string>",
  "default_critical": "<string>",
  "default_context": "<string>",
  "is_public": false,
  "workspace_id": "<string>"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "title": "<string>",
  "template_type": "<string>",
  "cross_pollination_default": true,
  "is_public": true,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "description": "<string>",
  "icon": "<string>",
  "facilitation_prompt": "<string>",
  "default_session_name": "<string>",
  "default_goal": "<string>",
  "default_critical": "<string>",
  "default_context": "<string>",
  "chain_config": {
    "steps": [
      {
        "id": "<string>",
        "title": "<string>",
        "description": "<string>",
        "facilitation_prompt": "<string>",
        "default_session_name": "<string>",
        "individual_memory": true,
        "roles": [
          {
            "slug": "<string>",
            "label": "<string>"
          }
        ],
        "completion_criteria": {}
      }
    ],
    "output_artifact": "wardley"
  },
  "workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_by": "<string>",
  "archived_at": "2023-11-07T05:31:56Z",
  "source_provenance": {
    "spec_id": "<string>",
    "spec_version": "<string>",
    "registry": "<string>",
    "install_hash": "<string>",
    "installed_at": "2023-11-07T05:31:56Z",
    "installed_by": "<string>"
  }
}

Authorizations

Authorization
string
header
required

API key authentication. Pass your key as a Bearer token. Keys use the format hm_live_<32 hex chars>. Generate keys from your Harmonica dashboard settings.

Body

application/json
title
string
required
description
string | null
icon
string | null
facilitation_prompt
string | null
default_session_name
string | null
default_goal
string | null
default_critical
string | null
default_context
string | null
is_public
boolean
default:false
workspace_id
string | null

When set, creates a workspace-scoped template (caller must be a workspace admin).

template_type
enum<string>

Pass 'chain' (with chain_config) to install a chain method-spec (HAR-1098). Defaults to 'single'.

Available options:
single,
chain
chain_config
object

Multi-step chain definition (used when template_type is 'chain'). Validated server-side (HAR-915): at least one step, unique step ids, valid role / assignment / completion shapes.

source_provenance
object

Spec identity for a registry install; the server stamps install_hash + timestamps (HAR-1108).

Response

Template created

id
string<uuid>
required
title
string
required
template_type
string
required

single or chain

cross_pollination_default
boolean
required
is_public
boolean
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
description
string | null
icon
string | null
facilitation_prompt
string | null
default_session_name
string | null
default_goal
string | null
default_critical
string | null
default_context
string | null
chain_config
object

Chain definition for chain templates; null for single templates (HAR-1098).

workspace_id
string<uuid> | null
created_by
string | null
archived_at
string<date-time> | null
source_provenance
object

Provenance for a template installed from the OFL method-specs registry; null for admin-authored templates (HAR-1108).