---
title: "Evaluate feature flags for the current portal site"
method: POST
path: "/api/v1/features/evaluate"
tags: ["features"]
---

# Evaluate feature flags for the current portal site

`POST /api/v1/features/evaluate`

## Request

- Base URL: `https://api.endless.health` (the document declares no server; this is the origin it was published from)
- URL: `https://api.endless.health/api/v1/features/evaluate`
- Auth: none declared

Evaluate requested flags for the visited or explicitly selected site.

Inputs:
    body: Canonical feature keys and optional site_id fallback.
    user: Authenticated session user.
    request_site: Site resolved from Referer then Origin, if any.
    site_service: Lookup for explicit site_id when headers do not resolve.
    feature_service: Feature evaluation.
Output:
    Requested feature keys mapped to enabled state and config.

## Request body

- FeatureEvaluateRequestSchema: Request body for authenticated site-context feature evaluation.
  - `feature_keys` string[], required: Canonical feature keys to evaluate for this site and user.
  - `site_id` integer, nullable: Portal site when Referer/Origin do not resolve one. Ignored when those headers already match a site.

## Response `200`

Successful Response

- object

## Other responses

- `404`: Not found
- `422`: Validation Error

---

[API](https://skmtc.dev/endless/apis/eh-core-v3-api-prod.md) - [All operations](https://skmtc.dev/endless/apis/eh-core-v3-api-prod/llms.txt) - [OpenAPI document](https://skmtc.dev/endless/apis/eh-core-v3-api-prod/revisions/9046a1eb2d0c?raw)
