Key format
A v2 API key is one bearer value bound to an organisation, workspace and environment. It contains a public identifier and a secret; send the whole key as Authorization: Bearer <key>.
| Part | Treat it as | Purpose |
|---|---|---|
wf_v2_test or wf_v2_live prefix | Configuration | Selects the test or live environment |
wf_pub_… identifier | Not secret, but do not publish it | Identifies the key |
wf_sec_… secret | Secret: server only | Authenticates the request |
| Scopes | Configuration | Limit the operations the key can call |
| Expiry | Configuration | 30, 90 or 365 days after creation |
Rotation
- Rotate the key in the dashboard or with POST
/api/v2/keys/{keyId}/rotate, or create a replacement with only the scopes it needs. - Deploy the new key and confirm that requests succeed.
- If you created a replacement, revoke the old key and confirm it returns 401
AUTHENTICATION_REQUIRED. - Investigate any unexpected usage before you delete records.
Scopes and separation
Use a separate key for each service and environment. One key shared by several applications makes rotation, usage tracking and incident response harder.
- Grant only the scopes that service calls.
- Use
wf_v2_testkeys outside production andwf_v2_livekeys only in production. - Name each key after its service and environment, never after a secret.
- Check a key's usage before you revoke it.
If a key leaks
- If the service must keep running, create and deploy a replacement key first.
- Revoke the exposed key and confirm it no longer works.
- Search server, CI, deployment, analytics and support logs for the exposed value.
- Review the key's recent requests, downloads and request-unit use.
- Never send an old or new key in a support ticket.