Webhook subscriptions

Subscribe a URL to webhook events

Subscribes an https:// URL to comment events (REST-hook style, as used by Zapier). Deliveries are signed with HMAC-SHA256 in the X-Huddlekit-Signature header; see the webhooks section for payloads. Idempotent per key and URL: subscribing the same URL again with the same key reactivates the existing subscription, replaces its event types and returns 200 without a secret. A new subscription returns 201 with its signing secret, shown only this once. The subscription also appears in the workspace's webhook list in the Huddlekit app. Events caused by this same key are never delivered to it. Requires the write scope.

post/hooks

Request

  • Base URL: https://app.huddlekit.com/api/v1
  • URL: https://app.huddlekit.com/api/v1/hooks
  • Auth: HTTP bearer

Request body

targetUrlstring uri required

The https:// URL to POST events to. Must be a public URL outside Huddlekit.

target_urlstring uri

Alternative spelling of targetUrl, used when targetUrl is absent.

urlstring uri

Alternative spelling of targetUrl, used when targetUrl and target_url are absent.

event_typesEventType[]

Event types to deliver. Omit it, or send an empty array, to receive every event type. Unknown values are a 400.

eventsEventType[]

Alternative spelling of event_types, used when event_types is absent.

Example request

{
  "targetUrl": "https://hooks.example.com/huddlekit",
  "event_types": [
    "comment.created",
    "comment.status_changed"
  ]
}

Response

This key already had a subscription for this URL; it was reactivated.

idstring uuid required

Id of the existing subscription.

urlstring uri required

The subscribed URL.

resubscribedtrue required

Always true.

Changes

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