Documentation menu

API reference

15 operations in admin. Raw spec: openapi.json.

GET/api/v1/reply-snippets

GET /api/v1/reply-snippets — the org's snippet library with the search-in-composer predicate applied (`board_id` offer filter + `q` case-insensitive substring over name and body).

Parameters

NameInTypeRequiredDescription
board_idquerystringNoOffer-board filter: only snippets scoped to every board or this board (the composer passes the ticket's board).
qquerystringNoSearch-in-composer predicate: case-insensitive substring over the snippet's name and body.

Responses

StatusDescription
200
403requires tickets:view or admin:view

Security: bearer

POST/api/v1/reply-snippets

POST /api/v1/reply-snippets — add a snippet to the library.

Request body

CreateReplySnippetRequest

Responses

StatusDescription
200
403requires admin:create
422validation failure (name/body, or out-of-vocabulary variable)

Security: bearer

GET/api/v1/reply-snippets/{id}

GET /api/v1/reply-snippets/{id} — fetch one snippet (cross-lane fix, Wave 34 lane 4: the fork-on-edit flow reads the origin after forking; the route was missing so reads 405'd).

Parameters

NameInTypeRequiredDescription
idpathstringYes

Responses

StatusDescription
200
403requires tickets:view or admin:view
404

Security: bearer

PATCH/api/v1/reply-snippets/{id}

PATCH /api/v1/reply-snippets/{id} — edit a snippet in place (the library is org-owned data; fork-on-edit applies when orgs want a divergent copy, via the fork endpoint).

Parameters

NameInTypeRequiredDescription
idpathstringYes

Request body

UpdateReplySnippetRequest

Responses

StatusDescription
200
403requires admin:edit
404snippet not visible in scope
409version gate rejected the write (IF3)
422validation failure

Security: bearer

DELETE/api/v1/reply-snippets/{id}

DELETE /api/v1/reply-snippets/{id} — remove a snippet from the library.

Parameters

NameInTypeRequiredDescription
idpathstringYes

Responses

StatusDescription
200
403requires admin:delete
404snippet not visible in scope

Security: bearer

POST/api/v1/reply-snippets/{id}/fork

POST /api/v1/reply-snippets/{id}/fork — duplicate a snippet into a new editable copy (templates fork-on-edit provenance pattern). The origin is untouched; the copy records `forked_from`.

Parameters

NameInTypeRequiredDescription
idpathstringYes

Request body

ForkReplySnippetRequest

Responses

StatusDescription
200
403requires admin:create
404snippet not visible in scope
422validation failure

Security: bearer

POST/api/v1/reply-snippets/{id}/render

POST /api/v1/reply-snippets/{id}/render — resolve the snippet's variable tokens against a real ticket context and return the rendered body (the composer inserts the RENDERED text; the portal reply renders the result). Out-of-vocabulary placeholders are typed 400s.

Parameters

NameInTypeRequiredDescription
idpathstringYes

Request body

RenderReplySnippetRequest

Responses

StatusDescription
200
400out-of-vocabulary or malformed variable
403requires tickets:view or admin:view
404snippet or ticket not visible in scope

Security: bearer

GET/api/v1/templates

GET /api/templates — the org's templates (shipped defaults first, then org-owned rows), optionally filtered by kind.

Parameters

NameInTypeRequiredDescription
kindquerystringNofilter to one template kind
limitqueryintegerNo
offsetqueryintegerNo

Responses

StatusDescription
200
403requires admin:view

Security: bearer

POST/api/v1/templates

POST /api/templates — create an org-owned template (shipped defaults are seed data; fork them instead of copying by hand).

Request body

CreateTemplateRequest

Responses

StatusDescription
200
400validation failure (unknown kind, bad slug, out-of-vocabulary variable)
403requires admin:create
409slug taken or idempotency key reused

Security: bearer

GET/api/v1/templates/{id}

GET /api/templates/{id}

Parameters

NameInTypeRequiredDescription
idpathstringYes

Responses

StatusDescription
200
403requires admin:view
404template not visible in scope

Security: bearer

PATCH/api/v1/templates/{id}

PATCH /api/templates/{id} — edit an org-owned template's content. Shipped defaults are immutable (typed 409 `template_immutable`): fork first, edit the fork.

Parameters

NameInTypeRequiredDescription
idpathstringYes

Request body

UpdateTemplateRequest

Responses

StatusDescription
200
404template not visible in scope
409template immutable, version conflict, or idempotency key reused
422validation failure

Security: bearer

DELETE/api/v1/templates/{id}

DELETE /api/templates/{id} — remove an org-owned template. Shipped defaults are immutable (typed 409 `template_immutable`).

Parameters

NameInTypeRequiredDescription
idpathstringYes

Responses

StatusDescription
200
404template not visible in scope
409template immutable or idempotency key reused

Security: bearer

POST/api/v1/templates/{id}/fork

POST /api/templates/{id}/fork — duplicate a template (typically a shipped default) into a mutable org-owned copy. The origin row is untouched.

Parameters

NameInTypeRequiredDescription
idpathstringYes

Request body

ForkTemplateRequest

Responses

StatusDescription
200
404template not visible in scope
409slug taken or idempotency key reused
422validation failure

Security: bearer

POST/api/v1/templates/{id}/render

POST /api/templates/{id}/render — resolve the template's typed variables against real entity context and return the rendered subject/body. Out-of-vocabulary placeholders are typed 400s, never silent empties (KB3).

Parameters

NameInTypeRequiredDescription
idpathstringYes

Request body

RenderTemplateRequest

Responses

StatusDescription
200
400out-of-vocabulary or malformed variable
403requires admin:view
404template or context entity not visible in scope

Security: bearer

POST/api/v1/templates/{id}/restore

POST /api/templates/{id}/restore — reset a shipped default's content to the canonical copy (KB4: presets stay canonical, orgs fork). Org-owned rows and forks are org-owned data and are never restorable.

Parameters

NameInTypeRequiredDescription
idpathstringYes

Request body

RestoreTemplateRequest

Responses

StatusDescription
200
404template not visible in scope, or not a shipped default
409version conflict or idempotency key reused

Security: bearer