webhook

Create a webhook

Creates a webhook that sends the events you choose to your URL.

The response includes the signing secret, secret, which is shown only once. Use it to verify the webhook-signature header on each delivery. The URL must use https, be reachable from the internet and contain no credentials.

post/webhook

Request

  • Base URL: http://localhost:3030
  • URL: http://localhost:3030/webhook
  • Auth: HTTP bearer

Request body

urlstring required

The URL deliveries are sent to. Must be https and reachable from the internet. Redirects are not followed.

namestring nullable

A name for the webhook, up to 200 characters.

event_typestring[] required

The event types delivered to this webhook.

activeboolean

Whether events are delivered. While false, deliveries are held. Defaults to true.

Response

The webhook.

object'webhook' required

The object's type. Always webhook.

idstring required

Unique identifier for the object.

namestring nullable required

The webhook's name. Null when none was given.

urlstring required

The URL deliveries are sent to.

event_typestring[] required

The event types delivered to this webhook.

activeboolean required

Whether events are delivered. While false, deliveries are held.

secret_fingerprintstring required

A fingerprint of the signing secret, for telling secrets apart.

created_atstring date-time required

Time at which the object was created.

updated_atstring date-time required

Time at which the object was last updated.

hrefstring required

The path of this webhook.

secretstring required

The signing secret, whsec_.... Returned only when the webhook is created.

Example response

{
  "id": "whk_01h455vb4pex5vsknk084sn02q",
  "name": "Production",
  "url": "https://example.com/webhooks/placestack",
  "secret_fingerprint": "9f86d081",
  "href": "/webhook/whk_01h455vb4pex5vsknk084sn02q",
  "secret": "whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw"
}

Changes

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