Skip to Content
Webhooks

Create a webhook endpoint

Register a URL for webhook deliveries. The response is the only time the signing `secret` is shown. The URL must use https and a public address; in test mode `http://localhost` and `http://127.0.0.1` also work. Plan limits apply (`plan_limit`). Accepts `Idempotency-Key`. Requires the `webhooks:write` scope.

POST
/v1/webhook-endpoints

Register a URL for webhook deliveries. The response is the only time the signing secret is shown. The URL must use https and a public address; in test mode http://localhost and http://127.0.0.1 also work. Plan limits apply (plan_limit). Accepts Idempotency-Key.

Requires the webhooks:write scope.

Authorization

secretKey
headerAuthorizationBearer <token>

A secret key: wc_live_... or wc_test_.... Keep it on your server.

Header Parameters

idempotency-key?string

Send a unique value (a UUID works) to make retries safe. A replay within 24 hours returns the first response; the same key with a different body is a 409 idempotency_conflict.

Length1 <= length <= 255

Request Body

application/json
  1. body
url*string
Formaturi
Lengthlength <= 2048
events?array<>

Defaults to every event type.

Items1 <= items <= 50

Response Body

The endpoint was created.

application/json
  1. response
id*string
Match^whk_[0-9A-Za-z]{6,64}$
mode*string

live or test. Always the mode of the API key that made the request.

Value in"live""test"
url*string
events*array<>

Event types sent to this endpoint.

disabled_at*|

Set when the endpoint was disabled, by you or after ten failed deliveries in a row.

Formatdate-time
created_at*string

ISO 8601 with a UTC offset.

Formatdate-time
secret*string

Signing secret (Standard Webhooks). Shown only in this response; store it now.

Example Request
curl -X POST 'https://api.whocoming.com/v1/webhook-endpoints' \  -H 'Content-Type: application/json' \  -d '{  "url": "http://example.com"}'
Example Response
{  "id": "string",  "mode": "live",  "url": "string",  "events": [    "rsvp.created"  ],  "disabled_at": "2019-08-24T14:15:22Z",  "created_at": "2019-08-24T14:15:22Z",  "secret": "string"}