Prerequisites
- A Kit account on a plan with API access.
- An API key or OAuth access token. Both work for managing endpoints; OAuth-created endpoints are scoped to the app that created them.
- A publicly reachable HTTP(S) URL that can accept
POSTrequests (HTTPS strongly recommended). For local development, a tunnel such as ngrok works well.
1
Create an endpoint
Register your URL and the events it should receive. The response includes a
secret — this is the only time it’s returned in plaintext, so store it now; you’ll need it to verify signatures.2
Subscribe to more events (optional)
Update the endpoint’s event set at any time. The Browse everything you can subscribe to in the event types catalog.
events array replaces the current subscriptions.3
Receive a delivery
Trigger the event (for
subscriber.created, add a subscriber to the account). Kit sends a POST to your URL with the envelope:events is always an array — usually one event, but bulk activity batches up to 100 per delivery, so iterate it rather than reading a single event. Respond with any 2xx status to acknowledge receipt. Non-2xx responses (or timeouts) are retried.4
Verify the delivery
Every delivery carries an
X-Kit-Signature header. Recompute the HMAC with your stored secret and compare before trusting the payload — see Verifying signatures for ready-to-paste code.