Get Template

Fetch a template by id if visible (own, public, or starter).

Dual-auth: Clerk JWT or op_live_* API key (scope templates:read).

Authentication

AuthorizationBearer
Clerk JWT token
OR
AuthorizationBearer

Onepin live API key (op_live_...). Test and public keys are reserved in Phase 1.

Path parameters

template_idstringRequiredformat: "uuid"

Headers

X-Workspace-Idstring or nullOptional

Response

Successful Response
dataobject

Response shape. workspace_id is intentionally omitted so the gallery endpoint (which returns rows from any workspace) does not leak tenant ownership IDs across tenants. created_by is retained as author provenance for public/starter rows.

definition is the serialized WorkflowDefinition JSONB (same shape as Workflow.definition) — a template is a reusable workflow snapshot.

metaobject

Errors

422
Unprocessable Entity Error