Skip to main content

API Overview

The RedPennon API is a stateless flag-evaluation service. Given an environment API key and a user context, it returns the variation that should be served — fast enough to sit in the hot path of a request.

Base URL

EnvironmentURL
Productionhttps://api.redpennon.dev

Evaluation endpoints live under the /v1/ prefix; the health check sits at the root.

Content type

Requests and responses use application/json. Always send:

Content-Type: application/json

Authentication

Every evaluation request must include an X-API-Key header set to an environment API key (a UUID, scoped to one environment in your organisation). See Authentication for the details. /health is unauthenticated.

Endpoints

MethodPathDescription
POST/v1/variables/{key}Evaluate a single variable for a user context
POST/v1/variablesBatch-evaluate many variables in one round-trip
POST/v1/eventsIngest custom experimentation events
POST/v1/code-referencesIngest a code-reference snapshot from CI (organisation token)
GET/healthHealth check (returns {status, db})

See Evaluate a variable, Batch evaluate, and Ingest events for the full request and response shapes. Code references uses an organisation API token (rpa_…) rather than the environment X-API-Key.

Governance

Every authenticated POST /v1/* request checks organisation status (active, not suspended), plan MAU (for identified users), per-organisation rate limits, and batch size caps before work runs. See Errors for status codes and code values.

Paths intentionally omit trailing slashes. A request that adds a trailing slash hits no route and returns 404.

Latency target

Latency budget

The API is designed to sit in your request hot path. Our internal SLO is p95 < 50 ms end-to-end (server side). Evaluations are read-only, do not block on writes, and the service is stateless behind a small connection pool.