Skip to main content
POST
Create WebHook
A webhook makes Nexudus send an HTTP POST with a JSON payload to an external URL whenever one chosen event happens in a location, so other systems can react in real time without polling the API. Each record has exactly one Action, so a separate webhook is needed per event, and a webhook registered on a network parent location also receives events from that parent’s child locations. Delivery is signed with the location’s Webhooks.SharedSecret setting when one is configured, retried with an increasing delay after each failure, and skipped when the same record would be sent with an identical payload twice. Delivery health is visible in LastTrigger, LastError and ErrorCount; the webhook is deactivated automatically once ErrorCount passes 10 or the URL does not start with http, and it is deleted automatically if the endpoint answers 410 Gone. Set Active to false to pause delivery without deleting the record.

Authentication

This endpoint requires OAuth2 authentication. Include a valid bearer token in the Authorization header. The authenticated user must be a full unrestricted administrator or have the WebHook-Create role.

Enums

Request Body

Required Fields

integer
required
ID of the location that owns this webhook. Events raised in this location trigger it, and a webhook registered on a network parent location also receives events from that parent’s child locations..
string
required
Display name used to identify this webhook in the location’s webhook list; it is not sent to the endpoint..
integer
required
The single event that triggers this webhook, such as CoworkerCreate, BookingCreate or CoworkerInvoicePaid. Only one action per webhook, so create a separate record for each event you need. Defaults to None, which never fires, so always set this explicitly..
string
required
Endpoint that receives the HTTP POST JSON payload when the webhook fires, up to 1024 characters. It must start with http or https; any other value records an error and deactivates the webhook on the first delivery attempt..

Optional Fields

string
Optional free-text note describing the webhook’s purpose. It is not shown in the admin form and is not sent to the endpoint..
boolean
Whether the webhook is enabled and will fire when its action occurs. Set false to pause delivery without deleting the record. Nexudus sets it to false automatically once ErrorCount passes 10, or when the URL does not start with http..

Code Examples

Response

200

integer
HTTP status code. 200 on success.
string
A human-readable message confirming the creation.
object
Contains the Id of the newly created record.
boolean
true if the webhook was created successfully.
array
null on success.
Example Response

400

string
A summary of the validation error(s), in the format PropertyName: error message.
any
null on validation failure.
object[]
Array of validation errors.
boolean
false when the request fails validation.
Example Response