Developer Reference · v1

API & Webhooks

REST & webhook reference for the Tea ID™ ledger. Stable, signed, and fully OpenAPI-documented.

Authentication

Every request must carry a Bearer token. Tokens are issued per-organization and scoped to a fixed set of permissions.

# Authorization header on every request
Authorization: Bearer tt_live_3f4a…29ba
Content-Type: application/json

Endpoints

Code samples

Mint a batch and retrieve its certificate.

curl -X POST https://api.tea-id.com/v1/batches/TT-0xa1b2c3d4/mint \
  -H "Authorization: Bearer $TT_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "anchor": true, "notify": ["audit@example.co.uk"] }'

Webhooks

Subscribe to events and receive signed POSTs to your endpoint. Every payload is HMAC-SHA256 signed with your shared secret.

Example payload

{
  "event": "batch.minted",
  "created": "2026-04-12T09:14:22Z",
  "data": {
    "batch": "TT-0xa1b2c3d4",
    "hash": "0xa1b2c3d4",
    "block": 18402119,
    "certificate": "TTC-2026004"
  }
}

Errors

CodeMeaningResolution
401Missing or invalid bearer tokenRe-issue API key
403Insufficient scope for resourceAdd batches:write scope
409Batch already mintedHashes are immutable; create a new batch
422Manifest validation failedInspect error.details[].path
429Rate limit · 600 req/minBackoff using Retry-After

SDKs

Node.jsnpm i @Tea ID™/trace
Pythonpip install Tea ID™
Gogo get Tea ID™.dev/trace
Rubygem install Tea ID™