Skip to main content
POST
cURL

Authorizations

Authorization
string
header
required

If using Bearer auth, pass the Secret Key as the token:

Path Parameters

id
string
required

The id of the requested resource

Query Parameters

skipSchemaValidation
deprecated

Deprecated — pass skipSchemaValidation in the request body instead.

Allowed value: "true"
ignoreWarnings
deprecated

Deprecated — pass ignoreWarnings in the request body instead.

Allowed value: "true"

Body

application/json
description
string

Description of the feature

Maximum string length: 10000
archived
boolean
project
string

An associated project ID

targetingAllProjects
boolean

Make this feature discoverable in — and served to — every project, beyond its primary project. Governance/approvals stay with project.

targetingProjects
string[]

Secondary project IDs this feature is targeted in and served to, beyond its primary project. Governance/approvals stay with project.

owner
string

The userId or email address of the owner. If an email address is provided, it will be used to look up the userId of the matching organization member. If an ID is provided, it will be validated as existing in the organization.

defaultValue
string
baseConfig
string | null

The config backing this flag, fixed at creation. Cannot be changed by an update — resend the current value or omit it; a different value is rejected.

defaultValueConfig
string | null

Optional. A config within baseConfig's family that the default value resolves to instead of baseConfig itself. null or omitted means the default is baseConfig. The default is exactly this config and carries no overrides of its own.

tags
string[]

List of associated tags. Will override tags completely with submitted list

rules
object[]

Replaces all feature rules atomically. Behavior differs from v1: v1 PUT applies per-environment patches, v2 PUT swaps the entire rules array in one revision. To preserve existing rules during a partial edit, GET the feature first, mutate the returned rules array, and PUT the full array back. Safe-rollout rules round-trip via their safeRolloutId (creation requires POST /v2/features/:id/revisions/:version/rules).

environments
object

Per-environment enabled state. V2 rules are specified on the top-level rules field.

prerequisites
string[]

Feature IDs. Each feature must evaluate to true

jsonSchema
string

Use JSON schema to validate the payload of a JSON-type feature value (enterprise only).

customFields
object
holdout
object | null

Holdout to assign this feature to. Pass null to remove the feature from its current holdout. Omit the field entirely to leave the holdout unchanged.

ignoreWarnings
boolean

Set to true to acknowledge the warnings listed in a blocked response and continue. This covers experiment guards, locked dependents, and references affected by an archive. When the organization treats schema failures as warnings, it also covers schema and invariant warnings. It never bypasses a rejected Custom Hook. On revision publish endpoints, it can also force-publish an out-of-date draft when the caller has Bypass draft approvals access.

skipSchemaValidation
boolean

Set to true to publish despite schema validation errors, failed invariants, or schema changes that invalidate dependent resources. This does not bypass a rejected Custom Hook; use skipHooks for that. The caller must have Bypass draft approvals access for Feature Flags, Configs, and Constants in every Project. Otherwise, this field is ignored.

skipHooks
boolean

Set to true to publish despite a Custom Hook rejection. This does not bypass schema validation; use skipSchemaValidation for that. The caller must have Bypass draft approvals access for Feature Flags, Configs, and Constants in every Project. Otherwise, this field is ignored.

Response

200 - application/json

Resource created

feature
object
required
bypassedGates
object[]

Gates that would have blocked this publish but were bypassed by the caller's authority. Present only when at least one gate was bypassed.