Overview
Percify authenticates programmatic access via static API keys scoped to a user account. Keys must be kept server-side—never expose them in client bundles.Obtaining a Key
- Visit Dashboard → Settings → API Keys
- Generate new key (label for internal tracking)
- Copy once; regenerate if leaked
Request Format
Include header:Example
Verifying Identity
Server resolves the user from key → attaches userId in request context → ban & credit checks applied.Rotation Strategy
| Scenario | Action |
|---|---|
| Routine security | Rotate quarterly |
| Suspected leak | Revoke + regenerate immediately |
| Ownership transfer | Delete old keys before handoff |
Handling Failures
| Status | Meaning | Fix |
|---|---|---|
| 401 | Missing/invalid key | Provide valid header |
| 403 | Banned user | Appeal or resolve violation |
| 429 | Rate limit | Backoff + retry |
Storing Keys
| Environment | Method |
|---|---|
| Local Dev | .env.local (never commit) |
| CI/CD | Platform secret manager |
| Production | Vault / encrypted secrets store |
Do Not
- Embed in client-side JavaScript
- Log full key values
- Share keys across unrelated services
Related Pages
- [/quickstart]
- [/percify/security]
- [/api-reference/introduction]
Next: browse endpoints in [/api-reference/introduction].