Skip to content

API ​

Base URL: https://korb.sh. JSON in, JSON out. This is the control surface — everything the dashboard does goes through this API, and everything the CLI does too. (The other surface, ingest, is not an API to speak of: it's the URL you point vendors at — https://korb.sh/<token>, see Concepts.)

Authentication ​

Two interchangeable credentials:

HowPower
Dashboard sessionmagic-link cookieFull, incl. billing & account
API tokenAuthorization: Bearer korb_…Read-only or read+write, by scope

Tokens are minted in the dashboard (Settings → API tokens) and are shown once. Rules enforced server-side:

  • Non-GET over a read-only token → 403.
  • Billing, token management, members, and account deletion are session-only — a token can never cancel a plan or delete a tenant.
  • Member invitations / removals and billing mutations are owner-only.
sh
export KORB=https://korb.sh
export TOK=korb_...   # read+write token for the examples below

Sources ​

sh
# list
curl -H "Authorization: Bearer $TOK" $KORB/api/sources

# create — token is returned ONCE
curl -X POST $KORB/api/sources \
  -H "Authorization: Bearer $TOK" -H "content-type: application/json" \
  -d '{"name":"stripe-prod","preset":"stripe"}'
# → 201 {"id":"…","name":"stripe-prod","preset":"stripe","token":"…"}
EndpointNotes
GET /api/sourcesid, name, preset, status, secret_set, last_event_at
POST /api/sources{name, preset?} (default generic) → 201 with one-time token
PATCH /api/sources/:id{name?, status?: active|paused, silence_alerts?, drift_alerts?}
DELETE /api/sources/:idcascades routes
POST /api/sources/:id/tokenrotate → new one-time token; previous accepts for 24 h
POST /api/sources/:id/secret{secret} (16–256 chars) or {secret: null} to clear
POST /api/sources/:id/testfire test event; {body} optional custom payload

The ingest URL is https://korb.sh/<token> — path-form, no header needed.

Destinations & routes ​

EndpointNotes
GET/POST /api/destinations{url, timeout_s, rate_limit_per_s, preset, headers} — live immediately, no handshake; dials optional (defaults 30s / 5 per s, clamped: timeout 5–60, rate 1..plan ceiling)
PATCH/DELETE /api/destinations/:idedit name, url, timeout_s, rate_limit_per_s / remove
POST /api/destinations/:id/resumeun-suspend after cooldown
POST /api/destinations/:id/headerscustom headers korb adds to deliveries
GET/POST /api/routessource → destination edges; optional filter: array of event-type patterns — exact or one trailing * prefix (["invoice.*"]), ≤20 patterns ×100 chars; 400 on sources with no type extraction. Filtered-out fan-outs aren't billed
PATCH/DELETE /api/routes/:idrename / remove / edit filter
POST /api/pipelinescomposite create: source + destination + route in one call

Events ​

EndpointNotes
GET /api/eventswindowed list: since/until (epoch ms, max 31 d), source, cursor
GET /api/events/:idheaders + raw body + deliveries + attempt timeline
POST /api/events/:id/replayredeliver (retries and replays are free)
sh
curl -H "Authorization: Bearer $TOK" \
  "$KORB/api/events?since=$(( $(date +%s) - 3600 ))000"

Everything else ​

EndpointNotes
GET /api/presetspublic — the whole catalog, no auth
GET /api/mesession/token identity
GET /api/usagecycle counter + caps (the server is the source of truth)
GET /api/stats, GET/POST /api/settings/statsdelivery stats + stats webhook
GET/PATCH /api/settings/alertsalert webhook
POST /api/settings/redactredact sensitive values in dashboard views
GET /api/membersroster (any member)
POST /api/members/inviteowner-only; caps at plan seats
DELETE /api/members/invites/:id, DELETE /api/members/:idowner-only
GET/POST /api/tokens, DELETE /api/tokens/:idsession-only
GET /api/billing/status, POST /api/billing/checkout, POST /api/billing/portalsession-only
GET /api/exportyour data, out
POST /api/account/deletesession-only, owner-only

Error shape ​

json
{ "error": "not found" }

400 bad input · 401 no/invalid credential · 403 scope/role/CSRF · 404 not yours or not there · 413 oversize · 422 semantic refusal · 429 rate/cap (with Retry-After).