Orbit

Public API

Read customers and analytics, and record events, with scoped API keys.

The REST API lives under /api/v1. All requests and responses are JSON.

Authentication

Create a key in Developers. A key is shown once, so store it safely. Send it as a Bearer token:

curl https://YOUR-APP/api/v1/customers \
  -H "Authorization: Bearer orb_YOUR_KEY"

Keys are either read only or read and write. Only the SHA-256 hash of a key is stored. Revoking a key stops it working immediately.

Endpoints

Method and pathNeedsWhat it does
GET /api/v1/mereadThe workspace, plan and scope the key belongs to
GET /api/v1/customersreadList customers with search, filters and paging
POST /api/v1/customerswriteCreate a customer
GET /api/v1/customers/:idreadOne customer
DELETE /api/v1/customers/:idwriteDelete a customer
GET /api/v1/analyticsreadThe analytics report for a date range
POST /api/v1/eventswriteRecord an event from your server

List customers

Query parameters:

ParameterMeaning
qSearch name, email and company
statusActive, Trial or Churned
planStarter, Growth or Scale
sortname, email, plan, status, mrr or joined
dirasc or desc
page, pageSizePaging. pageSize is 1 to 50, default 10
{
  "data": [
    { "id": "…", "name": "Maya Chen", "email": "maya@lumen.io", "company": "Lumen",
      "plan": "Scale", "status": "Active", "mrr": 199, "joined": "2026-01-14" }
  ],
  "total": 12, "page": 1, "pages": 2
}

Create a customer

curl -X POST https://YOUR-APP/api/v1/customers \
  -H "Authorization: Bearer orb_YOUR_WRITE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Grace Hopper", "email": "grace@navy.mil", "plan": "Growth", "mrr": 49 }'

Only name and email are required. Emails are unique within a workspace.

Analytics

GET /api/v1/analytics?range=30d accepts 7d, 30d or 90d, or from and to dates (YYYY-MM-DD, up to 366 days). The response contains totals with the change against the previous period, a daily series, traffic sources and top pages.

Record an event

curl -X POST https://YOUR-APP/api/v1/events \
  -H "Authorization: Bearer orb_YOUR_WRITE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "type": "purchase", "value": 99, "visitor": "user_123" }'

Errors

Errors return { "error": "message" } and a standard status code.

StatusMeaning
400The body is not valid JSON
401The key is missing, malformed, unknown or revoked
402A plan limit was reached, such as the monthly event allowance
403A read-only key was used for a write
404The record does not exist in your workspace
409A duplicate, such as an email that already exists
422Validation failed. A fields object names the problems
429Rate limit reached. Retry after the Retry-After header

Limits

Each key may make 600 requests per 15 minutes. Keys only ever see their own workspace.