# Feature availability

> Read feature availability for your team.

Use `POST /messaging/features/evaluate` to read decisions for feature keys supplied with
your integration. A decision describes availability for the requested surface;
it does not authorize an action or change your plan.

Send a team or project credential in the `Authorization` header. Client
tokens cannot call this endpoint. The credential determines the team;
do not send a team ID in the request.

## Request

The request contains `surface` and `keys`. Both use lowercase identifiers with
optional dots or hyphens. Request at most 50 keys and keep the body below 16 KiB.
An empty key list returns an empty list.

Set the optional `locale` to `en` or `pt-BR` to receive titles, descriptions and
terms in that language. Text without a translation is returned in English. The
default is `en`.

## Response

Unknown and unauthorized keys are omitted. A feature that is not offered to your
team is also omitted, unless your team is enrolled in it.

Each returned item contains a `decision` and the feature's published details:

| Field | Meaning |
| --- | --- |
| `decision` | `key`, `version`, `available`, `enrolled`, `variant`, `experimentRevision` and `experimentAssigned`. |
| `experiments` | Registered experiments, each with `key`, `variant`, `revision` and `assigned`. Evaluation does not record exposure. |
| `state` | `on`: available to your team. `opt_in`: available after a team owner or admin accepts the terms. `off`: not available. |
| `title`, `description` | The feature's name and summary in the requested locale. |
| `termsRevision`, `terms` | The current terms and their revision while the feature is `opt_in`; otherwise `null`. |
| `withdrawal` | What withdrawing changes. Present while the feature is `opt_in`, or while your team is still enrolled. |
| `enrollmentSource` | Who enabled an opt-in feature for your team: `customer` for a team owner or admin, `staff` for Polymorfa. `null` when not enrolled. |
| `changedAt` | When your team last joined or left the opt-in feature. `null` when it never enrolled or your credential cannot read team enrollment attribution. |
| `changedBy` | Who made that change: `{ "kind": "member", "name": "…" }` for a current member of your team, with `name` `null` when they have no display name or have left the team, or `{ "kind": "staff" }` for Polymorfa. `null` when your team never enrolled or your credential cannot read team enrollment attribution. Project tokens receive `null` for both attribution fields. Polymorfa staff are never named. |
| `exposureToken` | Deprecated. Always `null`. |

An `opt_in` feature stays unavailable until your team accepts its current terms.
When the terms change, `termsRevision` changes and your team must accept again.
An enrolled team keeps seeing the feature after it is switched off, so it can
withdraw.

Feature versions are positive integers. The single-experiment fields in
`decision` are deprecated: `variant` and `experimentRevision` are always `null`,
and `experimentAssigned` is always `false`. Read `experiments` instead.

Each experiment returns its registered control when no experiment applies.
`revision` is `null` without a published experiment. `assigned` is true for an
eligible team in a running experiment; a decided winner serves to every team
with feature access with `assigned: false`. Paused and ended experiments return
control. Reading decisions never records exposure or conversion.
The optional `measurementAllowed` request field is deprecated and has no effect.

## Use decisions safely

Do not cache decisions or reuse them after switching teams. The API checks
authority again when you perform a protected action. A failed availability read
does not grant access. Retrying a read does not enroll your team or change
a feature setting.

See the [API reference](https://docs.polymorfa.com/api-reference/openapi.json) for the request and response
schema. Use an authenticated HTTP request when your SDK has no matching method.
