Docs

Docs

x-cpod-domain: approvals

Approvals

Approval requests and steps — the workflow surface.

Try in explorer client.approvals

ApprovalRequest

A request requiring approvals.

REST path/api/v1/approvals/requests
Operations
listgetcreatesubmitcancel
SDK
// list — returns only your records; add filters/search:
await client.approvals.requests.list()

// create:
await client.approvals.requests.create({
  id: "rec_01HXEXAMPLE",
  tenant_id: "example tenant_id",
  created_at: "2026-01-01T00:00:00Z",
  updated_at: "2026-01-01T00:00:00Z",
  app_id: "example app_id",
  created_by: "rec_01HXEXAMPLE",
})
FieldTypeDescription
id*uuidServer-assigned ULID with type prefix (e.g. per_…).
tenant_id*stringTenant scope — auto-stamped from the caller's JWT.
app_idstringApp scope. Stamped ONLY when the caller's JWT was minted for a specific Application (integration API keys). Absent for human-user sessions. Filters reads when present.
created_at*date-timeServer stamp.
updated_at*date-timeServer stamp; updated on every patch.
created_byuuidPerson id from the caller's JWT (sub).
updated_byuuidPerson id from the last writer's JWT (sub).
sourcestringProvenance tag — defaults to 'edm'.
source_typeenumWhere the write originated. Defaults to 'api'.frontendbackendserversystemapi
is_deletedbooleanSoft-delete flag. Excluded from default list queries.
deleted_atdate-timeStamped when soft-deleted; null otherwise.
deleted_byuuidPerson id who soft-deleted; null otherwise.
schema_versionnumberDocument schema version. Bumped on incompatible writes.
entity_typestringEDM entity type being approved (e.g. 'Expense', 'LeaveRequest', 'Contract', 'PurchaseOrder').
entity_iduuidUUID of the specific entity instance awaiting approval.
requested_by_iduuidUUID of the Person who initiated this approval request.
titlestringHuman-readable title summarising what is being approved.
descriptionstringOptional longer description or justification for the approval request.
statusstringOverall status of the approval request.
current_step_indexnumberZero-based index of the currently active approval step.
total_stepsnumberTotal number of approval steps required before the request is fully approved.
due_atdate-timeISO 8601 deadline by which the approval must be completed. Null if no deadline applies.
completed_atdate-timeISO 8601 timestamp when the approval reached a terminal state (approved, rejected, cancelled, or expired). Null while still pending.
requester_iduuidUser who initiated this approval request.
tagsjsonFree-form tags categorising the request (e.g. ['leave', 'q2']).

ApprovalStep

A step in an ApprovalRequest's chain.

REST path/api/v1/approvals/steps
Operations
listgetapprovereject
SDK
// list — returns only your records; add filters/search:
await client.approvals.steps.list()
FieldTypeDescription
id*uuidServer-assigned ULID with type prefix (e.g. per_…).
tenant_id*stringTenant scope — auto-stamped from the caller's JWT.
app_idstringApp scope. Stamped ONLY when the caller's JWT was minted for a specific Application (integration API keys). Absent for human-user sessions. Filters reads when present.
created_at*date-timeServer stamp.
updated_at*date-timeServer stamp; updated on every patch.
created_byuuidPerson id from the caller's JWT (sub).
updated_byuuidPerson id from the last writer's JWT (sub).
sourcestringProvenance tag — defaults to 'edm'.
source_typeenumWhere the write originated. Defaults to 'api'.frontendbackendserversystemapi
is_deletedbooleanSoft-delete flag. Excluded from default list queries.
deleted_atdate-timeStamped when soft-deleted; null otherwise.
deleted_byuuidPerson id who soft-deleted; null otherwise.
schema_versionnumberDocument schema version. Bumped on incompatible writes.
approval_request_iduuidUUID of the parent ApprovalRequest.
step_indexnumberZero-based position of this step in the approval chain.
approver_iduuidUUID of the Person assigned to decide on this step.
statusstringCurrent state of this step.
decisionstringThe approver's explicit decision. Null while the step is still pending.
commentstringOptional comment or justification left by the approver alongside their decision.
decided_atdate-timeISO 8601 timestamp when the approver made their decision. Null while still pending.
delegated_to_iduuidUUID of the Person this step was delegated to. Null unless status is 'delegated'.
request_iduuidParent approval request this step belongs to.
delegatedbooleanTrue once the step has been reassigned to another approver.