Receive events by webhook
A Second webhook automatically sends a message to your application's address when an event happens on the marketplace, for example a paid booking. This page lists the available events and explains how to set them up in the back office, the message format and how to receive messages properly.
Last updated
Before you start
- A receiving address. Your application exposes an HTTPS address that accepts JSON
POSTrequests. - Super administrator access to the back office. The back office is the marketplace's administration tool. Only the super administrator creates webhooks. An integrator gives their address and the list of events they want to the operator.
- API access, to read the data again after each message. See Introduction to the Second API.
How does a webhook work?
Text description
- Operator: Create the webhook (uRL and chosen events).
- Second: An event happens (for example, a booking is paid).
- Second: Send the message (jSON POST, one attempt only).
- Your application: Acknowledge receipt (fast 2xx response). Failure: error shown in the history.
- Your application: Read the data again (through the API, with an OAuth2 token).
- Operator: Check the history (kept for 7 days by default).
Which events are available?
| Event | When it is sent | Data included |
|---|---|---|
user:created |
An account is created. | user |
user:deleted |
An account is deleted. | user |
listing:created |
A listing is created. | listing |
listing:category:updated |
Listing categories change. | none |
request:for:proposal:created |
A request for proposal is published. | rfp |
booking:created |
A booking is requested. | booking |
booking:paid |
A booking is paid. | booking |
bid:created |
A bid answers a request for proposal. | bid |
bid:paid |
An accepted bid is paid. | bid |
menu:updated |
A site menu is created, edited or deleted. | menuId |
platform:config:update |
A marketplace setting changes. | name |
platform:toggle:update |
A feature is turned on or off. | name |
translation:updated |
An interface text is edited. | locale, domain, key, value |
The data for a booking, a listing or a user contains the fields the API returns for that resource.
Create a webhook
- Open the list of webhooks. In the back office, click Configuration › Webhooks, then Add.
- Name the webhook. The Title only helps you recognise it in the list.
- Enter the address. In Url, enter the full receiving address.
- Choose the events. Under Triggers, tick one or more events from the table above.
- Enable and save. Set the Status to Enabled, then click Save.
A Disabled webhook sends nothing and stays in the list. Deleting it, with Delete, is permanent. Webhooks cannot be managed through the API.
What does a message look like?
Second sends a POST request with a JSON body. The event key gives the time of the event (a Unix timestamp, in seconds) and its type. The included data follows, at the same level.
{
"event": {
"time": "1764759600",
"type": "booking:paid"
},
"booking": {
"id": "…",
"status": "…",
"start": "…",
"end": "…"
}
}
Messages are sent in the background, just after the event. They do not slow the marketplace down.
How do I receive messages properly?
For a reliable integration:
- Respond quickly. Return a
2xxstatus as soon as the message arrives, then process it in the background. - Read the data again through the API. Treat the message as a signal. Before acting, read the up-to-date resource through the API, with your OAuth2 token.
- Catch up on gaps. Since nothing is resent, plan a regular synchronisation through the API, for example every night, to recover a lost message.
- Handle duplicates and disorder. Make processing have no effect if it is replayed, and rely on
event.timerather than the order of arrival. - Keep the address private. Use an HTTPS address that is hard to guess and ignore messages whose type does not concern you.
Where can I see what was sent?
A webhook's page lists its recent deliveries. For each one: the date sent, the HTTP status returned by your application, the Payload sent, the Response headers and, on failure, the Exception message.
The statuses contained in the data are described in Statuses. Other services connected to the marketplace are covered in Connect third-party services.



