Search the docs

↑↓ to move · Enter to open · Esc to close

Type to search every page. Results are grouped by section.

TalariaDocs
Dashboard

Docs › Guides

View as Markdown
On this page

Feature flags

Evaluate flags in an official SDK, or download definitions with a secret key.

Flags are defined in the project and evaluated by the SDK at runtime. Evaluation uses the ingest host, for example https://ingest-nz1.newtalaria.com, not the organisation REST API.

Evaluate in an official SDK#

JavaScript and Dart expose Talaria.flags.boolVariation, stringVariation, and jsonVariation. PHP uses Talaria::flags()->boolVariation (and the matching string and JSON helpers).

const enabled = await Talaria.flags.boolVariation('checkout-v2', false);
final enabled = await Talaria.flags.boolVariation('checkout-v2', false);
$enabled = Talaria::flags()->boolVariation('checkout-v2', false);

Pass a default for when the client is disabled, the flag is missing, or the network fails. A missing or invalid key disables Talaria instead of throwing; evaluations then return that default.

Ingest routes#

  • POST /v1/flags/evaluate accepts a publishable or secret key with flags:evaluate.
  • GET /v1/flags?keys=a,b downloads definitions and needs a secret key with flags:read.
curl -sS https://ingest-nz1.newtalaria.com/v1/flags/evaluate \
  -H "Authorization: Bearer tal_pk_prod_nz1_…" \
  -H "Content-Type: application/json" \
  -d '{"keys":["checkout-v2"],"userId":"user-123"}'

See the Ingest API.

MCP#

After you connect MCP, an agent can list flags, get one, and set a rollout to off or to a percentage. Those tools change the project definition; they are not a substitute for SDK evaluation in production traffic.

Was this helpful?