Register a webhook
POST
https://dev.breeze-technologies.de/api/v3/wildfires/webhooks
Register a new webhook to receive real-time notifications for wildfire events.
- cURL
- Python
- Javascript
POST /api/v3/wildfires/webhooks
curl -X POST 'https://dev.breeze-technologies.de/api/v3/wildfires/webhooks' \
-H 'Content-Type: application/json' \
-d '{
"api_token": "<YOUR_API_TOKEN>",
"url": "https://your-domain.com/webhooks/wildfire",
"eventType": "wildfire.event.created",
"secret": "your-secret-key"
}'
POST /api/v3/wildfires/webhooks
import requests
url = "https://dev.breeze-technologies.de/api/v3/wildfires/webhooks"
payload = {
"api_token": "<YOUR_API_TOKEN>",
"url": "https://your-domain.com/webhooks/wildfire",
"eventType": "wildfire.event.created",
"secret": "your-secret-key"
}
headers = {
"Content-Type": "application/json"
}
response = requests.request("POST", url, json=payload, headers=headers)
print(response.text)
POST /api/v3/wildfires/webhooks
const axios = require("axios");
let config = {
method: "post",
maxBodyLength: Infinity,
url: "https://dev.breeze-technologies.de/api/v3/wildfires/webhooks",
headers: {
"Content-Type": "application/json",
},
data: JSON.stringify({
api_token: "<YOUR_API_TOKEN>",
url: "https://your-domain.com/webhooks/wildfire",
eventType: "wildfire.event.created",
secret: "your-secret-key",
}),
};
axios
.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Parameters
| Name | Description | Type | Data type | Required |
|---|---|---|---|---|
| api_token | The current user's API token | query | string | Yes |
| url | HTTPS endpoint where we'll send webhook notifications | body | string | Yes |
| eventType | Type of event to subscribe to (wildfire.event.created or wildfire.event.updated) | body | string | Yes |
| secret | Secret key used to sign webhook requests (HMAC-SHA256). Auto-generated if not provided | body | string | No |
Requirements
- URL must use HTTPS - We only send webhooks to HTTPS endpoints
- Keep the secret secure - Use it to validate webhook signatures
Returns
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"message": "Webhook registered"
}