Kaiten
Getting Started

Receive Events

Set up a webhook endpoint and receive real-time events from Kaiten.

Receive Events via Webhooks

Kaiten emits domain events whenever resources are created, updated, or deleted. You can subscribe to these events via webhooks powered by Svix.

Self-hosted users: The event pipeline requires the RabbitMQ add-on. Start it with:

make up-rabbit

See Event Pipeline Setup for details.

1. Create a Webhook Endpoint

  1. Navigate to Integrations → Webhooks
  2. Click New Endpoint
  3. Enter your endpoint URL (e.g. https://your-app.example.com/webhook)
  4. Select events to subscribe to:
    • CUSTOMER_CREATION
    • INSTANCE_CREATION
    • LICENSE_CREATION
  5. Click Create
curl -X POST http://localhost:6000/api/webhooks \
  -H "Authorization: Bearer ksh_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://your-app.example.com/webhook",
    "eventNames": [
      "CUSTOMER_CREATION",
      "INSTANCE_CREATION",
      "LICENSE_CREATION"
    ]
  }'

Tip: Use webhook.site or ngrok to test webhook delivery locally.

2. Trigger an Event

Create a new customer to trigger a CUSTOMER_CREATION event:

curl -X POST http://localhost:6000/api/customers \
  -H "Authorization: Bearer ksh_xxx" \
  -H "Content-Type: application/json" \
  -d '{"name": "Test Webhook Customer"}'

3. Check Delivery History

Navigate to Integrations → Webhooks → History to see delivery attempts, statuses, and payloads.

curl http://localhost:6000/api/webhooks/history \
  -H "Authorization: Bearer ksh_xxx"

4. Inspect the Payload

Your webhook endpoint will receive a JSON payload like:

{
  "name": "CUSTOMER_CREATION",
  "type": "com.kaiten.customer.v1.created",
  "data": {
    "id": "uuid-...",
    "name": "Test Webhook Customer",
    "slug": "test-webhook-customer",
    "organizationId": "uuid-..."
  }
}

Available Events

Kaiten emits 27 events across 7 domains:

DomainEvents
CustomerCUSTOMER_CREATION, CUSTOMER_UPDATE, CUSTOMER_DELETION
InstanceINSTANCE_CREATION, INSTANCE_UPDATE, INSTANCE_DELETION, INSTANCE_DEPLOYMENT, INSTANCE_MIGRATION, INSTANCE_ENTITLEMENT_USAGE_REACHED
LicenseLICENSE_CREATION, LICENSE_UPDATE, LICENSE_DELETION, LICENSE_ENTITLEMENT_ASSIGNMENT, LICENSE_ENTITLEMENT_UNASSIGNMENT, LICENSE_ENTITLEMENT_UPDATE
EntitlementENTITLEMENT_CREATION, ENTITLEMENT_UPDATE, ENTITLEMENT_DELETION
Feature FlagFEATUREFLAG_CREATION, FEATUREFLAG_UPDATE, FEATUREFLAG_DELETION
Deployment ZoneDEPLOYMENT_ZONE_CREATION, DEPLOYMENT_ZONE_UPDATE, DEPLOYMENT_ZONE_DELETION, RELEASE_DEPLOYMENT
ReleaseRELEASE_CREATION, RELEASE_DELETION

See the full event catalog for details.

Next Step

What's Next?

On this page