Create Webhook

POST /webhooks

You can create a webhook by providing the following fields:

PropertyTypeDescription
url*stringWhere Loby sends webhook events: a public https URL with a host name, at most 2048 characters. Not localhost, an IP address, or a URL with a user name or password
eventTypes*array of stringThe event types to receive. At least one, each once
descriptionstringYour own note on what the webhook is for
enabledbooleanWhether Loby sends webhook events to it. Defaults to true

The webhook gets the mode (live or test) of your API key. The response is the Webhook with its secret. Store the secret now: it is never shown again.

Copy
{ "url": "https://example.com/loby/webhooks", "eventTypes": ["membership.created", "membership.updated", "membership.deleted"], "description": "CRM sync" }

Response:

Copy
{ "id": "9b2e4c6a-1d3f-4a5b-8c7d-0e1f2a3b4c5d", "createdAt": "2026-11-03T09:00:00.000Z", "updatedAt": "2026-11-03T09:00:00.000Z", "url": "https://example.com/loby/webhooks", "eventTypes": ["membership.created", "membership.updated", "membership.deleted"], "description": "CRM sync", "enabled": true, "secret": "whsec_EMI9soWck0iMI4fwI5p0TKobgZnsWf4yt1sGDJwQ6Xg=" }

Errors

Errors are returned as { "errors": [{ "message": "WEBHOOK_INVALID_URL" }] }.

StatusMessageWhen
400WEBHOOK_INVALID_URLurl is not a public https URL with a host name
400WEBHOOK_INVALID_EVENT_TYPESeventTypes is empty, holds an unknown event type, or holds one twice
400FIELD_NOT_ALLOWED: <field>The body holds a field that isn't listed above
400INVALID_BODYThe body isn't a JSON object, a required field is missing, or a field has the wrong JSON type (only description may be null)
‹ Previous
Get Webhook
Next ›
Update Webhook