Skip to content

Restores a version onto the environment as a new version.

POST
/api/v1/orgs/{org}/projects/{project}/flags/{flag}/environments/{env}/versions/{number}/restore
curl --request POST \
--url https://api.featureflip.io/api/v1/orgs/example/projects/example/flags/example/environments/example/versions/1/restore \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "dryRun": true, "includeState": true, "expectedETag": "example" }'

Previews by default, changing nothing: dryRun: false applies. Everything but on/off is restored; includeState restores on/off too. Both return what changed and the configuration’s targetETag; an apply that sends the preview’s as expectedETag is refused with 412 precondition_failed if the environment changed since. A version naming a variation, segment or prerequisite that no longer exists is a 400 validation_failed whose messages start with FLAG_VERSION_MISSING_REFERENCES and name each one; one today’s rules no longer accept starts with FLAG_VERSION_NOT_RESTORABLE. Requires at least Member; applying needs the Pro plan or above (400 PLAN_FEATURE_UNAVAILABLE), and a change reason in a critical environment.

org
required
string
project
required
string
flag
required
string
env
required
string
number
required
integer format: int32
X-Intent-Reason
string

Why you are making this change, recorded in the audit log. Percent-encoded UTF-8 (encode it the way encodeURIComponent does); at most 2048 characters after decoding. Required when the target environment — or, for project-wide changes, any environment in the project — requires a change reason; without one the request is refused with 422 change_reason_required.

X-Freeze-Override
boolean

Owner/Admin only: true breaks an active change freeze for this one request; requires X-Intent-Reason.

Media type application/json

Request body for POST .../versions/{number}/restore. Every field is optional, and so is the body: no body at all previews, the same as {}. dryRun defaults to true: the restore only previews unless it is false. includeState restores on/off too. expectedETag is the preview’s targetETag; an apply sending it is refused with 412 precondition_failed if the environment changed since.

object
dryRun
boolean
nullable
includeState
boolean
nullable
expectedETag
string
nullable

Example generated

{
"dryRun": true,
"includeState": true,
"expectedETag": "example"
}

OK

Media type application/json

Response of POST .../versions/{number}/restore, for a dry run and an apply alike. before is the configuration as it is (as it was, on an apply) and after as the restore leaves it. targetETag is the configuration’s before a dry run and after an apply, so a dry run’s is what the apply sends back as expectedETag. newVersion is the version the apply wrote, null on a dry run and when nothing changed.

object
changed
required
boolean
changedSections
required
Array<string>
before
required

A flag’s configuration in one environment, as a comparison, copy or version result reports it. The fallthroughRollout* fields describe the default rule’s rollout and are null unless it rolls out (fallthroughBucketBy is then the attribute it hashes on, otherwise user_id).

object
isEnabled
required
boolean
defaultVariation
required

An id with its key and name beside it, as the other v1 responses pair them. Key and name are null only for a deleted target.

object
id
required
string format: uuid
key
string
nullable
name
string
nullable
strategy
required
string
fallthroughRolloutVariation

An id with its key and name beside it, as the other v1 responses pair them. Key and name are null only for a deleted target.

object
id
required
string format: uuid
key
string
nullable
name
string
nullable
fallthroughRolloutPercentage
integer format: int32
nullable
fallthroughBucketBy
required
string
rules
required
Array<object>

A targeting rule as a comparison or copy shows it: the variation and segment with key and name, and the condition groups in the shape the targeting endpoints return.

object
description
string
nullable
variation
required

An id with its key and name beside it, as the other v1 responses pair them. Key and name are null only for a deleted target.

object
id
required
string format: uuid
key
string
nullable
name
string
nullable
segment

An id with its key and name beside it, as the other v1 responses pair them. Key and name are null only for a deleted target.

object
id
required
string format: uuid
key
string
nullable
name
string
nullable
rolloutPercentage
integer format: int32
nullable
bucketBy
string
nullable
conditionGroups
required
Array<object>

A condition group within a PublicTargetingRuleResponse. Maps 1:1 onto ConditionGroupDto. Operator is a bare wire string naming one of the ConditionGroupOperator members ("And"/"Or") — groups are ANDed together at the rule level; within a group, its conditions combine using this operator.

object
operator
required

Allowed values: And, Or.

string
Allowed values: And Or
conditions
required
Array<object>

A single condition within a PublicConditionGroupResponse. Maps 1:1 onto ConditionDto. Operator is a bare wire string naming one of the OperatorType members (e.g. "Equals", "In").

object
attribute
required
string
operator
required

Allowed values: Equals, NotEquals, Contains, NotContains, GreaterThan, LessThan, GreaterThanOrEqual, LessThanOrEqual, In, NotIn, MatchesRegex, StartsWith, EndsWith, Before, After, SemverEquals, SemverGreaterThan, SemverGreaterThanOrEqual, SemverLessThan, SemverLessThanOrEqual.

string
Allowed values: Equals NotEquals Contains NotContains GreaterThan LessThan GreaterThanOrEqual LessThanOrEqual In NotIn MatchesRegex StartsWith EndsWith Before After SemverEquals SemverGreaterThan SemverGreaterThanOrEqual SemverLessThan SemverLessThanOrEqual
values
required
Array<string>
negate
required
boolean
prerequisites
required
Array<object>

A single prerequisite entry on a flag’s per-environment config. Maps 1:1 onto PrerequisiteDto (read side) and PrerequisiteInput (write side).

object
prerequisiteFlagKey
required
string
expectedVariationKey
required
string
after
required

A flag’s configuration in one environment, as a comparison, copy or version result reports it. The fallthroughRollout* fields describe the default rule’s rollout and are null unless it rolls out (fallthroughBucketBy is then the attribute it hashes on, otherwise user_id).

object
isEnabled
required
boolean
defaultVariation
required

An id with its key and name beside it, as the other v1 responses pair them. Key and name are null only for a deleted target.

object
id
required
string format: uuid
key
string
nullable
name
string
nullable
strategy
required
string
fallthroughRolloutVariation

An id with its key and name beside it, as the other v1 responses pair them. Key and name are null only for a deleted target.

object
id
required
string format: uuid
key
string
nullable
name
string
nullable
fallthroughRolloutPercentage
integer format: int32
nullable
fallthroughBucketBy
required
string
rules
required
Array<object>

A targeting rule as a comparison or copy shows it: the variation and segment with key and name, and the condition groups in the shape the targeting endpoints return.

object
description
string
nullable
variation
required

An id with its key and name beside it, as the other v1 responses pair them. Key and name are null only for a deleted target.

object
id
required
string format: uuid
key
string
nullable
name
string
nullable
segment

An id with its key and name beside it, as the other v1 responses pair them. Key and name are null only for a deleted target.

object
id
required
string format: uuid
key
string
nullable
name
string
nullable
rolloutPercentage
integer format: int32
nullable
bucketBy
string
nullable
conditionGroups
required
Array<object>

A condition group within a PublicTargetingRuleResponse. Maps 1:1 onto ConditionGroupDto. Operator is a bare wire string naming one of the ConditionGroupOperator members ("And"/"Or") — groups are ANDed together at the rule level; within a group, its conditions combine using this operator.

object
operator
required

Allowed values: And, Or.

string
Allowed values: And Or
conditions
required
Array<object>

A single condition within a PublicConditionGroupResponse. Maps 1:1 onto ConditionDto. Operator is a bare wire string naming one of the OperatorType members (e.g. "Equals", "In").

object
attribute
required
string
operator
required

Allowed values: Equals, NotEquals, Contains, NotContains, GreaterThan, LessThan, GreaterThanOrEqual, LessThanOrEqual, In, NotIn, MatchesRegex, StartsWith, EndsWith, Before, After, SemverEquals, SemverGreaterThan, SemverGreaterThanOrEqual, SemverLessThan, SemverLessThanOrEqual.

string
Allowed values: Equals NotEquals Contains NotContains GreaterThan LessThan GreaterThanOrEqual LessThanOrEqual In NotIn MatchesRegex StartsWith EndsWith Before After SemverEquals SemverGreaterThan SemverGreaterThanOrEqual SemverLessThan SemverLessThanOrEqual
values
required
Array<string>
negate
required
boolean
prerequisites
required
Array<object>

A single prerequisite entry on a flag’s per-environment config. Maps 1:1 onto PrerequisiteDto (read side) and PrerequisiteInput (write side).

object
prerequisiteFlagKey
required
string
expectedVariationKey
required
string
targetETag
required
string
warnings
required
Array<object>

A non-blocking note about a copy.

object
code
required
string
message
required
string
newVersion
integer format: int32
nullable

Example

{
"before": {
"rules": [
{
"conditionGroups": [
{
"operator": "And",
"conditions": [
{
"operator": "Equals"
}
]
}
]
}
]
},
"after": {
"rules": [
{
"conditionGroups": [
{
"operator": "And",
"conditions": [
{
"operator": "Equals"
}
]
}
]
}
]
}
}
X-RateLimit-Limit
integer

The maximum number of requests permitted per rate-limit window for this caller.

X-RateLimit-Remaining
integer

The number of requests remaining in the current rate-limit window.

X-RateLimit-Reset
integer

The UTC time at which the current rate-limit window resets, as a Unix timestamp in seconds.

The request is malformed, or it carries an If-Match header, which this endpoint can’t evaluate. Send no If-Match, or *.

Media type application/json

The frozen public-API error contract. error codes are stable snake_case strings. Wire keys are frozen snake_case too (error, message, docs_url, fields, retry_after) — the global camelCase naming policy would otherwise emit docsUrl/retryAfter, breaking the published spec. !:JsonPropertyName always wins over the policy, so these are pinned explicitly rather than relying on the property names already being lowercase for the single-word ones. did_you_mean, next_actions and connection_id are ADDITIVE optional keys (null → omitted via the global DefaultIgnoreCondition = WhenWritingNull), so pre-existing error bodies are byte-for-byte unchanged when they’re absent.

connection_id is present only on the sso_required error: the organization requires single sign-on, and this credential didn’t come through its identity provider. connection_id identifies which SSO connection to sign in with. plan_limit is present only on the plan_limit_reached error: which plan cap the request would have exceeded, so a client can branch on it without parsing message. change_freeze is present only on the change_frozen error (#4645): the change freeze that refused the write, so a client can show when it ends and whether the caller may break it, without parsing message.

object
error
required
string
message
required
string
docs_url
required
string
fields
object
key
additional properties
Array<string>
retry_after
integer format: int32
nullable
did_you_mean
Array<string>
nullable
next_actions
Array<object>
nullable
object
method
required
string
path
required
string
connection_id
string format: uuid
nullable
plan_limit

The cap behind a plan_limit_reached error. resource is the capped collection (projects, environments, flags, webhooks, members); plan is the plan’s wire name, as GET /api/v1/orgs/{org} returns it; max is the cap. The environment and flag caps are per project.

object
resource
required
string
plan
required
string
max
required
integer format: int32
change_freeze

The freeze behind a change_frozen error: id and name of the window, the environment’s environment_key, ends_at (UTC; always present, null for an open-ended window) and whether the caller’s role may break it (can_override, with X-Freeze-Override: true and an X-Intent-Reason).

object
id
required
string format: uuid
name
required
string
environment_key
required
string
ends_at
string format: date-time
nullable
can_override
required
boolean

Example

{
"error": "not_found",
"message": "Flag 'new-checkout-flw' was not found in project 'checkout'.",
"docs_url": "https://featureflip.io/docs/management-api/errors/not_found",
"did_you_mean": [
"new-checkout-flow"
],
"next_actions": [
{
"method": "GET",
"path": "/api/v1/orgs/acme/projects/checkout/flags"
}
]
}
X-RateLimit-Limit
integer

The maximum number of requests permitted per rate-limit window for this caller.

X-RateLimit-Remaining
integer

The number of requests remaining in the current rate-limit window.

X-RateLimit-Reset
integer

The UTC time at which the current rate-limit window resets, as a Unix timestamp in seconds.

Authentication is required, or the supplied API token is invalid or expired.

Media type application/json

The frozen public-API error contract. error codes are stable snake_case strings. Wire keys are frozen snake_case too (error, message, docs_url, fields, retry_after) — the global camelCase naming policy would otherwise emit docsUrl/retryAfter, breaking the published spec. !:JsonPropertyName always wins over the policy, so these are pinned explicitly rather than relying on the property names already being lowercase for the single-word ones. did_you_mean, next_actions and connection_id are ADDITIVE optional keys (null → omitted via the global DefaultIgnoreCondition = WhenWritingNull), so pre-existing error bodies are byte-for-byte unchanged when they’re absent.

connection_id is present only on the sso_required error: the organization requires single sign-on, and this credential didn’t come through its identity provider. connection_id identifies which SSO connection to sign in with. plan_limit is present only on the plan_limit_reached error: which plan cap the request would have exceeded, so a client can branch on it without parsing message. change_freeze is present only on the change_frozen error (#4645): the change freeze that refused the write, so a client can show when it ends and whether the caller may break it, without parsing message.

object
error
required
string
message
required
string
docs_url
required
string
fields
object
key
additional properties
Array<string>
retry_after
integer format: int32
nullable
did_you_mean
Array<string>
nullable
next_actions
Array<object>
nullable
object
method
required
string
path
required
string
connection_id
string format: uuid
nullable
plan_limit

The cap behind a plan_limit_reached error. resource is the capped collection (projects, environments, flags, webhooks, members); plan is the plan’s wire name, as GET /api/v1/orgs/{org} returns it; max is the cap. The environment and flag caps are per project.

object
resource
required
string
plan
required
string
max
required
integer format: int32
change_freeze

The freeze behind a change_frozen error: id and name of the window, the environment’s environment_key, ends_at (UTC; always present, null for an open-ended window) and whether the caller’s role may break it (can_override, with X-Freeze-Override: true and an X-Intent-Reason).

object
id
required
string format: uuid
name
required
string
environment_key
required
string
ends_at
string format: date-time
nullable
can_override
required
boolean

Example

{
"error": "not_found",
"message": "Flag 'new-checkout-flw' was not found in project 'checkout'.",
"docs_url": "https://featureflip.io/docs/management-api/errors/not_found",
"did_you_mean": [
"new-checkout-flow"
],
"next_actions": [
{
"method": "GET",
"path": "/api/v1/orgs/acme/projects/checkout/flags"
}
]
}
X-RateLimit-Limit
integer

The maximum number of requests permitted per rate-limit window for this caller.

X-RateLimit-Remaining
integer

The number of requests remaining in the current rate-limit window.

X-RateLimit-Reset
integer

The UTC time at which the current rate-limit window resets, as a Unix timestamp in seconds.

Forbidden

Media type application/json

The frozen public-API error contract. error codes are stable snake_case strings. Wire keys are frozen snake_case too (error, message, docs_url, fields, retry_after) — the global camelCase naming policy would otherwise emit docsUrl/retryAfter, breaking the published spec. !:JsonPropertyName always wins over the policy, so these are pinned explicitly rather than relying on the property names already being lowercase for the single-word ones. did_you_mean, next_actions and connection_id are ADDITIVE optional keys (null → omitted via the global DefaultIgnoreCondition = WhenWritingNull), so pre-existing error bodies are byte-for-byte unchanged when they’re absent.

connection_id is present only on the sso_required error: the organization requires single sign-on, and this credential didn’t come through its identity provider. connection_id identifies which SSO connection to sign in with. plan_limit is present only on the plan_limit_reached error: which plan cap the request would have exceeded, so a client can branch on it without parsing message. change_freeze is present only on the change_frozen error (#4645): the change freeze that refused the write, so a client can show when it ends and whether the caller may break it, without parsing message.

object
error
required
string
message
required
string
docs_url
required
string
fields
object
key
additional properties
Array<string>
retry_after
integer format: int32
nullable
did_you_mean
Array<string>
nullable
next_actions
Array<object>
nullable
object
method
required
string
path
required
string
connection_id
string format: uuid
nullable
plan_limit

The cap behind a plan_limit_reached error. resource is the capped collection (projects, environments, flags, webhooks, members); plan is the plan’s wire name, as GET /api/v1/orgs/{org} returns it; max is the cap. The environment and flag caps are per project.

object
resource
required
string
plan
required
string
max
required
integer format: int32
change_freeze

The freeze behind a change_frozen error: id and name of the window, the environment’s environment_key, ends_at (UTC; always present, null for an open-ended window) and whether the caller’s role may break it (can_override, with X-Freeze-Override: true and an X-Intent-Reason).

object
id
required
string format: uuid
name
required
string
environment_key
required
string
ends_at
string format: date-time
nullable
can_override
required
boolean

Example

{
"error": "not_found",
"message": "Flag 'new-checkout-flw' was not found in project 'checkout'.",
"docs_url": "https://featureflip.io/docs/management-api/errors/not_found",
"did_you_mean": [
"new-checkout-flow"
],
"next_actions": [
{
"method": "GET",
"path": "/api/v1/orgs/acme/projects/checkout/flags"
}
]
}
X-RateLimit-Limit
integer

The maximum number of requests permitted per rate-limit window for this caller.

X-RateLimit-Remaining
integer

The number of requests remaining in the current rate-limit window.

X-RateLimit-Reset
integer

The UTC time at which the current rate-limit window resets, as a Unix timestamp in seconds.

Not Found

Media type application/json

The frozen public-API error contract. error codes are stable snake_case strings. Wire keys are frozen snake_case too (error, message, docs_url, fields, retry_after) — the global camelCase naming policy would otherwise emit docsUrl/retryAfter, breaking the published spec. !:JsonPropertyName always wins over the policy, so these are pinned explicitly rather than relying on the property names already being lowercase for the single-word ones. did_you_mean, next_actions and connection_id are ADDITIVE optional keys (null → omitted via the global DefaultIgnoreCondition = WhenWritingNull), so pre-existing error bodies are byte-for-byte unchanged when they’re absent.

connection_id is present only on the sso_required error: the organization requires single sign-on, and this credential didn’t come through its identity provider. connection_id identifies which SSO connection to sign in with. plan_limit is present only on the plan_limit_reached error: which plan cap the request would have exceeded, so a client can branch on it without parsing message. change_freeze is present only on the change_frozen error (#4645): the change freeze that refused the write, so a client can show when it ends and whether the caller may break it, without parsing message.

object
error
required
string
message
required
string
docs_url
required
string
fields
object
key
additional properties
Array<string>
retry_after
integer format: int32
nullable
did_you_mean
Array<string>
nullable
next_actions
Array<object>
nullable
object
method
required
string
path
required
string
connection_id
string format: uuid
nullable
plan_limit

The cap behind a plan_limit_reached error. resource is the capped collection (projects, environments, flags, webhooks, members); plan is the plan’s wire name, as GET /api/v1/orgs/{org} returns it; max is the cap. The environment and flag caps are per project.

object
resource
required
string
plan
required
string
max
required
integer format: int32
change_freeze

The freeze behind a change_frozen error: id and name of the window, the environment’s environment_key, ends_at (UTC; always present, null for an open-ended window) and whether the caller’s role may break it (can_override, with X-Freeze-Override: true and an X-Intent-Reason).

object
id
required
string format: uuid
name
required
string
environment_key
required
string
ends_at
string format: date-time
nullable
can_override
required
boolean

Example

{
"error": "not_found",
"message": "Flag 'new-checkout-flw' was not found in project 'checkout'.",
"docs_url": "https://featureflip.io/docs/management-api/errors/not_found",
"did_you_mean": [
"new-checkout-flow"
],
"next_actions": [
{
"method": "GET",
"path": "/api/v1/orgs/acme/projects/checkout/flags"
}
]
}
X-RateLimit-Limit
integer

The maximum number of requests permitted per rate-limit window for this caller.

X-RateLimit-Remaining
integer

The number of requests remaining in the current rate-limit window.

X-RateLimit-Reset
integer

The UTC time at which the current rate-limit window resets, as a Unix timestamp in seconds.

Precondition Failed

Media type application/json

The frozen public-API error contract. error codes are stable snake_case strings. Wire keys are frozen snake_case too (error, message, docs_url, fields, retry_after) — the global camelCase naming policy would otherwise emit docsUrl/retryAfter, breaking the published spec. !:JsonPropertyName always wins over the policy, so these are pinned explicitly rather than relying on the property names already being lowercase for the single-word ones. did_you_mean, next_actions and connection_id are ADDITIVE optional keys (null → omitted via the global DefaultIgnoreCondition = WhenWritingNull), so pre-existing error bodies are byte-for-byte unchanged when they’re absent.

connection_id is present only on the sso_required error: the organization requires single sign-on, and this credential didn’t come through its identity provider. connection_id identifies which SSO connection to sign in with. plan_limit is present only on the plan_limit_reached error: which plan cap the request would have exceeded, so a client can branch on it without parsing message. change_freeze is present only on the change_frozen error (#4645): the change freeze that refused the write, so a client can show when it ends and whether the caller may break it, without parsing message.

object
error
required
string
message
required
string
docs_url
required
string
fields
object
key
additional properties
Array<string>
retry_after
integer format: int32
nullable
did_you_mean
Array<string>
nullable
next_actions
Array<object>
nullable
object
method
required
string
path
required
string
connection_id
string format: uuid
nullable
plan_limit

The cap behind a plan_limit_reached error. resource is the capped collection (projects, environments, flags, webhooks, members); plan is the plan’s wire name, as GET /api/v1/orgs/{org} returns it; max is the cap. The environment and flag caps are per project.

object
resource
required
string
plan
required
string
max
required
integer format: int32
change_freeze

The freeze behind a change_frozen error: id and name of the window, the environment’s environment_key, ends_at (UTC; always present, null for an open-ended window) and whether the caller’s role may break it (can_override, with X-Freeze-Override: true and an X-Intent-Reason).

object
id
required
string format: uuid
name
required
string
environment_key
required
string
ends_at
string format: date-time
nullable
can_override
required
boolean

Example

{
"error": "not_found",
"message": "Flag 'new-checkout-flw' was not found in project 'checkout'.",
"docs_url": "https://featureflip.io/docs/management-api/errors/not_found",
"did_you_mean": [
"new-checkout-flow"
],
"next_actions": [
{
"method": "GET",
"path": "/api/v1/orgs/acme/projects/checkout/flags"
}
]
}
X-RateLimit-Limit
integer

The maximum number of requests permitted per rate-limit window for this caller.

X-RateLimit-Remaining
integer

The number of requests remaining in the current rate-limit window.

X-RateLimit-Reset
integer

The UTC time at which the current rate-limit window resets, as a Unix timestamp in seconds.

The request body has no Content-Type, or one that isn’t JSON (error code unsupported_media_type). Send it as application/json.

Media type application/json

The frozen public-API error contract. error codes are stable snake_case strings. Wire keys are frozen snake_case too (error, message, docs_url, fields, retry_after) — the global camelCase naming policy would otherwise emit docsUrl/retryAfter, breaking the published spec. !:JsonPropertyName always wins over the policy, so these are pinned explicitly rather than relying on the property names already being lowercase for the single-word ones. did_you_mean, next_actions and connection_id are ADDITIVE optional keys (null → omitted via the global DefaultIgnoreCondition = WhenWritingNull), so pre-existing error bodies are byte-for-byte unchanged when they’re absent.

connection_id is present only on the sso_required error: the organization requires single sign-on, and this credential didn’t come through its identity provider. connection_id identifies which SSO connection to sign in with. plan_limit is present only on the plan_limit_reached error: which plan cap the request would have exceeded, so a client can branch on it without parsing message. change_freeze is present only on the change_frozen error (#4645): the change freeze that refused the write, so a client can show when it ends and whether the caller may break it, without parsing message.

object
error
required
string
message
required
string
docs_url
required
string
fields
object
key
additional properties
Array<string>
retry_after
integer format: int32
nullable
did_you_mean
Array<string>
nullable
next_actions
Array<object>
nullable
object
method
required
string
path
required
string
connection_id
string format: uuid
nullable
plan_limit

The cap behind a plan_limit_reached error. resource is the capped collection (projects, environments, flags, webhooks, members); plan is the plan’s wire name, as GET /api/v1/orgs/{org} returns it; max is the cap. The environment and flag caps are per project.

object
resource
required
string
plan
required
string
max
required
integer format: int32
change_freeze

The freeze behind a change_frozen error: id and name of the window, the environment’s environment_key, ends_at (UTC; always present, null for an open-ended window) and whether the caller’s role may break it (can_override, with X-Freeze-Override: true and an X-Intent-Reason).

object
id
required
string format: uuid
name
required
string
environment_key
required
string
ends_at
string format: date-time
nullable
can_override
required
boolean

Example

{
"error": "not_found",
"message": "Flag 'new-checkout-flw' was not found in project 'checkout'.",
"docs_url": "https://featureflip.io/docs/management-api/errors/not_found",
"did_you_mean": [
"new-checkout-flow"
],
"next_actions": [
{
"method": "GET",
"path": "/api/v1/orgs/acme/projects/checkout/flags"
}
]
}
X-RateLimit-Limit
integer

The maximum number of requests permitted per rate-limit window for this caller.

X-RateLimit-Remaining
integer

The number of requests remaining in the current rate-limit window.

X-RateLimit-Reset
integer

The UTC time at which the current rate-limit window resets, as a Unix timestamp in seconds.

A change reason is required: this change affects an environment that requires one (error code change_reason_required). Retry with the X-Intent-Reason header.

Media type application/json

The frozen public-API error contract. error codes are stable snake_case strings. Wire keys are frozen snake_case too (error, message, docs_url, fields, retry_after) — the global camelCase naming policy would otherwise emit docsUrl/retryAfter, breaking the published spec. !:JsonPropertyName always wins over the policy, so these are pinned explicitly rather than relying on the property names already being lowercase for the single-word ones. did_you_mean, next_actions and connection_id are ADDITIVE optional keys (null → omitted via the global DefaultIgnoreCondition = WhenWritingNull), so pre-existing error bodies are byte-for-byte unchanged when they’re absent.

connection_id is present only on the sso_required error: the organization requires single sign-on, and this credential didn’t come through its identity provider. connection_id identifies which SSO connection to sign in with. plan_limit is present only on the plan_limit_reached error: which plan cap the request would have exceeded, so a client can branch on it without parsing message. change_freeze is present only on the change_frozen error (#4645): the change freeze that refused the write, so a client can show when it ends and whether the caller may break it, without parsing message.

object
error
required
string
message
required
string
docs_url
required
string
fields
object
key
additional properties
Array<string>
retry_after
integer format: int32
nullable
did_you_mean
Array<string>
nullable
next_actions
Array<object>
nullable
object
method
required
string
path
required
string
connection_id
string format: uuid
nullable
plan_limit

The cap behind a plan_limit_reached error. resource is the capped collection (projects, environments, flags, webhooks, members); plan is the plan’s wire name, as GET /api/v1/orgs/{org} returns it; max is the cap. The environment and flag caps are per project.

object
resource
required
string
plan
required
string
max
required
integer format: int32
change_freeze

The freeze behind a change_frozen error: id and name of the window, the environment’s environment_key, ends_at (UTC; always present, null for an open-ended window) and whether the caller’s role may break it (can_override, with X-Freeze-Override: true and an X-Intent-Reason).

object
id
required
string format: uuid
name
required
string
environment_key
required
string
ends_at
string format: date-time
nullable
can_override
required
boolean

Example

{
"error": "not_found",
"message": "Flag 'new-checkout-flw' was not found in project 'checkout'.",
"docs_url": "https://featureflip.io/docs/management-api/errors/not_found",
"did_you_mean": [
"new-checkout-flow"
],
"next_actions": [
{
"method": "GET",
"path": "/api/v1/orgs/acme/projects/checkout/flags"
}
]
}
X-RateLimit-Limit
integer

The maximum number of requests permitted per rate-limit window for this caller.

X-RateLimit-Remaining
integer

The number of requests remaining in the current rate-limit window.

X-RateLimit-Reset
integer

The UTC time at which the current rate-limit window resets, as a Unix timestamp in seconds.

A change freeze covers this environment (error code change_frozen; the change_freeze object names the window, when it ends and whether the caller may break it). An Owner or Admin can retry with X-Freeze-Override: true and an X-Intent-Reason.

Media type application/json

The frozen public-API error contract. error codes are stable snake_case strings. Wire keys are frozen snake_case too (error, message, docs_url, fields, retry_after) — the global camelCase naming policy would otherwise emit docsUrl/retryAfter, breaking the published spec. !:JsonPropertyName always wins over the policy, so these are pinned explicitly rather than relying on the property names already being lowercase for the single-word ones. did_you_mean, next_actions and connection_id are ADDITIVE optional keys (null → omitted via the global DefaultIgnoreCondition = WhenWritingNull), so pre-existing error bodies are byte-for-byte unchanged when they’re absent.

connection_id is present only on the sso_required error: the organization requires single sign-on, and this credential didn’t come through its identity provider. connection_id identifies which SSO connection to sign in with. plan_limit is present only on the plan_limit_reached error: which plan cap the request would have exceeded, so a client can branch on it without parsing message. change_freeze is present only on the change_frozen error (#4645): the change freeze that refused the write, so a client can show when it ends and whether the caller may break it, without parsing message.

object
error
required
string
message
required
string
docs_url
required
string
fields
object
key
additional properties
Array<string>
retry_after
integer format: int32
nullable
did_you_mean
Array<string>
nullable
next_actions
Array<object>
nullable
object
method
required
string
path
required
string
connection_id
string format: uuid
nullable
plan_limit

The cap behind a plan_limit_reached error. resource is the capped collection (projects, environments, flags, webhooks, members); plan is the plan’s wire name, as GET /api/v1/orgs/{org} returns it; max is the cap. The environment and flag caps are per project.

object
resource
required
string
plan
required
string
max
required
integer format: int32
change_freeze

The freeze behind a change_frozen error: id and name of the window, the environment’s environment_key, ends_at (UTC; always present, null for an open-ended window) and whether the caller’s role may break it (can_override, with X-Freeze-Override: true and an X-Intent-Reason).

object
id
required
string format: uuid
name
required
string
environment_key
required
string
ends_at
string format: date-time
nullable
can_override
required
boolean

Example

{
"error": "not_found",
"message": "Flag 'new-checkout-flw' was not found in project 'checkout'.",
"docs_url": "https://featureflip.io/docs/management-api/errors/not_found",
"did_you_mean": [
"new-checkout-flow"
],
"next_actions": [
{
"method": "GET",
"path": "/api/v1/orgs/acme/projects/checkout/flags"
}
]
}
X-RateLimit-Limit
integer

The maximum number of requests permitted per rate-limit window for this caller.

X-RateLimit-Remaining
integer

The number of requests remaining in the current rate-limit window.

X-RateLimit-Reset
integer

The UTC time at which the current rate-limit window resets, as a Unix timestamp in seconds.

Rate limit exceeded. Retry after the interval indicated by the Retry-After header.

Media type application/json

The frozen public-API error contract. error codes are stable snake_case strings. Wire keys are frozen snake_case too (error, message, docs_url, fields, retry_after) — the global camelCase naming policy would otherwise emit docsUrl/retryAfter, breaking the published spec. !:JsonPropertyName always wins over the policy, so these are pinned explicitly rather than relying on the property names already being lowercase for the single-word ones. did_you_mean, next_actions and connection_id are ADDITIVE optional keys (null → omitted via the global DefaultIgnoreCondition = WhenWritingNull), so pre-existing error bodies are byte-for-byte unchanged when they’re absent.

connection_id is present only on the sso_required error: the organization requires single sign-on, and this credential didn’t come through its identity provider. connection_id identifies which SSO connection to sign in with. plan_limit is present only on the plan_limit_reached error: which plan cap the request would have exceeded, so a client can branch on it without parsing message. change_freeze is present only on the change_frozen error (#4645): the change freeze that refused the write, so a client can show when it ends and whether the caller may break it, without parsing message.

object
error
required
string
message
required
string
docs_url
required
string
fields
object
key
additional properties
Array<string>
retry_after
integer format: int32
nullable
did_you_mean
Array<string>
nullable
next_actions
Array<object>
nullable
object
method
required
string
path
required
string
connection_id
string format: uuid
nullable
plan_limit

The cap behind a plan_limit_reached error. resource is the capped collection (projects, environments, flags, webhooks, members); plan is the plan’s wire name, as GET /api/v1/orgs/{org} returns it; max is the cap. The environment and flag caps are per project.

object
resource
required
string
plan
required
string
max
required
integer format: int32
change_freeze

The freeze behind a change_frozen error: id and name of the window, the environment’s environment_key, ends_at (UTC; always present, null for an open-ended window) and whether the caller’s role may break it (can_override, with X-Freeze-Override: true and an X-Intent-Reason).

object
id
required
string format: uuid
name
required
string
environment_key
required
string
ends_at
string format: date-time
nullable
can_override
required
boolean

Example

{
"error": "not_found",
"message": "Flag 'new-checkout-flw' was not found in project 'checkout'.",
"docs_url": "https://featureflip.io/docs/management-api/errors/not_found",
"did_you_mean": [
"new-checkout-flow"
],
"next_actions": [
{
"method": "GET",
"path": "/api/v1/orgs/acme/projects/checkout/flags"
}
]
}
Retry-After
integer

Number of seconds to wait before retrying the request.

X-RateLimit-Limit
integer

The maximum number of requests permitted per rate-limit window for this caller.

X-RateLimit-Remaining
integer

The number of requests remaining in the current rate-limit window.

X-RateLimit-Reset
integer

The UTC time at which the current rate-limit window resets, as a Unix timestamp in seconds.