Skip to main content

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"
}
FieldTypeRequiredDescription
clientIdstringYesYour application's client ID
urlstringYesWebhook 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

FieldTypeDescription
webhookIdstringUnique webhook identifier
signingKeystringWebhook signing key for payload verification
urlstringWebhook URL
isActivebooleanWhether the webhook is active
createdAtstringWebhook creation timestamp
warningstringReminder to store the signing key securely

Errors

StatusMessage
400Validation failed / Invalid URL format / URL must use HTTPS
401Invalid API key / Application not found
409Webhook 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 clientId must 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