Schemas and revisions
Read canonical JSON records and choose a schema for each kind.
On this page
Read the envelope
The record envelope identifies a save independently from its kind-specific body. Use kind and schema to pick the body schema. Keep the stable record id and the revision pair revision and revision_op when reconciling updates. create_id ties a record to its original creation intent. References point to separate records and require their own access checks.
Source-derived records can carry an upstream extraction reference. Your editable version, provenance, flags, gaps and connector-owned state have their own fields. Use string IDs and UTC timestamps, and tolerate additive fields.
{
"id": "0194ab00-0000-7000-8000-000000000001",
"create_id": "0194ab00-0000-7000-8000-000000000001",
"kind": "workout",
"schema": "workout@1.0",
"revision": 1,
"revision_op": "0194ab00-0000-7000-8000-000000000001",
"account": "0194ab00-0000-7000-8000-000000000001",
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-01T00:00:00Z",
"deleted_at": "2026-01-01T00:00:00Z",
"origin": {
"connection": "cnx_0194ab00-0000-7000-8000-000000000001",
"app": "demo"
},
"home": "demo",
"upstream": {
"source": "0194ab00-0000-7000-8000-000000000001",
"artifact": "0194ab00-0000-7000-8000-000000000001",
"extraction_version": 1,
"edited": false
},
"review": {
"from_version": 1,
"candidate_version": 1
},
"external_ids": [],
"provenance": {},
"relations": [],
"flags": [],
"gaps": [],
"body": {
"title": "demo",
"equipment": [],
"target_muscles": [],
"contraindications": [],
"blocks": []
},
"state": {}
}Download
Choose a body schema
- Places, events, recipes and guides
- Media, products, notes and links
- Workout templates, programs and sessions
The examples use the canonical hub contract. Parser payloads have their own schema versions. For example, a parsed workout is transformed before it becomes a canonical training record. The example envelope above comes from Pigeon’s schema validation fixtures.
Work across versions
Validate the body for the schema version you receive. A major version changes compatibility. Treat a revision as a change to a particular record and the schema version as the format of the body. Preserve fields your client doesn’t own when you transform or update a record.