Restrict API keys to specific source IPs or CIDR ranges - network-level credential protection for live keys.
IP allowlisting adds a network boundary to a key: even if the key leaks, requests from outside your allowed ranges are rejected. Strongest protection for live keys used from fixed infrastructure.
PATCH /keys/:id.403 with code: ip_not_allowed.{
"error": {
"type": "authentication",
"code": "ip_not_allowed",
"message": "This API key is restricted to a set of allowed IP addresses.",
"request_id": "req_7mP4xK2nL9qR"
}
}curl -X POST https://api.meridian.dev/v2/keys \
-H "Authorization: Bearer $MERIDIAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "prod-backend",
"environment": "live",
"scopes": ["projects:read", "webhooks:read"],
"allowed_ips": ["203.0.113.0/24", "198.51.100.14"]
}'curl -X PATCH https://api.meridian.dev/v2/keys/key_3nQ7wPx2vM \
-d '{"allowed_ips": ["203.0.113.0/24"]}' \
-H "Authorization: Bearer $MERIDIAN_API_KEY"Send [] to remove restrictions.
live keys to egress IPs - your servers, NAT gateway, or VPN exit. Cloud IPs work if they're static.test keys - developers move networks; the friction isn't worth it for sandbox data.X-Forwarded-For headers don't bypass it.