Developer
Webhooks
Set up webhooks for real-time event notifications from Cafora Host.
Webhooks allow your application to receive real-time notifications when specific events occur on your servers.
How Webhooks Work
- You register a webhook URL in the Cafora Store
- When a subscribed event occurs, Cafora sends an HTTP POST to your URL
- Your application processes the event data
Setting Up a Webhook
Log into the Cafora Store.
Go to Settings > Webhooks for your server.
Click Add Webhook.
Enter the URL where events should be sent.
Select which events to subscribe to.
Save the webhook configuration.
Available Events
| Event | Description |
|---|---|
| server.start | Server has started |
| server.stop | Server has stopped |
| server.crash | Server has crashed unexpectedly |
| backup.completed | A backup has finished |
| player.join | A player joined the server |
| player.leave | A player left the server |
Webhook Payload Example
{
"event": "server.start",
"timestamp": "2026-01-15T08:30:00Z",
"server_id": "abc123",
"data": {
"startup_time_ms": 4500
}
}Webhook Security
- Your webhook endpoint should use HTTPS
- Validate incoming requests using the shared secret
- Respond with HTTP 200 quickly; process the event asynchronously
- Set up retry handling for failed deliveries