Scope of this feature: IP allow lists apply to Management API keys only. SMTP credentials and sending credentials are not affected.
How it works
Every API key carries anip_allow_list. It is empty by default, and an empty list means no restriction, so existing keys keep working exactly as before.
When the list is not empty:
- Requests from an IP covered by an entry are processed normally.
- Requests from any other IP are rejected on every endpoint, regardless of the scopes granted to the key.
- Changes take effect immediately.
Prefer static addresses you own and control. An allow list is only as stable as the IPs behind it. Egress from a fixed NAT gateway, a bastion host, or a dedicated server works well. Dynamic addresses do not.
Blocked requests
A request made with a restricted key from an IP that is not covered by the list is rejected with HTTP 403 on every v2 endpoint, whatever the key’s scopes allow.Idempotency-Key. Retrying the same request from an allowed IP with the same key executes normally.
Supported entries
You can enter individual addresses or CIDR ranges, in IPv4 or IPv6:
A few rules apply when you save:
- Entries are canonicalized, which means host bits are masked, and duplicates are removed.
- A key can hold up to 100 entries after de-duplication. A longer list is rejected.
- The allow-all prefixes
0.0.0.0/0and::/0are rejected. To remove a restriction, clear the list instead.
Configure in the dashboard
Open your API keys
Go to Settings and then API Keys.
Edit the key
Click Edit on the key you want to restrict and scroll to the IP Allow List section at the bottom.
Add addresses or ranges
Click Add IP address or range and enter one address or CIDR range per field. Repeat for each entry you need.
Save and confirm
Save the change. Because this affects who can use the key, you are asked to confirm your identity before the change is applied.
Configure with the Management API
Set theip_allow_list field when you create a key, or when you update an existing one. The same field is available on the sub-account API key endpoints.
PUT to the key’s endpoint:
The field is always present on API key responses. An empty array means the key can be used from any IP.
Related documentation
Scoped API Keys
Restrict what a key can do with domain and permission scoping
API Key Scopes
Complete reference of available permission scopes
Create API Key
Endpoint reference including the
ip_allow_list field
