API Keys
Secret keys authenticate your applications with Commerce. Each key contains an opaque bearer token that identifies your app and authorizes API access. Generate new keys when rotating credentials or giving another server-side integration its own credential.
The Key object
Properties
Generate a key
Generate a new secret key for your application. The API creates a cryptographically secure token tied to your app and returns it in the response. This is your only opportunity to access the full token value—store it immediately in a secure location like environment variables or a secrets manager.
Generating a new key does not invalidate existing keys. This lets you rotate credentials safely: generate the new key, deploy it to your services, verify everything works, then revoke the old key through the supported product surface.
Treat the token as opaque. Its characters and prefix do not select an environment or describe how requests will behave.
Request attributes
Request
curl https://api.zebo.dev/keys/generate \
-H "Authorization: Bearer $COMMERCE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"label":"checkout-api"}'
{
"key": {
"id": "key_<KEY_ID>",
"issued_at": "2025-02-15T14:35:00Z",
"label": "checkout-api",
"token": "<SECRET_KEY_TOKEN>",
"token_type": "bearer"
}
}