Register a webhook endpoint
Registers a publicly reachable HTTPS endpoint and subscribes it to the supplied event types.
- PayrollKit returns the same signing secret in the original
201response and an exact idempotent replay made with the original key while its result is retained. Store it securely. - List webhook endpoints never returns a signing secret. Only one registered endpoint may use a URL; registering that URL with a new idempotency key returns
409 webhook_endpoint_url_conflictwithout the secret. - The endpoint becomes active immediately. Registration does not send a test notification.
If the signing secret is lost, retry the unchanged registration with its original idempotency key while the result is still retained. Otherwise, remove the endpoint and register it again with a new key. The replacement receives a new endpoint ID and signing secret. Always replace the endpoint if its secret may have been compromised.
Read Keep data in sync for signature verification, delivery acknowledgement and retries.
- webhooks:write
Headers
- Type: stringIdempotency
- Key min length:16max length:200requiredIdentifies one write for safe retries. Reuse it only for the same method, URL, content type and body and, when present, the same
If-Matchvalue and acting-user headers. PayrollKit retains the result for 30 days, then treats a request using the same key as new. - Type: stringFormat: uuidX
- Request - Id Client-generated UUID for tracing. This does not make retries safe.
Body
- Type: array of "resource.changed" 1… unique!enumevent
Types const:resource.changedrequiredNotification types to send to this endpoint.
resource.changedis the only supported type. - Type: stringFormat: uriurlrequired
Public HTTPS URL that receives PayrollKit notifications. Only one registered endpoint may use a URL.
Responses
- application/json
- application/problem+json
- application/problem+json
- application/problem+json
- application/problem+json
- application/problem+json
- application/problem+json
{
"id": "webhook_7e2a91c4",
"url": "https://api.northstarworkforce.invalid/webhooks/payrollkit",
"eventTypes": [
"resource.changed"
],
"status": "active",
"signingSecret": "whsec_7f3a9c2e6b1d4f8a2c6e9b4a1d8f3c7e",
"createdAt": "2026-08-20T11:00:00Z"
}