Upload API v1 reference

Versioned REST API at /api/v1. Bearer keys use the sk_buildledger_ prefix, are stored as SHA-256 hashes, support 24-hour rotation overlap, and enforce Idempotency-Key on every POST.

Scopes & rate limits

ScopePermitted operationsRate limit
games:writePOST /api/v1/games, PATCH /api/v1/games/*60 writes/min
records:writePOST/PUT/PATCH /api/v1/records/*, validate endpoints60 writes/min
records:publishPOST /publish, /unpublish, /restore, /rename, DELETE10 publishes/min
assets:writePOST /api/v1/records/{slug}/assets (S3 blob upload)60 writes/min

Endpoints

PathMethodsSummary
/api/v1/gamesgetList registered game hubs
/api/v1/gamespostCreate a game hub (games:write, Idempotency-Key required)
/api/v1/gamespatchUpdate a game hub by slug in body (games:write)
/api/v1/games/{slug}patchUpdate a specific game hub (games:write)
/api/v1/recordsgetList published records (optional include_drafts=true with bearer auth)
/api/v1/recordspostCreate draft record (records:write, Idempotency-Key required)
/api/v1/records/validatepostDry-run ingest validation without persisting state (records:write)
/api/v1/records/{slug}getFetch a record (returns 410 if unpublished or soft-deleted)
/api/v1/records/{slug}putReplace a record (records:write, If-Match matching api_revision required)
/api/v1/records/{slug}patchPartially update a record (records:write, If-Match matching api_revision required)
/api/v1/records/{slug}deleteSoft-delete record with 30-day restore window (records:publish)
/api/v1/records/{slug}/publishpostPublish record and trigger signed HMAC webhook (records:publish, Idempotency-Key required)
/api/v1/records/{slug}/unpublishpostUnpublish record so public reads return 410 (records:publish, Idempotency-Key required)
/api/v1/records/{slug}/restorepostRestore soft-deleted record within 30 days (records:publish, Idempotency-Key required)
/api/v1/records/{slug}/renamepostRename slug, preserve reviews, and create 301 redirect (records:publish, Idempotency-Key required)
/api/v1/records/{slug}/assetspostUpload binary artifact to S3 storage and update manifest (assets:write, Idempotency-Key required)
/api/v1/records/{slug}/validategetValidate stored record against current schema and cross-record rules (records:write)
/api/v1/records/{slug}/manifestgetDownload JSON manifest ledger (410 if unpublished/deleted)

RFC 9457 error catalogue

StatusConditionRequired response behavior
400Missing Idempotency-Key or invalid JSONapplication/problem+json
401Missing, revoked, unknown, or expired rotated bearer tokenWWW-Authenticate header set
403Valid key missing required endpoint scopemissing_scope field + WWW-Authenticate scope challenge
409Stale or omitted If-Match api_revision or slug conflictcurrent_revision + ETag header
410Unpublished record, soft-deleted record, or restore past 30 daysapplication/problem+json
422Schema/tone/boilerplate validation errorviolations[] array with JSON pointers returned at once
42960 writes/min or 10 publishes/min exceededRetry-After seconds header