API reference

Three API surfaces matter to integrators: the data plane that proxies your traffic, the consumer portal API used by the developer portal, and the consumer auth endpoints that issue portal sessions.

Data plane — /api/*

All proxied traffic flows through paths under /api/*. The gateway matches the path against your tenant's routes, authenticates the x-api-key header, applies rate limits and resilience policies, and forwards the request to the upstream service.

bash
curl -i -H "x-api-key: gw_live_…" \
  https://gateway.example.com/api/v1/orders

Error envelope

When the gateway itself rejects a request, it answers with a JSON envelope containing a stable machine-readable code:

CodeMeaning
ROUTE_NOT_FOUNDNo route matches the request path
API_KEY_MISSINGThe x-api-key header was not sent
API_KEY_INVALIDThe key is unknown, revoked, or expired
BINDING_FORBIDDENThe key is valid but not bound to this service
METHOD_NOT_ALLOWEDThe route does not allow this HTTP method
RATE_LIMITEDThe key exceeded its requests-per-second limit
CIRCUIT_OPENThe upstream's circuit breaker is open
UPSTREAM_UNAVAILABLEThe upstream could not be reached

Response headers

The gateway annotates responses with rate-limit and tracing headers:

HeaderDescription
x-ratelimit-limitThe key's configured request limit
x-ratelimit-remainingRequests remaining in the current window
retry-afterSeconds to wait after a RATE_LIMITED response
x-correlation-idRequest id — quote it when reporting issues

Example — rate-limited request

A request that exceeds its per-key limit receives HTTP 429 with the envelope and headers:

http
HTTP/1.1 429 Too Many Requests
x-ratelimit-limit: 50
x-ratelimit-remaining: 0
retry-after: 1
x-correlation-id: 9f6c2b1e-…

{
  "error": {
    "code": "RATE_LIMITED",
    "message": "API key exceeded its request rate limit"
  }
}

Consumer portal API

The developer portal is backed by these endpoints. They require a consumer session token (Bearer) obtained from the consumer auth endpoints below.

EndpointDescription
GET /consumer/cataloguePublished services available to this consumer
GET /consumer/keysList the consumer's API keys
GET /consumer/keys/{id}/usage?days=NUsage analytics for one key over the last N days
GET / PUT /consumer/notificationsRead and update notification preferences
GET / POST /consumer/requestsList and create access requests
GET / PUT /consumer/profileRead and update the consumer profile

Consumer auth — /consumer-auth/*

Portal sessions are issued and inspected here:

EndpointDescription
POST /consumer-auth/signupCreate a consumer account
POST /consumer-auth/loginExchange email and password for a session token
GET /consumer-auth/meReturn the authenticated consumer's account