Skip to main content

Webhook Configuration

Endpoint: POST /api/v1/webhooks Purpose: Register a webhook URL to receive event notifications from Enigma AI. Request Body (JSON):
{
  "url": "https://example.com/webhook",
  "events": ["resource.created", "resource.updated", "message.sent"]
}
Headers:
  • Authorization: Bearer <API_KEY>
  • Content-Type: application/json
Response:
  • 201 Created – Webhook successfully registered.
  • Body:
{
  "id": "uuid",
  "url": "https://example.com/webhook",
  "events": ["resource.created", "resource.updated", "message.sent"],
  "secret": "random-generated-secret"
}
Verification: Enigma AI will send a GET request with a challenge parameter to verify ownership of the URL. Security: Each webhook request includes an X-Signature header containing an HMAC SHA256 signature of the request body using the secret provided during registration. Error Cases:
  • 400 Bad Request – Invalid payload.
  • 401 Unauthorized – Missing or invalid API key.
  • 409 Conflict – Webhook URL already registered.
Authentication: API key in Authorization header. Permissions: Requires webhook:create scope.