Webhooks
Hooks
subscribe · unsubscribe · sample
The hooks resource is the half of the API that manages subscriptions. How
events are delivered — and why at most once — is in
Webhooks.
Subscribe
curl -X POST "$ORKASA_API/hooks" \
-H "Authorization: Bearer $ORKASA_KEY" \
-H 'Content-Type: application/json' \
-d '{
"event_type": "deal_won",
"target_url": "https://hooks.zapier.com/hooks/catch/123/abc/"
}'
event_typestringrequireddeal_won · offer_accepted · signature_signed · document_completed.
target_urlstringrequiredMust be https.
201 with a flat { "id": "…" } — no data envelope, because Zapier stores
the whole body as its subscribeData.
The permission required is the :read of the event's resource — you can only be
told about what you could already have fetched.
Unsubscribe
curl -X DELETE "$ORKASA_API/hooks/<id>" -H "Authorization: Bearer $ORKASA_KEY"
204, always. Repeating it, or unsubscribing something already gone, is not
an error: a Zap being torn down never fails on that step. The delete is bounded
to the credential's own brokerage, whatever its permissions.
Sample
curl "$ORKASA_API/hooks/sample?event_type=deal_won" \
-H "Authorization: Bearer $ORKASA_KEY"
Recent rows already in the event's terminal state, in the normal data
envelope. A REST-hook has no past event to show while you build the Zap; this
fills the "test trigger" step, and doubles as a polling fallback.