Skip to main content
Requests a server-side decision for a specific adaptive policy. Used for per-entity optimization when the SDK needs fresh entity weights from the edge rather than resolving from the bundle.
Most use cases don’t need this endpoint. The SDK resolves parameters locally from the config bundle. Use this endpoint only for per-entity adaptive policies configured with resolutionMode: "edge".

Request

Path parameters

Headers

Body

Response

200 OK

How selection works

The endpoint uses deterministic weighted selection:
  1. Reads the current weights for the entity.
  2. Uses a hash of the unit key to deterministically pick an allocation weighted by those probabilities (same user always picks the same allocation while weights don’t change).
  3. If no entity-specific weights exist yet, uses the global prior — or uniform weights when no state exists at all (cold start).
Selection is deterministic given a fixed weight state, so the same (policyId, entityId, unitKeyValue) always returns the same allocation until the weights change.

Batch

For multiple decisions in a single request:

Body

Each request in the array takes the same fields as the single endpoint, plus a policyId:

Response

Returns a responses array in the same order as requests:
The batch endpoint groups decisions by policy ID, so multiple entity decisions for the same policy only require one state lookup. A missing or non-array requests field returns 400 with the message requests array is required.

Errors

400 Bad request

Also returned for an invalid JSON body, when the allocation count cannot be determined (Cannot determine allocation count), and for org-scoped keys that omit the X-Project-Id header.

401 Unauthorized

403 Forbidden

Returned when the key lacks the sdk:read scope, or when an X-Org-Id or X-Project-Id header doesn’t match the key: