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
Developer Reference · v1
REST & webhook reference for the Tea ID™ ledger. Stable, signed, and fully OpenAPI-documented.
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
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"] }'
import { Tea ID™ } from '@Tea ID™/trace';
const tt = new Tea ID™(process.env.TT_KEY);
const cert = await tt.batches.mint('TT-0xa1b2c3d4', { anchor: true });
console.log(cert.serial); // "TTC-2026004"
from Tea ID™ import Tea ID™
tt = Tea ID™(api_key=os.environ["TT_KEY"])
cert = tt.batches.mint("TT-0xa1b2c3d4", anchor=True)
print(cert.serial) # "TTC-2026004"
Subscribe to events and receive signed POSTs to your endpoint. Every payload is HMAC-SHA256 signed with your shared secret.
{
"event": "batch.minted",
"created": "2026-04-12T09:14:22Z",
"data": {
"batch": "TT-0xa1b2c3d4",
"hash": "0xa1b2c3d4",
"block": 18402119,
"certificate": "TTC-2026004"
}
}
| Code | Meaning | Resolution |
|---|---|---|
401 | Missing or invalid bearer token | Re-issue API key |
403 | Insufficient scope for resource | Add batches:write scope |
409 | Batch already minted | Hashes are immutable; create a new batch |
422 | Manifest validation failed | Inspect error.details[].path |
429 | Rate limit · 600 req/min | Backoff using Retry-After |
npm i @Tea ID™/tracepip install Tea ID™go get Tea ID™.dev/tracegem install Tea ID™