Document AI — Webhooks

Create Webhook Subscription

po_webhooks_subscribe: Create a new webhook subscription. Payloads are signed with HMAC-SHA256. Response includes id and subscription_id (same value) — save either for po_webhooks_test, po_webhooks_update, po_webhooks_delete. Auto...

post/webhooks/subscribe

Request

  • Base URL: https://api.paperoffice.ai/latest
  • URL: https://api.paperoffice.ai/latest/webhooks/subscribe
  • Auth: HTTP bearer

Request body

namestring required

Display name for the subscription (required).

urlstring required

Webhook target URL (HTTPS recommended).

eventsstring[] required

Event types, e.g. ["document.uploaded","document.edited"], or ["*"] for all. Full list: see the tool description.

secretstring

HMAC secret (auto-generated if empty).

filtersobject

Optional Filter (e.g. workspace_id, pofid)

headersobject

Additional HTTP headers as key-value pairs

retry_policy'none' | 'linear' | 'exponential'

Retry policy: none, linear, or exponential (default: exponential).

max_retriesinteger

Maximum delivery retries after failure (0–10, default 5).

timeout_msinteger

Timeout in ms (1000-30000, default: 10000)

is_activeboolean

Create the subscription active (true, default) or inactive (false). Accepts true/false, 1/0, yes/no, on/off (JSON boolean or form string); other values return 400 INVALID_BOOLEAN.

Response

Success

statusstring required
idinteger required

Subscription ID (canonical, same as subscription_id)

subscription_idinteger required

Alias for id — use for update/test/delete

secretstring required
eventsstring[] required
events_requestedstring[]
events_resolvedstring[]
messagestring

Changes

No recorded changes to this operation across all 1 revision of this API.