Hanzo

Flags

Package flags is feature flags: ship it dark, then turn it on for who you pick.

Package flags is feature flags: ship it dark, then turn it on for who you pick.

Base URLhttps://api.hanzo.ai
Operations9
AuthAuthorization: Bearer $HANZO_API_KEY

flags

ListFlagActivity returns the caller's flag change log newest-first: every create, update and delete, with the actor and the time.

GET /v1/flags/activity

ListFlagActivity returns the caller's flag change log newest-first: every create, update and delete, with the actor and the time.

ParameterInTypeRequiredDescription
limitqueryintegerLimit caps the rows returned.

Evaluate runs the caller's flag definitions for one identity and returns the PostHog-shaped verdict: which flags are on (or which variant), their payloads, and whether any definition failed to compute.

POST /v1/flags/decide

Evaluate runs the caller's flag definitions for one identity and returns the PostHog-shaped verdict: which flags are on (or which variant), their payloads, and whether any definition failed to compute. Evaluation is in-process over the caller's own (org, project) definitions — no network hop, no shared KV — so a tenant can only ever evaluate its own flags.

Request bodyapplication/json (required)

FieldTypeRequiredDescription
distinct_idstringDistinctID is the identity the flags are evaluated for.
groupsGroups are the group-level properties, keyed by group type index.
person_propertiesPersonProperties are the person-level properties conditions match against.

GetFlagDefinition returns one flag definition by key, or 404 when the caller's store has none under that key.

GET /v1/flags/defs/{key}

GetFlagDefinition returns one flag definition by key, or 404 when the caller's store has none under that key.

ParameterInTypeRequiredDescription
keypathstringyesKey is the flag key to act on, from the path.

PutFlagDefinition creates or replaces the flag definition at the path's key and returns the stored row.

PUT /v1/flags/defs/{key}

PutFlagDefinition creates or replaces the flag definition at the path's key and returns the stored row. The BODY IS THE DEFINITION DOCUMENT — the PostHog-shaped JSON object the evaluator consumes — and it is stored verbatim except that its "key" is forced to the key in the URL, so a document can never be filed under a name other than the one it was addressed by. Every write bumps the version and appends to the change log under the caller's identity.

ParameterInTypeRequiredDescription
keypathstringyesKey is the flag key to write, from the path.

DeleteFlagDefinition removes one flag definition by key and records the deletion in the change log.

DELETE /v1/flags/defs/{key}

DeleteFlagDefinition removes one flag definition by key and records the deletion in the change log. A key the caller's store does not hold is a 404.

ParameterInTypeRequiredDescription
keypathstringyesKey is the flag key to act on, from the path.

ListFlagDefinitions returns every flag definition in the caller's (org, project) store, by key, with its version and who last changed it.

GET /v1/flags/defs

ListFlagDefinitions returns every flag definition in the caller's (org, project) store, by key, with its version and who last changed it.

Health reports that the flag engine is serving.

GET /v1/flags/health

Health reports that the flag engine is serving. It is not gated: liveness must be probe-able without a token.

WaitlistMode reports whether ONE host is currently gated by the launch waitlist.

GET /v1/flags/waitlist

WaitlistMode reports whether ONE host is currently gated by the launch waitlist. It resolves the host to the service that governs it and reads that service's waitlist switch, so a guard sitting in front of a hosted surface can decide in one call whether to show the waitlist or the product. It answers for the ONE host asked about and never enumerates the registry, which is why it needs no credential. It FAILS OPEN: an unregistered host, an unmounted registry and a store fault all answer known=false with mode=false, so a request is never gated pre-boot or on a registry fault.

ParameterInTypeRequiredDescription
hostquerystringHost is the host to resolve, e.g. "chat.hanzo.ai".

Evaluate runs the caller's flag definitions for one identity and returns the PostHog-shaped verdict: which flags are on (or which variant), their payloads, and whether any definition failed to compute.

POST /v1/flags

Evaluate runs the caller's flag definitions for one identity and returns the PostHog-shaped verdict: which flags are on (or which variant), their payloads, and whether any definition failed to compute. Evaluation is in-process over the caller's own (org, project) definitions — no network hop, no shared KV — so a tenant can only ever evaluate its own flags.

Request bodyapplication/json (required)

FieldTypeRequiredDescription
distinct_idstringDistinctID is the identity the flags are evaluated for.
groupsGroups are the group-level properties, keyed by group type index.
person_propertiesPersonProperties are the person-level properties conditions match against.

All Hanzo APIs · Interactive reference

How is this guide?

On this page