Authentication & authorization

How to authenticate requests with API keys and scope your access.

API keys

Every request must include your secret key. Two header forms are accepted:

Authorization: Bearer zt_live_sk_...
x-api-key: zt_live_sk_...

Keys are:

  • Environment-scoped - zt_live_* and zt_test_* access separate data.
  • Hashed at rest - only a SHA-256 hash is stored; the plaintext secret is
    shown once at creation.
  • Scoped - each key carries a set of scopes. Requests without the required
    scope return 403 insufficient_scope.

Scopes

ScopeGrants
clips:readList/read clips, export JSON
clips:writeTrigger clip generation
highlights:readList/read highlights
highlights:writeTrigger highlight generation
media:readRead media library and delivery URLs
publish:readRead publish history
publish:writePublish clips
storage:writePush clips to external storage
webhooks:manageManage webhook endpoints
catalog:readRead competitions, teams, players, tags, streams

Rotation & revocation

  • Rotate a key to mint a replacement while the old key stays valid for a
    short grace window (default 24h), then revoke it.
  • Revoke a key immediately to disable it.

IP allowlisting (optional)

For high-trust partners, an app can restrict requests to specific source IPs or
CIDR ranges. Requests from other IPs return 403 ip_not_allowed.

Transport security

All requests must use HTTPS. Never embed secret keys in client-side code.


Did this page help you?