Skip to main content
Every request requires a personal API key in the Authorization header, sent as a Bearer token. There is no other authentication method and no unauthenticated endpoint.

Bearer token

Read the key from USERPLAY_API_KEY rather than pasting it into commands. This keeps it out of your shell history and out of source control.

API keys

Keys are personal, not per studio. Create them under Account > Developer, in the Access keys section. API keys walks through creating, rotating, deactivating, and deleting one. A key is not scoped down. If its owner is an admin of two studios, the key works as admin on both.
Treat a key like a password. Call the API from a server, never from a browser or a mobile client, and never commit a key. If one leaks, rotate it in the studio right away: the old secret stops working the moment the new one appears.

User-scoped and studio-scoped routes

Authorization runs in two layers depending on the route: A studio-scoped request returns 403 forbidden when the key’s owner is not a member of the studio in the path. It returns the same error when they are a member whose role does not allow the write.

Missing or invalid keys

No key, an unknown key, or a deactivated key all return 401 unauthorized:

API keys

Create, rotate, and retire a key in the studio.

Quickstart

Spend your new key on three real calls.

Errors

Branch on unauthorized and forbidden in code.

CLI authentication

The same key, saved as a local account.