Cancel Hansel API Reference

API Base URL: https://api.cancelhansel.com

Use x-api-key authentication for all protected booking operations and webhook workflows to keep evidence packets and lifecycle tracking secure.

Authentication

All protected API calls require x-api-key in the request header. Store API keys server-side and never expose them in browser or client-side code.

curl -X GET https://api.cancelhansel.com/v1/health \
  -H "x-api-key: YOUR_API_KEY"
GET
/v1/health

Check API health and readiness.

Request:
GET https://api.cancelhansel.com/v1/health
Headers:
  x-api-key: YOUR_API_KEY

Response:
200 {
  "status": "ok",
  "timestamp": "2026-04-30T12:00:00Z"
}
POST
/v1/partners/register

Register a partner to begin using Cancel Hansel APIs.

Request:
POST https://api.cancelhansel.com/v1/partners/register
Content-Type: application/json
{
  "name": "Acme Booking",
  "businessType": "Venue Operator",
  "contactEmail": "[email protected]",
  "website": "https://example.com"
}

Response:
201 {
  "partnerId": "partner_abc123",
  "name": "Acme Booking",
  "status": "active"
}
POST
/v1/api-keys

Create a new API key for partner integration.

Request:
POST https://api.cancelhansel.com/v1/api-keys
Content-Type: application/json
x-api-key: YOUR_API_KEY
{
  "name": "server-integration-key",
  "scopes": ["bookings:write","webhooks:read"]
}

Response:
201 {
  "apiKeyId": "key_123",
  "apiKey": "sk_live_abc123",
  "createdAt": "2026-04-30T12:00:00Z"
}
POST
/v1/bookings

Create a new booking record to be protected and tracked.

Request:
POST https://api.cancelhansel.com/v1/bookings
Content-Type: application/json
x-api-key: YOUR_API_KEY
{
  "partnerId": "partner_abc123",
  "talent": {"id":"talent_1","name":"Live Band"},
  "organizer": {"id":"org_9","name":"Event Team"},
  "eventType": "concert",
  "eventDate": "2026-05-15T19:00:00Z",
  "bookingValue": 4500.00,
  "currency": "USD"
}

Response:
201 {
  "bookingId": "booking_789",
  "partnerId": "partner_abc123",
  "status": "created",
  "createdAt": "2026-04-30T12:00:00Z"
}
POST
/v1/bookings/{bookingId}/protect

Lock a booking into the protected evidence ledger.

Request:
POST https://api.cancelhansel.com/v1/bookings/booking_789/protect
x-api-key: YOUR_API_KEY

Response:
200 {
  "bookingId": "booking_789",
  "protected": true,
  "protectedAt": "2026-04-30T12:05:00Z"
}
GET
/v1/bookings/{bookingId}/webhook-events

Retrieve webhook events and delivery status for a booking.

Request:
GET https://api.cancelhansel.com/v1/bookings/booking_789/webhook-events
x-api-key: YOUR_API_KEY

Response:
200 {
  "bookingId": "booking_789",
  "webhookEvents": [
    {
      "eventId": "evt_100",
      "type": "booking.protected",
      "status": "delivered",
      "signature": "sha256=..."
    }
  ]
}
GET
/v1/bookings/{bookingId}/policy-evaluation

Retrieve the cancellation policy evaluation for a booking.

Request:
GET https://api.cancelhansel.com/v1/bookings/booking_789/policy-evaluation
x-api-key: YOUR_API_KEY

Response:
200 {
  "bookingId": "booking_789",
  "evaluationStatus": "reviewed",
  "resolutionPath": "policy_blocked",
  "evaluatedAt": "2026-04-30T12:06:00Z"
}

Authentication details

Include the API key header on every request. Example failure response for missing or invalid credentials:

401 {
  "error": "Unauthorized",
  "message": "Missing or invalid x-api-key"
}
/openapi.json /api/openapi.json /llms.txt /.well-known/mcp.json