API keys
Create an API key
No API key can call this route. It needs a signed-in dashboard user with the right role; a key answers 403. About scopes
POST
/
api/v1/api-keysAuthorization
AuthorizationRequiredBearer <token>
An API key: gpy_test_… or gpy_live_… (or an agent key, agk_…).
In: header
Request Body
application/jsonOptionalnameRequiredstring
Minimum length:
1Maximum length: 200key_typestring
developer -> gpy_ prefix, agent -> agk_, publishable -> pk_ (browser-safe, takes no scopes). Defaults to developer.
Value in:
"developer" | "agent" | "publishable"scopesarray<string>
expires_atAny properties in string, string
When the key stops working; must be in the future. never for no expiry. Omitted: 90 days from now, except a publishable key, which never expires by default.
API key created. Store secret now; it is unrecoverable.