API Reference
Webhooks
Register webhook endpoints, manage signing secrets, and inspect deliveries.
API Reference
Register webhook endpoints, manage signing secrets, and inspect deliveries.
/v1/webhook-endpointsReturns the webhook endpoints configured for your organization in this key’s mode.
webhooks:readRequest
curl -X GET "https://keepworkersfirst.org/api/v1/webhook-endpoints" \
-H "Authorization: Bearer $API_KEY"Response · 200
{
"data": [
{
"id": "aa11bb22-1111-4c33-8d44-e55f66a77b88",
"url": "https://example.com/webhooks",
"description": "Production receiver",
"mode": "live",
"enabled": true,
"events": [
"member.created",
"member.verified"
],
"secret_preview": "whsec_…a1b2",
"consecutive_failures": 0,
"disabled_at": null,
"disabled_reason": null,
"last_delivery_at": null,
"last_success_at": null,
"created_at": "2026-07-01T10:00:00+00:00",
"updated_at": "2026-07-01T10:00:00+00:00"
}
],
"has_more": false,
"next_cursor": null
}/v1/webhook-endpointsRegisters a webhook endpoint. The signing secret is returned once in the response. Subscribe with an array of event types or ["*"] for all.
webhooks:writeBody parameters
urlrequired | string HTTPS URL to receive events. |
description | string |
eventsrequired | string[] Event types to subscribe to, or ["*"] for all. |
Request
curl -X POST "https://keepworkersfirst.org/api/v1/webhook-endpoints" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/webhooks","events":["member.created"]}'Response · 201
{
"id": "aa11bb22-1111-4c33-8d44-e55f66a77b88",
"url": "https://example.com/webhooks",
"description": "Production receiver",
"mode": "live",
"enabled": true,
"events": [
"member.created",
"member.verified"
],
"secret_preview": "whsec_…a1b2",
"consecutive_failures": 0,
"disabled_at": null,
"disabled_reason": null,
"last_delivery_at": null,
"last_success_at": null,
"created_at": "2026-07-01T10:00:00+00:00",
"updated_at": "2026-07-01T10:00:00+00:00",
"secret": "whsec_examplesecretvalue"
}/v1/webhook-endpoints/{id}Returns a single webhook endpoint by id.
webhooks:readPath parameters
idrequired | string (uuid) Webhook endpoint id. |
Request
curl -X GET "https://keepworkersfirst.org/api/v1/webhook-endpoints/aa11bb22-1111-4c33-8d44-e55f66a77b88" \
-H "Authorization: Bearer $API_KEY"Response · 200
{
"id": "aa11bb22-1111-4c33-8d44-e55f66a77b88",
"url": "https://example.com/webhooks",
"description": "Production receiver",
"mode": "live",
"enabled": true,
"events": [
"member.created",
"member.verified"
],
"secret_preview": "whsec_…a1b2",
"consecutive_failures": 0,
"disabled_at": null,
"disabled_reason": null,
"last_delivery_at": null,
"last_success_at": null,
"created_at": "2026-07-01T10:00:00+00:00",
"updated_at": "2026-07-01T10:00:00+00:00"
}/v1/webhook-endpoints/{id}Updates a webhook endpoint’s URL, description, subscribed events, or enabled state. Re-enabling clears the auto-disable state.
webhooks:writePath parameters
idrequired | string (uuid) Webhook endpoint id. |
Body parameters
url | string |
description | string | null |
events | string[] |
enabled | boolean |
Request
Response · 200
/v1/webhook-endpoints/{id}Permanently deletes a webhook endpoint and its delivery history.
webhooks:writePath parameters
idrequired | string (uuid) Webhook endpoint id. |
Request
curl -X DELETE "https://keepworkersfirst.org/api/v1/webhook-endpoints/aa11bb22-1111-4c33-8d44-e55f66a77b88" \
-H "Authorization: Bearer $API_KEY"Response · 204
{}/v1/webhook-endpoints/{id}/roll-secretGenerates a new signing secret and returns it once. The previous secret keeps signing for 24 hours so receivers can roll over without missing events.
webhooks:writePath parameters
idrequired | string (uuid) Webhook endpoint id. |
Request
curl -X POST "https://keepworkersfirst.org/api/v1/webhook-endpoints/aa11bb22-1111-4c33-8d44-e55f66a77b88/roll-secret" \
-H "Authorization: Bearer $API_KEY"Response · 200
{
"secret": "whsec_newexamplesecret"
}/v1/webhook-endpoints/{id}/testSends a single test delivery of a real event type’s example payload (marked with X-Webhook-Test: true) and returns the immediate result.
webhooks:writePath parameters
idrequired | string (uuid) Webhook endpoint id. |
Body parameters
event_type | string Event type to send (defaults to a subscribed one). |
Request
curl -X POST "https://keepworkersfirst.org/api/v1/webhook-endpoints/aa11bb22-1111-4c33-8d44-e55f66a77b88/test" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"event_type":"member.created"}'Response · 200
{
"delivery_id": "bb22cc33-2222-4d44-9e55-f66a77b88c99",
"ok": true,
"response_status": 200,
"duration_ms": 142
}/v1/webhook-deliveriesReturns recent webhook delivery attempts for your organization in this key’s mode. Filter by endpoint, status, or event type.
webhooks:readQuery parameters
endpoint_id | string (uuid) |
status | enum
|
event_type | string |
limit | integer |
Request
curl -X GET "https://keepworkersfirst.org/api/v1/webhook-deliveries" \
-H "Authorization: Bearer $API_KEY"Response · 200
/v1/webhook-deliveries/{id}/redeliverQueues a fresh delivery of a previously-attempted event (same envelope id, so receivers can dedupe). Returns the new delivery id.
webhooks:writePath parameters
idrequired | string (uuid) Webhook delivery id. |
Request
curl -X POST "https://keepworkersfirst.org/api/v1/webhook-deliveries/bb22cc33-2222-4d44-9e55-f66a77b88c99/redeliver" \
-H "Authorization: Bearer $API_KEY"Response · 200
{
"delivery_id": "cc33dd44-3333-4e55-8f66-a77b88c99d00"
}/v1/webhook-eventsReturns the catalog of event types you can subscribe to, filtered to your organization’s active modules.
webhooks:readRequest
curl -X GET "https://keepworkersfirst.org/api/v1/webhook-events" \
-H "Authorization: Bearer $API_KEY"Response · 200
{
"data": [
{
"type": "member.created",
"description": "A member was created.",
"module_gate": "members"
}
],
"has_more": false,
"next_cursor": null
}{
"id": "aa11bb22-1111-4c33-8d44-e55f66a77b88",
"url": "https://example.com/webhooks",
"description": "Production receiver",
"mode": "live",
"enabled": false,
"events": [
"member.created",
"member.verified"
],
"secret_preview": "whsec_…a1b2",
"consecutive_failures": 0,
"disabled_at": null,
"disabled_reason": null,
"last_delivery_at": null,
"last_success_at": null,
"created_at": "2026-07-01T10:00:00+00:00",
"updated_at": "2026-07-01T10:00:00+00:00"
}{
"data": [
{
"id": "bb22cc33-2222-4d44-9e55-f66a77b88c99",
"endpoint_id": "aa11bb22-1111-4c33-8d44-e55f66a77b88",
"event_id": "evt_9f1b6e9e11114222",
"event_type": "member.created",
"mode": "live",
"status": "delivered",
"attempts": 1,
"last_response_status": 200,
"last_error": null,
"redelivery_of": null,
"delivered_at": "2026-07-01T10:00:03+00:00",
"created_at": "2026-07-01T10:00:02+00:00"
}
],
"has_more": false,
"next_cursor": null
}curl -X PATCH "https://keepworkersfirst.org/api/v1/webhook-endpoints/aa11bb22-1111-4c33-8d44-e55f66a77b88" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"enabled":false}'