API key controls, teams and 2FA
Key controls, teams & 2FA: Restrict keys by IP, scope, expiry and spend; share an account with your team. PreciseAPI sports odds API documentation.
Lock down what each API key can do, and share an account with your team without sharing keys or passwords.
Key restrictions
Set these when creating a key or later from the edit dialog on the API keys page. They are enforced on both REST and WebSocket.
| Restriction | Behaviour | Error |
|---|---|---|
| Allowed access | REST only, WebSocket stream only, or both. | 403 key_scope · close 4003 |
| IP allowlist | IPv4/IPv6 addresses or CIDR ranges. Requests from anywhere else are refused. | 403 ip_not_allowed |
| Expiry date | The key stops working at the end of that day (UTC). | 401 key_expired |
| Monthly credit cap | Caps how many of the account's credits this key can spend per calendar month — useful for staging keys and third-party integrations. | 402 key_credit_cap |
Rolling a key keeps its restrictions. Behind a proxy or load balancer, make sure the client IP is forwarded so allowlists see the right address.
Teams
Invite teammates from Dashboard → Team. Everyone signs in with their own email and password (and their own two-factor authentication) but works on the same account: API keys, credits, usage, alerts and the plan are shared.
| Role | Can |
|---|---|
| Owner | Everything, including deleting the account. |
| Admin | Everything, including billing and team members. |
| Developer | API keys, webhooks, alerts and usage. |
| Viewer | Read-only access to usage and keys. |
Seats per plan: Sandbox 1 · Edge 2 · Sharp 5 · Syndicate 10. Invitations expire after 7 days.
Two-factor authentication
Turn on 2FA under Settings & security with any TOTP authenticator app. You get ten single-use recovery codes in case you lose your phone. API keys are unaffected — 2FA protects the dashboard, where keys are created.
Previous: Authentication · Next: Data model & ids