Create Webhook
Create a new webhook for your application to receive event notifications.
Endpoint
POST /api/webhooks
Headers
X-API-Key: your-api-key
Content-Type: application/json
Request
{
"clientId": "your-client-id",
"url": "https://your-app.com/webhooks"
}
| Field | Type | Required | Description |
|---|---|---|---|
clientId | string | Yes | Your application's client ID |
url | string | Yes | Webhook URL (must use HTTPS) |
Response
{
"status": true,
"message": "Webhook created successfully",
"data": {
"webhookId": "wh_a1b2c3d4e5f6789012345678901234ab",
"signingKey": "whsk_live_abc123...",
"url": "https://your-app.com/webhooks",
"isActive": true,
"createdAt": "2024-01-15T10:30:00.000Z",
"warning": "Store the signing key securely. It will not be shown again."
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
webhookId | string | Unique webhook identifier |
signingKey | string | Webhook signing key for payload verification |
url | string | Webhook URL |
isActive | boolean | Whether the webhook is active |
createdAt | string | Webhook creation timestamp |
warning | string | Reminder to store the signing key securely |
Errors
| Status | Message |
|---|---|
400 | Validation failed / Invalid URL format / URL must use HTTPS |
401 | Invalid API key / Application not found |
409 | Webhook with this URL already exists for this application |
Example
curl -X POST "https://api.reeng.xyz/api/webhooks" \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"clientId": "your-client-id",
"url": "https://your-app.com/webhooks"
}'
Notes
- Webhook URL must use HTTPS protocol
- The
clientIdmust match the application associated with your API key - The signing key is only returned once - store it securely
- Webhooks are active by default upon creation