Feato logoFeato

Public API

The Feato Public API allows backend services, workers, and automation systems to interact with feature flags without using a framework-specific SDK.

It provides a stable HTTP interface for reading feature flag state and reacting to changes in your infrastructure.

When to use the Public API

Use the Public API when you cannot rely on a frontend SDK or when feature flag evaluation must happen on the server side.


Authentication

All API requests must be authenticated using a project key.

The project key identifies both the project and the environment for which feature flags are evaluated.

Security note

Project keys should be treated as secrets and never exposed in client-side code.


Endpoints

The Public API exposes endpoints for retrieving feature flag state.

  • Fetch all feature flags for a project and environment
  • Retrieve the current value of a specific flag

Responses are designed to be predictable and cache-friendly where appropriate.

Consistency

API responses always reflect the latest known state of feature flags at the time of the request.


Real-time vs HTTP

Unlike client SDKs, the Public API does not maintain a persistent connection.

Each request returns a snapshot of the current flag state.

  • Client SDKs receive updates automatically
  • Public API requires explicit requests
  • No background synchronization is performed
Choosing the right approach

Use SDKs for long-lived applications and user-facing interfaces. Use the Public API for stateless services and automation.


Error handling

The Public API uses standard HTTP status codes to indicate request outcomes.

  • 4xx responses indicate client-side errors
  • 5xx responses indicate server-side errors
  • Malformed or unauthorized requests are rejected

Error responses are designed to be explicit and machine-readable.

Safe defaults

Applications should handle API errors gracefully and avoid blocking critical paths on feature flag evaluation.


Common use cases

Typical scenarios where the Public API is used include:

  • Backend feature gating
  • CI/CD automation
  • Background workers and jobs
  • Infrastructure-level checks

Next steps

To continue exploring Feato, you may want to review: