Documentation Index
Fetch the complete documentation index at: https://knowledge.bitbybit.studio/llms.txt
Use this file to discover all available pages before exploring further.
Overview
IP whitelisting lets you restrict an API key so it can only be used from specific IP addresses or network ranges. Requests from any other IP are rejected with a403 error.
This is especially useful for enterprise environments where API traffic should only originate from known servers, VPNs, or office networks.
How it works
When you add IP addresses to an API key’s allowlist:- Every request using that key is checked against the allowlist
- If the request IP matches any entry, the request proceeds normally
- If the request IP does not match, the API returns
403 IP_NOT_ALLOWED
401 — not 403.
Setting up IP whitelisting
During key creation
You can configure IP restrictions when creating a new API key:- Go to Settings > Developer
- Click Create API Key
- Fill in the name, description, and scopes
- In the IP Allowlist section, click Add IP
- Enter an IP address or CIDR range and an optional label
- Click Create
On an existing key
To add or modify IP restrictions on an active key:- Go to Settings > Developer
- Find the key in the API Keys list
- Click the menu (three dots) and select IP Allowlist
- Add, edit, or remove entries
- Click Save
Supported formats
Entries can be individual IP addresses or CIDR ranges:| Format | Example | What it matches |
|---|---|---|
| Single IPv4 | 203.0.113.5 | Exactly one address (stored as /32) |
| IPv4 CIDR | 203.0.113.0/24 | 256 addresses (203.0.113.0 – 203.0.113.255) |
| Single IPv6 | 2001:db8::1 | Exactly one address (stored as /128) |
| IPv6 CIDR | 2001:db8::/48 | A subnet of IPv6 addresses |
Limits
| Constraint | Value |
|---|---|
| Max entries per key | 20 |
| Minimum IPv4 prefix | /9 (ranges broader than this are rejected) |
| Minimum IPv6 prefix | /33 (ranges broader than this are rejected) |
Error response
When a request comes from an IP not in the allowlist:403.
Common scenarios
Restrict to a single server
If your API calls always come from one server, add its public IP:Restrict to an office network
If your team’s office uses a NAT gateway, add the gateway’s public IP or subnet:Restrict to a cloud provider subnet
If your application runs on AWS, GCP, or Azure, add the NAT gateway or egress IP range for your VPC:Best practices
- Start without restrictions — test your integration first, then add IP restrictions once everything works
- Use CIDR ranges for dynamic environments — if your servers get new IPs on deploy (e.g. Kubernetes, serverless), use a CIDR range covering your egress IPs
- Label your entries — use descriptive labels so your team knows why each entry exists
- Keep a backup key — consider having a second API key without IP restrictions stored securely for emergency access
- Monitor blocked requests — blocked attempts are logged in the API Usage Logs section of the Developer settings
API usage logs
All API requests — including blocked ones — are logged and visible in Settings > Developer > API Usage Logs. You can filter by API key, HTTP method, and status code, and export logs as CSV. This helps you:- Verify that your server IPs are being recognized correctly
- Identify unauthorized access attempts
- Debug IP-related issues when setting up whitelisting

