Skip to content

Error code · HTTP 403

api_key_purpose_not_allowed

Title
This API key's purpose does not allow this endpoint
What happened
The key's purpose (gateway, redaction, edm) doesn't cover this endpoint.
How to fix it
Provider routes and MCP need a gateway key, /v1/mask a gateway or redaction key, /v1/edm/* an edm key.
Returned by
Gateway mode, Proxy mode
Retry
Retrying the same request fails the same way.
Example response body
{
  "type": "https://maskflare.com/docs/errors/api_key_purpose_not_allowed",
  "title": "This API key's purpose does not allow this endpoint",
  "status": 403,
  "code": "api_key_purpose_not_allowed",
  "detail": "Provider routes and MCP need a `gateway` key, /v1/mask a `gateway` or `redaction` key, /v1/edm/* an `edm` key."
}

All error codes