Webhooks

Create a webhook endpoint

Changed on

Connect an endpoint. Answers 201 with the signing secret it will use.

No external_id, and no upsert, unlike every other write on this surface. Those mirror something your system already holds and must match on its own key; an endpoint is created here and its identity is ours, so there is nothing to match against.

The secret is generated, never accepted: a caller-chosen signing key is a caller-chosen weakness. Replace it with POST /company/v3/webhooks/{id}/secret.

Deliveries carry X-Clockster-Event, X-Clockster-Delivery (constant across retries, so a repeat can be recognised), X-Clockster-Timestamp and X-Clockster-Signature — sha256= HMAC-SHA256 of timestamp + "." + rawBody under the secret. The body is {"id", "event", "occurred_at", "data"}.

post/company/v3/webhooks

Request

  • Base URL: https://api.clockster.com
  • URL: https://api.clockster.com/company/v3/webhooks
  • Auth: HTTP bearer

Headers

Idempotency-Keystring

A value you choose, unique per attempt. Send the same one when retrying and the first answer is replayed instead of the write happening twice. Optional, and only on the writes that carry no key of your own.

Request body

titlestring nullable

What to call this endpoint, so a list of them reads.

urlstring required

Where deliveries are posted. http or https.

contact_emailstring email nullable

An address to reach you about this endpoint.

eventsstring[] required

Which events this endpoint receives. At least one, and no repeats.

auth_tokenstring nullable

Send deliveries carrying this bearer token. Not alongside auth_basic.

activeboolean required

Whether the endpoint receives deliveries. False stops them without deleting it.

Response

Created

Changes