BYOO — Bring Your Own Oracle

BYOO Webhook

Use any data source as your oracle. POST events to Chikoh and we handle scoring, rule evaluation, and webhook fan-out to your subscribers.

Endpoint

POST /api/v1/events/ingest

Authentication

Authorization: Bearer sk_live_...

Use sk_test_ during development. See Sandbox Mode.

Request Body

{
  "entity_id":  string,          // canonical entity identifier
  "event_type": string,          // e.g. "race_result", "game_stat", "custom"
  "value":      number | object, // raw stat payload evaluated against scoring_rules
  "timestamp":  string,          // ISO 8601
  "oracle_id":  string?,         // optional — identifies your data source
  "period_id":  string?          // optional — e.g. "round_3", "week_14"
}

Response (202 Accepted)

{
  "received":          true,
  "event_id":          "uuid...",
  "queued_at":         "2026-03-15T15:30:01Z",
  "qstash_message_id": "msg_...",
  "sandbox":           false
}

Events are processed asynchronously via QStash. Score breakdowns are written within seconds and fanned out to registered outbound webhooks.

Error Codes

StatusMeaning
202Event received and queued for processing
400Missing required fields (entity_id, event_type, value, timestamp)
401Missing or invalid Authorization header
403Tenant suspended or key revoked
429Rate limit exceeded — back off and retry