Receive events
How to respond to a POST request against your endpoint.
Here are the specifications for a webhook client API endpoint. Please conform to it whenever deploying a webhook listener on your side.
Timeout
Respond as fast as possible, or Lucca may suspend this webhook-endpoint activation and no longer send events. In other words, you should handle events asynchronously: save them upon receiving it, respond with a 202, then plan processing it.
Response Status Codes
Your webhook endpoint may respond with the following HTTP status codes. Depending on the code, Lucca may retry sending the event later.
Status Code | Semantics | Marked As Delivered | Will Retry |
---|---|---|---|
200 | Event received. | ✅ Yes | ❌ No |
201 | Event received. | ✅ Yes | ❌ No |
202 | Event received and will be handled asynchronously. | ✅ Yes | ❌ No |
400 | Event was not understood. | ❌ No | ❌ No |
401 | Sender could not be authenticated (signature fallacy - more below). | ❌ No | ❌ No |
404 | Incorrect webhook endpoint URL. | ❌ No | ❌ No |
429 | Too many requests. Retry later. | ❌ No | ✅ Yes |
503 | Service unavailable. Retry later. | ❌ No | ✅ Yes |
50x | Service is down. | ❌ No | ❌ No |
Make sure to validate events
In order to protect your endpoint, validate incoming events.
Implement the activation workflow
Once your endpoint is declared, it must pass a confirmation workflow to be fully activated.
Headers
Signature of the message
Timestamp of the message
Path Parameters
Name of the webhook-endpoint on your server.
500
Body
An event object. Refer to the schema in the Lucca API Reference for the corresponding API version.
Response
Accepted.
Message successfully received for asynchronous processing.
Was this page helpful?