Webhooks

Receive real-time notifications for events happening in your account.

What are Webhooks?

Webhooks are a way for Rommaana to send real-time data to your application. Instead of you polling our API for changes, we can send a POST request to your specified URL whenever a specific event occurs. This is essential for building responsive and efficient integrations.

Event Triggers

You can subscribe to various events, including:

  • policy.created
  • policy.updated
  • claim.submitted
  • claim.status.changed
  • payment.succeeded
  • payment.failed
Payload Format

All webhook events are sent as a JSON object with a consistent structure. The `data` object will contain the resource that was updated.

{
  "id": "evt_123456789",
  "type": "policy.created",
  "apiVersion": "2024-01-01",
  "created": 1672531200,
  "data": {
    "object": {
      "id": "pol_abcdefgh",
      "status": "active",
      // ... other policy details
    }
  }
}
Security & Verification

To ensure that the webhook requests are coming from Rommaana and have not been tampered with, we sign each event. Your webhook endpoint should verify this signature before processing the event.

Each webhook event includes a Rommaana-Signature header. This header contains a timestamp and a signature. You can verify it using your webhook signing secret, which is available in your developer dashboard.