What is an IP allowlist?
An IP allowlist limits which request IPs can use an API key. When a key has stored allowed IPs, BabySea checks the request IP during authentication and rejects non-matching requests withBSE1007.
Setting up an allowlist
When creating a key, use the IP allowlist field in the Add API key dialog and enter comma-separated IP values:| Rule | Detail |
|---|---|
| Maximum entries | 50 IPs per key |
| Empty field | All IPs allowed |
How it works
The allowlist is stored with the API key record and used during request authentication:Compare values
If the key has stored IP entries, BabySea compares the request IP against those entries.
Dashboard display
In the API keys table, the IP allowlist column shows the configured IPs:- If one IP is configured, it is shown directly.
- If multiple IPs are configured, the first IP is shown with a
+Nbadge. Hover over the badge to see the full list. - If no IPs are configured, the column shows a dash.
Error response
When a request comes from an IP not in the allowlist:JSON
Common setups
Single production server
Restrict the key to your server’s static IP:Multiple servers behind a load balancer
List all origin IPs (not the load balancer IP, unless it preservesX-Forwarded-For):
Cloud functions (Vercel, AWS Lambda, etc.)
Cloud functions use dynamic IPs that change on each invocation. In this case, leave the allowlist empty and rely on key scoping and monitoring instead.Development and production keys
Create separate keys for each environment with their own allowlists:| Key name | IP allowlist | Scope |
|---|---|---|
prod-api-worker | 203.0.113.10 | Full Access |
dev-local | (empty) | Generate Only |
IP allowlist with rotation
When you rotate a key, the replacement key inherits the same allowlist. The current dashboard rotation flow does not ask for a new IP list.Updating an allowlist
The current dashboard does not provide an edit action for the allowlist. To change it:- Create a new key with the IP values you want.
- Update your application to use the new key.
- Revoke or delete the old key when the cutover is complete.