Notify API reference

Notify API · Approvals

post/v1/workspaces/{workspace_id}/approvals/{approval_id}/decisionAuth

Record an approver's answer

For answers you collected yourself (your own UI, a phone call): records `approve` or `reject` for one of the approvers, exactly as if they had pressed the button (`decided_via: api`). Never give this to the agent that made the request: it is how a human's answer gets in, so it is not an MCP tool.

Path parameters

workspace_id*string · uuid

Id of the workspace.

approval_id*string · uuid

The approval request id.

Request body

decision*object

`approve` or `reject`.

reasonstring

Why (required when the type says so).

approver*string

The approver who answered (one of `approvers`), for answers you collected yourself.

Example: "user_123"

Response · 200 Decided.

id*string · uuid

The approval request id.

type*string

The notification type key.

Example: "deploy.approval"

status*object

`pending` until someone answers; then `approved` or `rejected`; `expired` (or the type's timeout outcome) when nobody answered in time; `cancelled` when the requester withdrew it.

title*string

The question.

body*string

The details.

requester*object

Who asked.

approvers*array

Approver external ids (null entries for erased recipients are dropped).

metadata*object

Your metadata, as sent.

expires_at*string · date-time

When it times out.

decided_by*string

Who answered (external id); null while pending, on timeout or cancel.

reason*string

The approver's reason, if they gave one.

decided_via*object

Where the answer came from: `inbox` (in-app buttons or `<NotifyApproval/>`), `hosted_page` (the link in an email or push), `api` (your backend), `timeout`.

decided_at*string · date-time

When it was answered, expired or cancelled.

notification_id*string · uuid

The notification that carried it (see the message log for every channel's delivery).

created_at*string · date-time

Created.

Example

Request

POST https://api.notify.productcraft.co/v1/workspaces/{workspace_id}/approvals/{approval_id}/decision
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{
  "decision": {},
  "reason": "string",
  "approver": "user_123"
}

Response

{
  "id": "00000000-0000-0000-0000-000000000000",
  "type": "deploy.approval",
  "status": {},
  "title": "string",
  "body": "string",
  "requester": {},
  "approvers": [
    "string"
  ],
  "metadata": {},
  "expires_at": "2026-01-01T00:00:00.000Z",
  "decided_by": "string",
  "reason": "string",
  "decided_via": {},
  "decided_at": "2026-01-01T00:00:00.000Z",
  "notification_id": "00000000-0000-0000-0000-000000000000",
  "created_at": "2026-01-01T00:00:00.000Z"
}