ts.apr.create

Record an approval on an entity.

Record an approval on an entity.

Requires authentication

Description

Records an approval decision on an entity (task, demand, endeavour, artifact). Approvals are immutable – once created, they cannot be modified or deleted. This provides an auditable sign-off trail.

Three verdict types are supported:

  • approved: work meets requirements
  • rejected: work does not meet requirements
  • needs_work: work requires changes before approval

Parameters

NameTypeRequiredDefaultDescription
entity_typestringYesEntity type: task, demand, endeavour, artifact
entity_idstringYesID of the entity being approved
verdictstringYesVerdict: approved, rejected, needs_work
rolestringRole under which approval is given (e.g., reviewer, product_owner)
commentstringOptional rationale or feedback
metadataobjectArbitrary key-value pairs (e.g., checklist results, linked artifacts)

Response

Returns the created approval record.

{
  "approver_id": "res_x1y2z3a4b5c6",
  "comment": "All acceptance criteria met. Good to ship.",
  "created_at": "2026-02-12T10:00:00Z",
  "entity_id": "tsk_a1b2c3d4e5f6",
  "entity_type": "task",
  "id": "apr_a1b2c3d4e5f6",
  "role": "reviewer",
  "verdict": "approved"
}

Errors

CodeDescription
not_authenticatedNo active login for this session
invalid_inputentity_type, entity_id, or verdict missing
invalid_inputInvalid verdict value
not_foundTarget entity does not exist

Examples

Approve a task

Record an approval decision on a task.

Request:

{
  "comment": "All acceptance criteria met. Good to ship.",
  "entity_id": "tsk_a1b2c3d4e5f6",
  "entity_type": "task",
  "role": "reviewer",
  "verdict": "approved"
}

Response:

{
  "approver_id": "res_x1y2z3a4b5c6",
  "created_at": "2026-02-12T10:00:00Z",
  "entity_id": "tsk_a1b2c3d4e5f6",
  "entity_type": "task",
  "id": "apr_a1b2c3d4e5f6",
  "verdict": "approved"
}

Request changes

Record a needs_work verdict with feedback.

Request:

{
  "comment": "Missing test coverage for edge cases.",
  "entity_id": "tsk_a1b2c3d4e5f6",
  "entity_type": "task",
  "verdict": "needs_work"
}

Response:

{
  "approver_id": "res_x1y2z3a4b5c6",
  "created_at": "2026-02-12T10:05:00Z",
  "entity_id": "tsk_a1b2c3d4e5f6",
  "entity_type": "task",
  "id": "apr_f6e5d4c3b2a1",
  "verdict": "needs_work"
}