Skip to main content

api_key_ip_restricted

The key authenticated, but it is locked to a set of addresses and this request did not come from one of them. Nothing was sent and nothing was charged.

Status: 403

{
"status": 403,
"type": "api_key_ip_restricted",
"message": "This API key is not permitted from your IP address",
"request_id": "req_01J8K2P...",
"doc_url": "https://docs.epostix.com/errors/api_key_ip_restricted"
}

Why you got this

  • An allow-list was set on the key and the calling address is outside it.
  • Your egress address changed. Autoscaling, a replaced NAT gateway, a serverless platform or a move between regions all reassign outbound addresses without warning.
  • The call came from a laptop or a CI runner using a key meant for production servers.
  • The allow-list holds one address where traffic actually leaves through a whole range.

How to fix it

Add the address the request left from to the key's allow-list, or replace single addresses with the CIDR range your platform sends from. Update the list before you move a workload, not after the calls start failing.

If you cannot predict your egress addresses, leave the allow-list empty. An empty list means the key works from anywhere, and its scopes, domain restrictions and expiry still apply. Treat that as a reason to keep the scopes tight.

Is it safe to retry

No, not from the same address. Every attempt from outside the list is refused the same way. Once the address is on the list, or the list is cleared, send the request again. Nothing was created, so there is no duplicate to avoid.