{
  "openapi": "3.0.4",
  "info": {
    "title": "Management API",
    "description": "Programmatic access to Featureflip — projects, environments, feature flags, variations, targeting, segments, and SDK keys. Authenticate with a Personal Access Token or Service Token via the Authorization: Bearer header.",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://api.featureflip.io",
      "description": "Production"
    }
  ],
  "paths": {
    "/api/v1/orgs/{org}/projects/{project}/environments": {
      "post": {
        "tags": [
          "Environments"
        ],
        "summary": "Creates an environment in the resolved project.",
        "description": "Requires at least Member. An environment past\nthe plan's per-project environment cap is a 403 `plan_limit_reached`.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicCreateEnvironmentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicCreateEnvironmentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PublicCreateEnvironmentRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicEnvironmentResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Environments"
        ],
        "summary": "Lists environments in the resolved project, cursor-paginated.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicEnvironmentResponsePagedResult"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/projects/{project}/environments/{env}": {
      "get": {
        "tags": [
          "Environments"
        ],
        "summary": "Gets an environment in the resolved project by key or id.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "description": "Optional. An ETag of this resource. The response is 200 only if it is still the current one; otherwise 412 `precondition_failed`. `*` or no header always reads.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "ETag": {
                "description": "Strong ETag of the resource's whole body as sent to this caller: it changes whenever anything in the body does. Send it back as If-Match on a PUT.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicEnvironmentResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "412": {
            "description": "The resource's current ETag is not the If-Match one.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Environments"
        ],
        "summary": "Updates an environment's name/color/sort order and critical settings.",
        "description": "Requires at least Member.\nTurning `requireChangeReason` or `requireConfirmation` off requires Admin or Owner (403\notherwise) and a change reason (422 otherwise); turning either on does not.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "description": "Optional. The ETag from a GET of this resource. The write applies only if the resource still has that ETag, meaning nothing in its body has changed since; otherwise 412 `precondition_failed`. `*` or no header applies the write unconditionally.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Intent-Reason",
            "in": "header",
            "description": "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.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicUpdateEnvironmentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicUpdateEnvironmentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PublicUpdateEnvironmentRequest"
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "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.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "412": {
            "description": "The resource changed since the If-Match ETag.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "204": {
            "description": "No Content",
            "headers": {
              "ETag": {
                "description": "Strong ETag of the resource's whole body as sent to this caller: it changes whenever anything in the body does. Send it back as If-Match on a PUT.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Environments"
        ],
        "summary": "Deletes an environment.",
        "description": "Requires at least Member, and a change reason when the environment requires\none. Deleting a project's last environment\nthrows the existing `LAST_ENVIRONMENT`ValidationException, which the\nexception filter maps to a 400 `validation_failed` envelope.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Intent-Reason",
            "in": "header",
            "description": "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.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "422": {
            "description": "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.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "204": {
            "description": "No Content",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/projects/{project}/flags": {
      "post": {
        "tags": [
          "Feature Flags"
        ],
        "summary": "Creates a feature flag in the resolved project.",
        "description": "Requires at least Member.\nType is passed through verbatim to\nType (a bare string) — an invalid value surfaces as\nthe handler's own validation failure. Re-fetches via GetFeatureFlagQuery so\nthe response reflects exactly what was persisted (e.g. server-assigned variation ids). A flag\npast the plan's per-project cap on active flags is a 403 `plan_limit_reached`.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicCreateFeatureFlagRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicCreateFeatureFlagRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PublicCreateFeatureFlagRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicFlagResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Feature Flags"
        ],
        "summary": "Lists feature flags in the resolved project, cursor-paginated.",
        "description": "Unlike\nList, ListFeatureFlagsQuery IS\n`Skip`/`Take`-based and returns a precise `Total`, so the next cursor is\ncomputed from the query result rather than an in-memory count. `type` is parsed\nleniently — an unrecognized value degrades to \"no type filter\" (matching\nDecode's \"garbage input degrades gracefully\" precedent)\nrather than a 400, since it's a non-critical list filter, not a mutation. `owner` filters\nby owner: an email (an active member, case-insensitive) or `none` for unowned flags.\n`permanent` filters to permanent (`true`) or temporary (`false`) flags.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "archived",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "owner",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "permanent",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicFlagListItemPagedResult"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/projects/{project}/flags/{flag}/compare": {
      "get": {
        "tags": [
          "Feature Flags"
        ],
        "summary": "Compares the resolved flag's configuration between two environments (`base` and `other`, key or id), side by side: each side carries the flag's environment config and targeting rules, and `ruleHasMatchInOther` marks per rule whether the other environment has an equal one.",
        "description": "A side is null where\nthe flag has no configuration. Open to any role. Routed as `{flag}/compare` so a flag keyed\n`compare` stays addressable.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "base",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "other",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicFlagComparison"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/projects/{project}/flags/removal-candidates": {
      "get": {
        "tags": [
          "Feature Flags"
        ],
        "summary": "Lists confidently-dead (or, with `staleness=stale`, stale-or-dead) flags the Featureflip Flag Cleanup Action should remove, cursor-paginated, each with its kill `treatment` (true = keep the on-branch, false = keep the off-branch).",
        "description": "Only flags the staleness engine marks at or\nabove the requested tier with a settled value are returned: a decisive StuckRolledOut/StuckRolledBack\nreason, or ZeroTraffic/CreatedUnused when no environment saw traffic and every environment's\nconfiguration serves one fixed variation (enabled, no rules, no prerequisites). Cross-env-divergent\nflags, flags without traffic whose configuration could serve more than one value, and archived\nflags are omitted (no confident code treatment). The ONLY public projection of staleness.\nEach item's `blockedBy` names the live flags that still list it as a prerequisite; while\nit is non-empty the flag cannot be archived (`FLAG_HAS_DEPENDENTS`), so remove those first.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "staleness",
            "in": "query",
            "description": "Minimum staleness tier to include: `dead` (default) or `stale` (includes Stale + Dead).\nOmitted or any unrecognized value falls back to `dead` — the safe default never widens\nsilently.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicFlagRemovalCandidatePagedResult"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/projects/{project}/flags/{flag}": {
      "get": {
        "tags": [
          "Feature Flags"
        ],
        "summary": "Gets a feature flag in the resolved project by key or id.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "description": "Optional. An ETag of this resource. The response is 200 only if it is still the current one; otherwise 412 `precondition_failed`. `*` or no header always reads.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "ETag": {
                "description": "Strong ETag of the resource's whole body as sent to this caller: it changes whenever anything in the body does. Send it back as If-Match on a PUT.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicFlagResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "412": {
            "description": "The resource's current ETag is not the If-Match one.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Feature Flags"
        ],
        "summary": "Updates a flag's name/description/tags/client-side visibility.",
        "description": "Requires at least Member. Changing\nclient-side visibility needs a change reason when any environment of the project requires one.\nKey and type are immutable via this endpoint (mirrors UpdateFeatureFlagCommand,\nwhich carries no `Key`/`Type`).",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "description": "Optional. The ETag from a GET of this resource. The write applies only if the resource still has that ETag, meaning nothing in its body has changed since; otherwise 412 `precondition_failed`. `*` or no header applies the write unconditionally.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Intent-Reason",
            "in": "header",
            "description": "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.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicUpdateFeatureFlagRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicUpdateFeatureFlagRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PublicUpdateFeatureFlagRequest"
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "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.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "412": {
            "description": "The resource changed since the If-Match ETag.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "204": {
            "description": "No Content",
            "headers": {
              "ETag": {
                "description": "Strong ETag of the resource's whole body as sent to this caller: it changes whenever anything in the body does. Send it back as If-Match on a PUT.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Feature Flags"
        ],
        "summary": "Deletes a flag.",
        "description": "Requires at least Member. A flag with dependent prerequisites throws the\nexisting `FLAG_HAS_DEPENDENTS`ValidationException, which the\nexception filter maps to a 400 `validation_failed` envelope — this action doesn't\nspecial-case it.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Intent-Reason",
            "in": "header",
            "description": "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.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "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.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/projects/{project}/flags/{flag}/expiry": {
      "put": {
        "tags": [
          "Feature Flags"
        ],
        "summary": "Sets the flag's advisory expiry date.",
        "description": "Evaluation never changes when it passes — the flag is\nreported stale so it can be cleaned up. Requires at least Member. `expiresAtUtc` takes a\ndate (`2026-12-01`), which means the end of that day in UTC, the same as picking it in the\ndashboard, or a full ISO-8601 timestamp, which is stored exactly. It must be in the future\n(400 `EXPIRY_IN_PAST`), so today's date is accepted, and the flag-expiration feature must\nbe enabled (400 `FEATURE_NOT_ENABLED`). A permanent flag can't have a date\n(400 `PERMANENT_FLAG_HAS_EXPIRY`).",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicSetFlagExpiryRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicSetFlagExpiryRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PublicSetFlagExpiryRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Feature Flags"
        ],
        "summary": "Removes the flag's expiry date.",
        "description": "Requires at least Member. Always allowed, even when\n the flag-expiration feature is disabled.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/projects/{project}/flags/{flag}/owner": {
      "put": {
        "tags": [
          "Feature Flags"
        ],
        "summary": "Assigns the flag's owner by email.",
        "description": "Requires at least Member. The email must belong to an\nactive member of the organization (400 `OWNER_NOT_MEMBER`), and the organization's plan\nmust include flag owners, Pro and above (400 `PLAN_FEATURE_UNAVAILABLE`).",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicSetFlagOwnerRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicSetFlagOwnerRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PublicSetFlagOwnerRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Feature Flags"
        ],
        "summary": "Leaves the flag unowned.",
        "description": "Requires at least Member. Always allowed, including on a\n plan without flag owners.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/projects/{project}/flags/{flag}/permanent": {
      "put": {
        "tags": [
          "Feature Flags"
        ],
        "summary": "Marks the flag permanent: a kill switch, ops toggle or entitlement gate that is meant to stay.",
        "description": "A permanent flag is never offered as a removal candidate and never reported past expiry.\nRequires at least Member. The flag can't have an expiry date (400 `PERMANENT_FLAG_HAS_EXPIRY`;\nremove the date first) and the flag-permanence feature must be enabled (400 `FEATURE_NOT_ENABLED`).",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Feature Flags"
        ],
        "summary": "Makes the flag temporary again.",
        "description": "Requires at least Member. Always allowed, even when the\n flag-permanence feature is disabled.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/projects/{project}/flags/{flag}/removal-pr": {
      "put": {
        "tags": [
          "Feature Flags"
        ],
        "summary": "Records the pull request that removes this flag from code, so the flag's owner is sent a link to it.",
        "description": "Called by the Featureflip Flag Cleanup Action. Requires at least Member. The URL\nmust be an https pull or merge request URL (400 `validation_failed`).",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicSetFlagRemovalPrRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicSetFlagRemovalPrRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PublicSetFlagRemovalPrRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Feature Flags"
        ],
        "summary": "Forgets the flag's removal pull request.",
        "description": "Requires at least Member.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/projects/{project}/flags/{flag}/archive": {
      "post": {
        "tags": [
          "Feature Flags"
        ],
        "summary": "Archives a flag.",
        "description": "Requires at least Member.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "force",
            "in": "query",
            "description": "Archive even though live traffic is still evaluating the flag. Without it the request is\nrefused with `FLAG_RECENTLY_EVALUATED` naming the environments still reading it — which\nusually means the removal has merged but not yet deployed.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "X-Intent-Reason",
            "in": "header",
            "description": "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.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "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.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/projects/{project}/flags/{flag}/restore": {
      "post": {
        "tags": [
          "Feature Flags"
        ],
        "summary": "Restores a previously archived flag.",
        "description": "Requires at least Member. An archived flag doesn't count\ntoward the plan's per-project flag cap, so restoring one into a full project is a 403\n`plan_limit_reached`.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Intent-Reason",
            "in": "header",
            "description": "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.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "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.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/projects/{project}/flags/{flag}/environments": {
      "get": {
        "tags": [
          "Feature Flags"
        ],
        "summary": "Gets the resolved flag's config in every environment of the resolved project.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PublicFlagEnvConfigResponse"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/projects/{project}/flags/{flag}/environments/{env}": {
      "get": {
        "tags": [
          "Feature Flags"
        ],
        "summary": "Gets the resolved flag's config in a single resolved environment.",
        "description": "There is no\nsingle-environment query on the Application side, so this dispatches the same\nGetFlagEnvironmentConfigurationsQuery as GetAll and finds the\nresolved environment by id.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "description": "Optional. An ETag of this resource. The response is 200 only if it is still the current one; otherwise 412 `precondition_failed`. `*` or no header always reads.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "ETag": {
                "description": "Strong ETag of the resource's whole body as sent to this caller: it changes whenever anything in the body does. Send it back as If-Match on a PUT.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicFlagEnvConfigResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "412": {
            "description": "The resource's current ETag is not the If-Match one.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Feature Flags"
        ],
        "summary": "Updates the resolved flag's default variation, strategy, and (optionally) prerequisites in a resolved environment.",
        "description": "Requires at least Member. A null\nPrerequisites leaves prerequisites untouched;\na non-null list replaces them wholesale.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "description": "Optional. The ETag from a GET of this resource. The write applies only if the resource still has that ETag, meaning nothing in its body has changed since; otherwise 412 `precondition_failed`. `*` or no header applies the write unconditionally.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Intent-Reason",
            "in": "header",
            "description": "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.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicUpdateFlagEnvConfigRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicUpdateFlagEnvConfigRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PublicUpdateFlagEnvConfigRequest"
              }
            }
          }
        },
        "responses": {
          "412": {
            "description": "The resource changed since the If-Match ETag.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "204": {
            "description": "No Content",
            "headers": {
              "ETag": {
                "description": "Strong ETag of the resource's whole body as sent to this caller: it changes whenever anything in the body does. Send it back as If-Match on a PUT.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "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.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/projects/{project}/flags/{flag}/environments/{env}/copy": {
      "post": {
        "tags": [
          "Feature Flags"
        ],
        "summary": "Copies the resolved flag's targeting (default variation, strategy, rules, prerequisites, and with `includeState` the on/off state) from `source` (key or id) into this environment, all or nothing.",
        "description": "With `dryRun` it only previews, ignoring the ETags and needing neither a change reason nor a writable\norganization. Both return what changed plus `sourceETag`/`targetETag`; an apply that sends\n`expectedSourceETag`/`expectedTargetETag` from the preview is refused with 412\n`precondition_failed` if either environment changed since. Requires at least Member and the plan's\ncopy feature (400 `PLAN_FEATURE_UNAVAILABLE`).",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Intent-Reason",
            "in": "header",
            "description": "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.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicCopyFlagConfigRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicCopyFlagConfigRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PublicCopyFlagConfigRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicCopyResult"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "412": {
            "description": "Precondition Failed",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "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.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/projects/{project}/flags/{flag}/environments/{env}/toggle": {
      "post": {
        "tags": [
          "Feature Flags"
        ],
        "summary": "Enables or disables the resolved flag in a resolved environment.",
        "description": "Requires at least Member.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Intent-Reason",
            "in": "header",
            "description": "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.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicToggleFlagRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicToggleFlagRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PublicToggleFlagRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "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.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/projects/{project}/flags/{flag}/environments/{env}/evaluations": {
      "get": {
        "tags": [
          "Feature Flags"
        ],
        "summary": "Gets evaluation counts for the flag in one environment.",
        "description": "Counts every evaluation over the last `days` UTC days (7, 30 or 90; default 7),\nstarting no earlier than the flag's creation day. These are evaluation counts, not unique\nusers. They come from SDK-reported events, so an environment whose SDKs report none reads\nzero: no evaluations reported, not necessarily no traffic. Sources are ordered live rules in\nevaluation order, then deleted rules, then fallthrough, off, prerequisite, error, notFound\nand unknown. On a percentage-rollout rule, `rollout.flagged` is true when the served\nsplit is statistically off the configured weights (p < 0.001 and at least 2 percentage\npoints off for some variation).",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "in": "query",
            "schema": {
              "enum": [
                7,
                30,
                90
              ],
              "type": "integer",
              "format": "int32",
              "default": 7
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicFlagEvaluationsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/projects/{project}/flags/{flag}/environments/{env}/targeting": {
      "get": {
        "tags": [
          "Feature Flags"
        ],
        "summary": "Gets the resolved flag's full targeting configuration (enabled flag + ordered rules) in the resolved environment.",
        "description": "GetTargetingConfigurationQuery returns null when\nno `FlagEnvironmentConfiguration` exists yet for this flag/environment pair — treated\nas 404 here (rather than an empty PublicTargetingConfigResponse) for\nconsistency with every other resolved-resource 404 on this surface.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "description": "Optional. An ETag of this resource. The response is 200 only if it is still the current one; otherwise 412 `precondition_failed`. `*` or no header always reads.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "ETag": {
                "description": "Strong ETag of the resource's whole body as sent to this caller: it changes whenever anything in the body does. Send it back as If-Match on a PUT.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicTargetingConfigResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "412": {
            "description": "The resource's current ETag is not the If-Match one.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Feature Flags"
        ],
        "summary": "Declaratively replaces the resolved flag's entire targeting rule set in the resolved environment.",
        "description": "The ordered Rules list is applied in\narray order (= evaluation order); an empty or omitted list clears all rules. Segment-scoped\nrules are supported. The replace is atomic. A rule identical to an existing one keeps that\nrule's id (moving it to its new position); only new or changed rules get new ids.\nRequires at least Member.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "description": "Optional. The ETag from a GET of this resource. The write applies only if the resource still has that ETag, meaning nothing in its body has changed since; otherwise 412 `precondition_failed`. `*` or no header applies the write unconditionally.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Intent-Reason",
            "in": "header",
            "description": "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.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicPutTargetingRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicPutTargetingRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PublicPutTargetingRequest"
              }
            }
          }
        },
        "responses": {
          "412": {
            "description": "The resource changed since the If-Match ETag.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "204": {
            "description": "No Content",
            "headers": {
              "ETag": {
                "description": "Strong ETag of the resource's whole body as sent to this caller: it changes whenever anything in the body does. Send it back as If-Match on a PUT.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "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.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/projects/{project}/flags/{flag}/environments/{env}/rules": {
      "post": {
        "tags": [
          "Feature Flags"
        ],
        "summary": "Creates a targeting rule on the resolved flag in the resolved environment.",
        "description": "Requires at\nleast Member. Re-fetches via GetTargetingRuleQuery using the id returned\nfrom CreateTargetingRuleCommand so the response reflects exactly what was\npersisted (e.g. server-assigned priority and condition/group ids).",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Intent-Reason",
            "in": "header",
            "description": "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.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicCreateTargetingRuleRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicCreateTargetingRuleRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PublicCreateTargetingRuleRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicTargetingRuleResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "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.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/projects/{project}/flags/{flag}/environments/{env}/rules/{ruleId}": {
      "get": {
        "tags": [
          "Feature Flags"
        ],
        "summary": "Gets a single targeting rule on the resolved flag in the resolved environment by id.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ruleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "description": "Optional. An ETag of this resource. The response is 200 only if it is still the current one; otherwise 412 `precondition_failed`. `*` or no header always reads.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "ETag": {
                "description": "Strong ETag of the resource's whole body as sent to this caller: it changes whenever anything in the body does. Send it back as If-Match on a PUT.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicTargetingRuleResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "412": {
            "description": "The resource's current ETag is not the If-Match one.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Feature Flags"
        ],
        "summary": "Updates a targeting rule's variation/description/rollout/segment/conditions wholesale.",
        "description": "Requires at least Member.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ruleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "description": "Optional. The ETag from a GET of this resource. The write applies only if the resource still has that ETag, meaning nothing in its body has changed since; otherwise 412 `precondition_failed`. `*` or no header applies the write unconditionally.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Intent-Reason",
            "in": "header",
            "description": "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.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicUpdateTargetingRuleRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicUpdateTargetingRuleRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PublicUpdateTargetingRuleRequest"
              }
            }
          }
        },
        "responses": {
          "412": {
            "description": "The resource changed since the If-Match ETag.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "204": {
            "description": "No Content",
            "headers": {
              "ETag": {
                "description": "Strong ETag of the resource's whole body as sent to this caller: it changes whenever anything in the body does. Send it back as If-Match on a PUT.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "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.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Feature Flags"
        ],
        "summary": "Deletes a targeting rule from the resolved flag in the resolved environment.",
        "description": "Requires at least Member.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ruleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Intent-Reason",
            "in": "header",
            "description": "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.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "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.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/projects/{project}/flags/{flag}/environments/{env}/rules/reorder": {
      "put": {
        "tags": [
          "Feature Flags"
        ],
        "summary": "Reorders the resolved flag's targeting rules in the resolved environment by priority.",
        "description": "Requires at least Member. Must include every existing rule id exactly once — see the\ntype-level remarks on the dup/omission 500 wart.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Intent-Reason",
            "in": "header",
            "description": "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.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicReorderRulesRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicReorderRulesRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PublicReorderRulesRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "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.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/projects/{project}/flags/{flag}/variations": {
      "post": {
        "tags": [
          "Feature Flags"
        ],
        "summary": "Adds a variation to the resolved flag.",
        "description": "Requires at least Member. Re-fetches the flag via\nGetFeatureFlagQuery and locates the new variation by the id returned from\nAddVariationCommand so the response reflects exactly what was persisted.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Intent-Reason",
            "in": "header",
            "description": "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.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicAddVariationRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicAddVariationRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PublicAddVariationRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicVariationResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "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.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/projects/{project}/flags/{flag}/variations/{variationId}": {
      "put": {
        "tags": [
          "Feature Flags"
        ],
        "summary": "Updates a variation's name/value/description.",
        "description": "Requires at least Member. The variation's key is immutable via this endpoint.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "variationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Intent-Reason",
            "in": "header",
            "description": "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.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicUpdateVariationRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicUpdateVariationRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PublicUpdateVariationRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "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.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Feature Flags"
        ],
        "summary": "Removes a variation from the resolved flag.",
        "description": "Requires at least Member. A variation with\ndependents (used as default variation, referenced by a targeting rule, or flagged\n`VARIATION_HAS_DEPENDENTS`) throws the existing\nValidationException, which the\nexception filter maps to a 400 `validation_failed` envelope — this action doesn't\nspecial-case it.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "variationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Intent-Reason",
            "in": "header",
            "description": "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.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "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.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/projects/{project}/flags/{flag}/environments/{env}/triggers": {
      "post": {
        "tags": [
          "Flag Triggers"
        ],
        "summary": "Creates a trigger.",
        "description": "Returns its URL exactly once.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Intent-Reason",
            "in": "header",
            "description": "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.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicCreateFlagTriggerRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicCreateFlagTriggerRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PublicCreateFlagTriggerRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicFlagTriggerWithUrlResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "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.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Flag Triggers"
        ],
        "summary": "Lists the flag's triggers in the environment, cursor-paginated.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicFlagTriggerResponsePagedResult"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/projects/{project}/flags/{flag}/environments/{env}/triggers/{trigger}": {
      "get": {
        "tags": [
          "Flag Triggers"
        ],
        "summary": "Gets a trigger by id.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "trigger",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicFlagTriggerResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Flag Triggers"
        ],
        "summary": "Renames a trigger, replaces its description, or turns it off and on.",
        "description": "Requires at least Member.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "trigger",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Intent-Reason",
            "in": "header",
            "description": "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.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicUpdateFlagTriggerRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicUpdateFlagTriggerRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PublicUpdateFlagTriggerRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicFlagTriggerResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "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.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Flag Triggers"
        ],
        "summary": "Deletes a trigger.",
        "description": "Its URL stops working at once. Requires at least Member.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "trigger",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Intent-Reason",
            "in": "header",
            "description": "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.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "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.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/projects/{project}/flags/{flag}/environments/{env}/triggers/{trigger}/rotate": {
      "post": {
        "tags": [
          "Flag Triggers"
        ],
        "summary": "Replaces a trigger's URL.",
        "description": "The old URL stops working at once; the new one is returned exactly once.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "trigger",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Intent-Reason",
            "in": "header",
            "description": "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.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicFlagTriggerWithUrlResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "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.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/me": {
      "get": {
        "tags": [
          "Me"
        ],
        "summary": "Returns the authenticated caller's public identity (see MeResponse).",
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "Lists the caller's organizations, cursor-paginated.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationResponsePagedResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "Gets one of the caller's organizations by slug or id.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/projects": {
      "post": {
        "tags": [
          "Projects"
        ],
        "summary": "Creates a project in the resolved organization.",
        "description": "Requires at least Member. A project past the\nplan's project cap is a 403 `plan_limit_reached`.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicCreateProjectRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicCreateProjectRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PublicCreateProjectRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Lists projects in the resolved organization, cursor-paginated.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectResponsePagedResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/projects/{project}": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Gets a project in the resolved organization by key or id.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Projects"
        ],
        "summary": "Updates a project's name/description.",
        "description": "Requires at least Member.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicUpdateProjectRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicUpdateProjectRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PublicUpdateProjectRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Projects"
        ],
        "summary": "Deletes a project.",
        "description": "Requires at least Member, and a change reason when any of its environments\n requires one.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Intent-Reason",
            "in": "header",
            "description": "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.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "422": {
            "description": "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.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "204": {
            "description": "No Content",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/projects/{project}/compare": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Compares every active flag's configuration between two environments of the project (`base` and `other`, key or id), cursor-paginated.",
        "description": "`differentOnly` hides flags that match. Each row lists the\nsections that differ (`state`, `defaultVariation`, `strategy`, `rules`,\n`prerequisites`); a side is null where the flag has no configuration. Open to any role. A route\n`.../compare` sits beside `.../{project}` rather than under `environments` so an environment keyed\n`compare` stays addressable.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "base",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "other",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "differentOnly",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "owner",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicFlagComparisonRowPagedResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/projects/{project}/default-flag-lifetime": {
      "put": {
        "tags": [
          "Projects"
        ],
        "summary": "Sets or removes the project's default flag lifetime, in days (1–3650; null removes it).",
        "description": "Temporary\nflags with no expiry date of their own then expire that many days after they were created, reported\nas `expirySource: \"project-default\"`. Takes effect at the next hourly staleness run. Requires at\nleast Member, and the default-flag-lifetime feature to set one (400 `FEATURE_NOT_ENABLED`);\nremoving one is always allowed. `days` is required; send `{\"days\": null}` to remove.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicSetDefaultFlagLifetimeRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicSetDefaultFlagLifetimeRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PublicSetDefaultFlagLifetimeRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/projects/{project}/default-flag-lifetime/impact": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Previews a default flag lifetime: how many temporary flags with no expiry date of their own would newly be past expiry, and how many would stop being past the current one.",
        "description": "Omit `days` to\npreview removing it.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicDefaultFlagLifetimeImpact"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/projects/{project}/environments/{env}/sdk-keys": {
      "post": {
        "tags": [
          "SDK Keys"
        ],
        "summary": "Creates an SDK key in the resolved environment.",
        "description": "Requires at least Member. Returns the\nplaintext key exactly once — see the type-level remarks.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicCreateSdkKeyRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicCreateSdkKeyRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PublicCreateSdkKeyRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicCreateSdkKeyResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "SDK Keys"
        ],
        "summary": "Lists SDK keys in the resolved environment, cursor-paginated.",
        "description": "Like\nList, ListSdkKeysQuery has no\n`Skip`/`Take` (an environment's key count is small), so this fetches the full\nset and pages in-memory to still expose the standard cursor contract.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicSdkKeyResponsePagedResult"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/projects/{project}/environments/{env}/sdk-keys/{sdkKey}": {
      "get": {
        "tags": [
          "SDK Keys"
        ],
        "summary": "Gets an SDK key in the resolved environment by id (guid-only — see the type-level remarks).",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sdkKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicSdkKeyResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "SDK Keys"
        ],
        "summary": "Updates an SDK key's name/description.",
        "description": "Requires at least Member. Type and key material are immutable via this endpoint.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sdkKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicUpdateSdkKeyRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicUpdateSdkKeyRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PublicUpdateSdkKeyRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/projects/{project}/environments/{env}/sdk-keys/{sdkKey}/revoke": {
      "post": {
        "tags": [
          "SDK Keys"
        ],
        "summary": "Revokes an SDK key.",
        "description": "Requires at least Member, and a change reason when its environment requires one.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sdkKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Intent-Reason",
            "in": "header",
            "description": "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.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "422": {
            "description": "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.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "204": {
            "description": "No Content",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/projects/{project}/segments": {
      "post": {
        "tags": [
          "User Segments"
        ],
        "summary": "Creates a user segment in the resolved project.",
        "description": "Requires at least Member. Re-fetches via\nListUserSegmentsQuery (there is no single-segment query) and locates the new\nsegment by the id returned from CreateUserSegmentCommand so the response\nreflects exactly what was persisted (e.g. server-assigned condition ids, folded into the\npublic shape via FromDto).",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Intent-Reason",
            "in": "header",
            "description": "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.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicCreateSegmentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicCreateSegmentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PublicCreateSegmentRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicSegmentResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "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.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "User Segments"
        ],
        "summary": "Lists user segments in the resolved project, cursor-paginated.",
        "description": "Like\nList, ListUserSegmentsQuery has no\n`Skip`/`Take` (a project's segment count is small), so this fetches the full set\nand pages in-memory to still expose the standard cursor contract.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicSegmentResponsePagedResult"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/projects/{project}/segments/{segment}": {
      "get": {
        "tags": [
          "User Segments"
        ],
        "summary": "Gets a user segment in the resolved project by key or id.",
        "description": "There is no\nListUserSegments-adjacent single-item\nquery, so this resolves `{segment}` then dispatches ListUserSegmentsQuery\nand finds the match — see the type-level remarks for why a list+find is acceptable here.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "segment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "description": "Optional. An ETag of this resource. The response is 200 only if it is still the current one; otherwise 412 `precondition_failed`. `*` or no header always reads.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "ETag": {
                "description": "Strong ETag of the resource's whole body as sent to this caller: it changes whenever anything in the body does. Send it back as If-Match on a PUT.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicSegmentResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "412": {
            "description": "The resource's current ETag is not the If-Match one.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "User Segments"
        ],
        "summary": "Updates a segment's name/description/conditions.",
        "description": "Requires at least Member. The segment's key is immutable via this endpoint.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "segment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "description": "Optional. The ETag from a GET of this resource. The write applies only if the resource still has that ETag, meaning nothing in its body has changed since; otherwise 412 `precondition_failed`. `*` or no header applies the write unconditionally.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Intent-Reason",
            "in": "header",
            "description": "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.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicUpdateSegmentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicUpdateSegmentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PublicUpdateSegmentRequest"
              }
            }
          }
        },
        "responses": {
          "412": {
            "description": "The resource changed since the If-Match ETag.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "204": {
            "description": "No Content",
            "headers": {
              "ETag": {
                "description": "Strong ETag of the resource's whole body as sent to this caller: it changes whenever anything in the body does. Send it back as If-Match on a PUT.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "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.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "User Segments"
        ],
        "summary": "Deletes a user segment.",
        "description": "Requires at least Member.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "segment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Intent-Reason",
            "in": "header",
            "description": "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.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "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.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/webhooks": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Lists the organization's webhook subscriptions, oldest first.",
        "description": "Requires Admin.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicWebhookSubscriptionResponsePagedResult"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Creates a webhook subscription.",
        "description": "Requires Admin. The response carries the signing secret,\nwhich is never shown again. Supports the `Idempotency-Key` header. A subscription past\nthe plan's webhook cap is a 403 `plan_limit_reached`.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicCreateWebhookSubscriptionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicCreateWebhookSubscriptionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PublicCreateWebhookSubscriptionRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicCreateWebhookSubscriptionResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/webhooks/event-types": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Lists the event types a subscription can filter on.",
        "description": "Requires Admin.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/webhooks/{id}": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Gets a webhook subscription by id.",
        "description": "Requires Admin. Never returns secret values.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "description": "Optional. An ETag of this resource. The response is 200 only if it is still the current one; otherwise 412 `precondition_failed`. `*` or no header always reads.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "ETag": {
                "description": "Strong ETag of the resource's whole body as sent to this caller: it changes whenever anything in the body does. Send it back as If-Match on a PUT.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicWebhookSubscriptionResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "412": {
            "description": "The resource's current ETag is not the If-Match one.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Replaces a webhook subscription's configuration.",
        "description": "Requires Admin. Omitted lists become empty,\nwhich means \"all\". Re-enabling a subscription that is over the plan's webhook allowance (after\na downgrade) is a 403 `plan_limit_reached`. Omit `credential` to keep the stored\none, except when changing the `url` of a Datadog or Grafana subscription: that needs\nthe credential again.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "description": "Optional. The ETag from a GET of this resource. The write applies only if the resource still has that ETag, meaning nothing in its body has changed since; otherwise 412 `precondition_failed`. `*` or no header applies the write unconditionally.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicUpdateWebhookSubscriptionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicUpdateWebhookSubscriptionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PublicUpdateWebhookSubscriptionRequest"
              }
            }
          }
        },
        "responses": {
          "412": {
            "description": "The resource changed since the If-Match ETag.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "204": {
            "description": "No Content",
            "headers": {
              "ETag": {
                "description": "Strong ETag of the resource's whole body as sent to this caller: it changes whenever anything in the body does. Send it back as If-Match on a PUT.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Deletes a webhook subscription with its secrets and delivery log.",
        "description": "Requires Admin.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/webhooks/{id}/secrets": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Adds a new active signing secret.",
        "description": "Requires Admin. The previous secret keeps signing until\nyou retire it, so receivers can switch over without dropping deliveries. The response\ncarries the new secret, which is never shown again. Supports the `Idempotency-Key`\nheader.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicRotateWebhookSecretResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/webhooks/{id}/secrets/{secretId}": {
      "delete": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Retires a signing secret.",
        "description": "Requires Admin. Refused with a 400 when it is the subscription's\nlast active secret — rotate first.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "secretId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/webhooks/{id}/test": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Queues one synthetic `flag.toggled` event for this subscription alone.",
        "description": "Requires Admin.\nDelivery is asynchronous — read the delivery log for the outcome. Refused with a 400 when\nthe subscription is disabled, and with a 403 `plan_limit_reached` when it is over the\nplan's webhook allowance.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicTestWebhookSubscriptionResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/webhooks/{id}/deliveries": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Lists a subscription's delivery attempts, most recent first.",
        "description": "Requires Admin.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicWebhookDeliveryResponsePagedResult"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{org}/webhooks/{id}/deliveries/{deliveryId}/redeliver": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Queues a finished delivery (succeeded or dead-lettered) to be sent again, restarting its retry schedule.",
        "description": "Requires Admin. Refused with a 400 when the delivery is still pending, when\nthe subscription is disabled, or when the subscription's current project, environment or\nevent-type filters no longer cover the delivery's event. Refused with a 403\n`plan_limit_reached` when the subscription is over the plan's webhook allowance.",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "deliveryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "description": "The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required, or the supplied API token is invalid or expired.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the interval indicated by the Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Number of seconds to wait before retrying the request.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiErrorEnvelope"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ActionCapability": {
        "type": "object",
        "properties": {
          "allowed": {
            "type": "boolean"
          },
          "reason": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One entry in a resource's `_actions` block: may the caller perform it, and if not, why."
      },
      "MeResponse": {
        "required": [
          "type",
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "emailVerified": {
            "type": "boolean",
            "nullable": true
          },
          "organizationId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "role": {
            "type": "string",
            "nullable": true
          },
          "projectScope": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The authenticated caller's identity, returned by `GET /api/v1/me`. The public API\nauthenticates two kinds of principal, so this is a `type`-discriminated shape.\nA `\"user\"` caller (a session/JWT user or a personal access token, `ffp_...`) carries\n`email` + `emailVerified`. A `\"service_token\"` caller (`ffs_...`) has no\nbacking user row, so it carries `organizationId` + `role` + `projectScope` (the\ntoken's org, its role in that org, and its project allowlist) instead. The type-inapplicable\nfields are omitted from the response body. `projectScope` is omitted for an unrestricted\nservice token (access to every project), never an empty list."
      },
      "NextAction": {
        "required": [
          "method",
          "path"
        ],
        "type": "object",
        "properties": {
          "method": {
            "type": "string"
          },
          "path": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "OrganizationResponse": {
        "required": [
          "id",
          "name",
          "slug",
          "plan",
          "isActive",
          "createdAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "plan": {
            "enum": [
              "Solo",
              "Team",
              "Pro",
              "Business",
              "Enterprise"
            ],
            "type": "string",
            "description": "Allowed values: Solo, Team, Pro, Business, Enterprise."
          },
          "isActive": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "Public representation of an organization, returned by both `GET /api/v1/orgs` (list) and\n`GET /api/v1/orgs/{org}` (detail). Drops dashboard-only fields (`BillingEmail` is\nbilling-contact PII, `UpdatedAt` is dashboard audit trivia) from the dashboard's\nOrganizationDto/OrganizationListItemDto."
      },
      "OrganizationResponsePagedResult": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrganizationResponse"
            }
          },
          "next_cursor": {
            "type": "string",
            "nullable": true
          },
          "_actions": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/ActionCapability"
            },
            "description": "Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it."
          }
        },
        "additionalProperties": false,
        "description": "A page of results plus an opaque cursor for the next page, or null when this is the last\npage. Wire keys are frozen: `items` (already lowercase under the camelCase policy) and\n`next_cursor` (pinned explicitly — the policy alone would emit `nextCursor`)."
      },
      "ProjectResponse": {
        "required": [
          "id",
          "key",
          "name",
          "createdAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "defaultFlagLifetimeDays": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "_actions": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/ActionCapability"
            },
            "description": "Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it."
          }
        },
        "additionalProperties": false,
        "description": "Public representation of a project, returned by `GET /api/v1/orgs/{org}/projects` (list),\n`GET .../projects/{project}` (detail), and the body of a successful create/update. Drops\nthe dashboard-only nested `Environments` collection from ProjectDto — the\npublic API surfaces environments via their own endpoint (Task 6), not embedded here.\nUpdatedAt is only populated from ProjectDto (the detail/create\nshape); ProjectListItemDto doesn't carry it, so list rows leave it `null`.\nDefaultFlagLifetimeDays is the project's default flag lifetime in days, or null (#3194).",
        "example": {
          "id": "0197b69f-1a2b-7c3d-8e4f-5a6b7c8d9e0f",
          "key": "checkout",
          "name": "Checkout",
          "description": "Checkout and payments surfaces.",
          "createdAt": "2026-06-01T12:00:00Z",
          "updatedAt": "2026-06-15T08:30:00Z"
        }
      },
      "ProjectResponsePagedResult": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectResponse"
            }
          },
          "next_cursor": {
            "type": "string",
            "nullable": true
          },
          "_actions": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/ActionCapability"
            },
            "description": "Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it."
          }
        },
        "additionalProperties": false,
        "description": "A page of results plus an opaque cursor for the next page, or null when this is the last\npage. Wire keys are frozen: `items` (already lowercase under the camelCase policy) and\n`next_cursor` (pinned explicitly — the policy alone would emit `nextCursor`)."
      },
      "PublicAddVariationRequest": {
        "required": [
          "key",
          "name",
          "value"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for\n`POST /api/v1/orgs/{org}/projects/{project}/flags/{flag}/variations`. Named distinctly\nfrom the dashboard's own `AddVariationRequest` —\nsee PublicCreateEnvironmentRequest for the schemaId-collision rationale (both\ncontrollers share one Swagger document).",
        "example": {
          "key": "express",
          "name": "Express Checkout",
          "value": "express",
          "description": "One-click express checkout variant."
        }
      },
      "PublicApiErrorEnvelope": {
        "required": [
          "error",
          "message",
          "docs_url"
        ],
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "docs_url": {
            "type": "string"
          },
          "fields": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "nullable": true
          },
          "retry_after": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "did_you_mean": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "next_actions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NextAction"
            },
            "nullable": true
          },
          "connection_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "plan_limit": {
            "$ref": "#/components/schemas/PublicPlanLimit"
          }
        },
        "additionalProperties": false,
        "description": "The frozen public-API error contract. `error` codes are stable snake_case strings. Wire keys\nare frozen snake_case too (`error`, `message`, `docs_url`, `fields`,\n`retry_after`) — the global camelCase naming policy would otherwise emit\n`docsUrl`/`retryAfter`, breaking the published spec. !:JsonPropertyName\nalways wins over the policy, so these are pinned explicitly rather than relying on the\nproperty names already being lowercase for the single-word ones.\n`did_you_mean`, `next_actions` and `connection_id` are ADDITIVE optional keys\n(null → omitted via the global `DefaultIgnoreCondition = WhenWritingNull`), so\npre-existing error bodies are byte-for-byte unchanged when they're absent.\n\n`connection_id` is present only on the `sso_required` error: the organization\nrequires single sign-on, and this credential didn't come through its identity provider.\n`connection_id` identifies which SSO connection to sign in with.\n`plan_limit` is present only on the `plan_limit_reached` error: which plan cap the\nrequest would have exceeded, so a client can branch on it without parsing `message`.",
        "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"
            }
          ]
        }
      },
      "PublicConditionGroupRequest": {
        "required": [
          "operator",
          "conditions"
        ],
        "type": "object",
        "properties": {
          "operator": {
            "enum": [
              "And",
              "Or"
            ],
            "type": "string",
            "description": "Allowed values: And, Or."
          },
          "conditions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicConditionRequest"
            }
          }
        },
        "additionalProperties": false,
        "description": "Request-side condition group, symmetric with PublicConditionGroupResponse."
      },
      "PublicConditionGroupResponse": {
        "required": [
          "operator",
          "conditions"
        ],
        "type": "object",
        "properties": {
          "operator": {
            "enum": [
              "And",
              "Or"
            ],
            "type": "string",
            "description": "Allowed values: And, Or."
          },
          "conditions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicConditionResponse"
            }
          }
        },
        "additionalProperties": false,
        "description": "A condition group within a PublicTargetingRuleResponse. Maps 1:1 onto\nConditionGroupDto. Operator is a bare wire string naming one of\nthe `ConditionGroupOperator` members (`\"And\"`/`\"Or\"`) —\ngroups are ANDed together at the rule level; within a group, its conditions combine using\nthis operator."
      },
      "PublicConditionRequest": {
        "required": [
          "attribute",
          "operator",
          "values"
        ],
        "type": "object",
        "properties": {
          "attribute": {
            "type": "string"
          },
          "operator": {
            "enum": [
              "Equals",
              "NotEquals",
              "Contains",
              "NotContains",
              "GreaterThan",
              "LessThan",
              "GreaterThanOrEqual",
              "LessThanOrEqual",
              "In",
              "NotIn",
              "MatchesRegex",
              "StartsWith",
              "EndsWith",
              "Before",
              "After",
              "SemverEquals",
              "SemverGreaterThan",
              "SemverGreaterThanOrEqual",
              "SemverLessThan",
              "SemverLessThanOrEqual"
            ],
            "type": "string",
            "description": "Allowed values: Equals, NotEquals, Contains, NotContains, GreaterThan, LessThan, GreaterThanOrEqual, LessThanOrEqual, In, NotIn, MatchesRegex, StartsWith, EndsWith, Before, After, SemverEquals, SemverGreaterThan, SemverGreaterThanOrEqual, SemverLessThan, SemverLessThanOrEqual."
          },
          "values": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "negate": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "description": "Request-side condition, symmetric with PublicConditionResponse."
      },
      "PublicConditionResponse": {
        "required": [
          "attribute",
          "operator",
          "values",
          "negate"
        ],
        "type": "object",
        "properties": {
          "attribute": {
            "type": "string"
          },
          "operator": {
            "enum": [
              "Equals",
              "NotEquals",
              "Contains",
              "NotContains",
              "GreaterThan",
              "LessThan",
              "GreaterThanOrEqual",
              "LessThanOrEqual",
              "In",
              "NotIn",
              "MatchesRegex",
              "StartsWith",
              "EndsWith",
              "Before",
              "After",
              "SemverEquals",
              "SemverGreaterThan",
              "SemverGreaterThanOrEqual",
              "SemverLessThan",
              "SemverLessThanOrEqual"
            ],
            "type": "string",
            "description": "Allowed values: Equals, NotEquals, Contains, NotContains, GreaterThan, LessThan, GreaterThanOrEqual, LessThanOrEqual, In, NotIn, MatchesRegex, StartsWith, EndsWith, Before, After, SemverEquals, SemverGreaterThan, SemverGreaterThanOrEqual, SemverLessThan, SemverLessThanOrEqual."
          },
          "values": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "negate": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "description": "A single condition within a PublicConditionGroupResponse. Maps 1:1 onto\nConditionDto. Operator is a bare wire string naming one of the\n`OperatorType` members (e.g. `\"Equals\"`, `\"In\"`)."
      },
      "PublicConfiguredWeight": {
        "required": [
          "variationKey",
          "weight"
        ],
        "type": "object",
        "properties": {
          "variationKey": {
            "type": "string",
            "description": "The variation's key."
          },
          "name": {
            "type": "string",
            "description": "The variation's name, or null when the key no longer matches one of the flag's variations.",
            "nullable": true
          },
          "weight": {
            "type": "integer",
            "description": "Percent of the rule's traffic.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "A variation's configured share of a rollout rule."
      },
      "PublicCopyFlagConfigRequest": {
        "required": [
          "source"
        ],
        "type": "object",
        "properties": {
          "source": {
            "type": "string"
          },
          "includeState": {
            "type": "boolean",
            "nullable": true
          },
          "dryRun": {
            "type": "boolean",
            "nullable": true
          },
          "expectedSourceETag": {
            "type": "string",
            "nullable": true
          },
          "expectedTargetETag": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for `POST .../flags/{flag}/environments/{env}/copy`. `source` is the environment to copy\nfrom (key or id) and is required; the rest are optional. `dryRun: true` previews without writing and ignores\nthe ETags."
      },
      "PublicCopyResult": {
        "required": [
          "changed",
          "changedSections",
          "after",
          "sourceETag",
          "targetETag",
          "warnings"
        ],
        "type": "object",
        "properties": {
          "changed": {
            "type": "boolean"
          },
          "changedSections": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "before": {
            "$ref": "#/components/schemas/PublicEnvironmentSnapshot"
          },
          "after": {
            "$ref": "#/components/schemas/PublicEnvironmentSnapshot"
          },
          "sourceETag": {
            "type": "string"
          },
          "targetETag": {
            "type": "string"
          },
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicCopyWarning"
            }
          }
        },
        "additionalProperties": false,
        "description": "Response of `POST .../flags/{flag}/environments/{env}/copy`, for a dry run and an apply alike.\n`targetETag` is the target's tag after an apply and before it on a dry run, so a dry run's tags are\nwhat the apply sends back as `expectedSourceETag` / `expectedTargetETag`."
      },
      "PublicCopyWarning": {
        "required": [
          "code",
          "message"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "description": "A non-blocking note about a copy."
      },
      "PublicCreateEnvironmentRequest": {
        "required": [
          "key",
          "name"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "The environment's key."
          },
          "name": {
            "type": "string",
            "description": "The environment's display name."
          },
          "color": {
            "type": "string",
            "description": "The environment's display color, or null.",
            "nullable": true
          },
          "sortOrder": {
            "type": "integer",
            "description": "Position among the project's environments.",
            "format": "int32"
          },
          "requireChangeReason": {
            "type": "boolean",
            "description": "Require a change reason (X-Intent-Reason) on every change to flags in this environment. Business plan and above.",
            "nullable": true
          },
          "requireConfirmation": {
            "type": "boolean",
            "description": "Ask dashboard users to type the environment key before a change lands. Dashboard only; not enforced by the API.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for `POST /api/v1/orgs/{org}/projects/{project}/environments`. Named\ndistinctly from the dashboard's own `CreateEnvironmentRequest`\n— both controllers share one Swagger document (see `Program.cs`'s `AddSwaggerGen``DocInclusionPredicate` override), and Swashbuckle's default schemaId is the bare type\nname, so an identical name in either namespace throws a schemaId collision at\n`--export-openapi` time.",
        "example": {
          "key": "production",
          "name": "Production",
          "color": "#16A34A",
          "sortOrder": 2
        }
      },
      "PublicCreateFeatureFlagRequest": {
        "required": [
          "key",
          "name",
          "type"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "enum": [
              "Boolean",
              "String",
              "Number",
              "Json"
            ],
            "type": "string",
            "description": "Allowed values: Boolean, String, Number, Json."
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "initialVariations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicCreateVariationDto"
            },
            "nullable": true
          },
          "clientSideVisible": {
            "type": "boolean"
          },
          "expiresAtUtc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "ownerEmail": {
            "type": "string",
            "nullable": true
          },
          "isPermanent": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "description": "Request body for `POST /api/v1/orgs/{org}/projects/{project}/flags`. Named distinctly\nfrom the dashboard's own `CreateFeatureFlagRequest`\n— see PublicCreateEnvironmentRequest for the\nschemaId-collision rationale (both controllers share one Swagger document). Type\nis passed through verbatim to Type, which itself takes a\nbare string (Boolean/String/Number/Json) rather than the domain enum — invalid values surface\nas the handler's own validation failure, not a controller-level 400. ExpiresAtUtc is\noptional and advisory; a bare date (`2026-12-01`) means the end of that day in UTC, and a full\ntimestamp is stored exactly. It must be in the future and requires the flag-expiration feature\n(400 `EXPIRY_IN_PAST` / `FEATURE_NOT_ENABLED`). OwnerEmail optionally names\nthe owner (an active member, matched case-insensitively; requires a plan that includes flag owners,\nPro and above — 400 `OWNER_NOT_MEMBER` / `PLAN_FEATURE_UNAVAILABLE`). Omitted, the owner is the caller when\nthe caller is a member, so a service token creates an unowned flag. IsPermanent marks\nthe flag permanent (a kill switch, ops toggle or entitlement that is meant to stay; never reported for\ncleanup). It requires the flag-permanence feature and can't be combined with ExpiresAtUtc\n(400 `FEATURE_NOT_ENABLED` / `PERMANENT_FLAG_HAS_EXPIRY`).",
        "example": {
          "key": "new-checkout-flow",
          "name": "New Checkout Flow",
          "type": "Boolean",
          "description": "Gates the redesigned checkout experience.",
          "tags": [
            "checkout",
            "q3-launch"
          ],
          "initialVariations": [
            {
              "key": "true",
              "name": "Enabled",
              "value": "true",
              "description": "Serve the new checkout."
            },
            {
              "key": "false",
              "name": "Disabled",
              "value": "false",
              "description": "Serve the legacy checkout."
            }
          ],
          "clientSideVisible": false
        }
      },
      "PublicCreateFlagTriggerRequest": {
        "required": [
          "name",
          "action"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "action": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for `POST .../triggers`. Action is `\"Enable\"` or\n`\"Disable\"`, parsed against the names only. Named apart from the dashboard's\n`CreateFlagTriggerRequest`: both controllers share one Swagger document."
      },
      "PublicCreateProjectRequest": {
        "required": [
          "key",
          "name"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for `POST /api/v1/orgs/{org}/projects`. Named distinctly from the\ndashboard's own `CreateProjectRequest` — both\ncontrollers share one Swagger document (see `Program.cs`'s `AddSwaggerGen``DocInclusionPredicate` override), and Swashbuckle's default schemaId is the bare type\nname, so an identical name in either namespace throws a schemaId collision at\n`--export-openapi` time.",
        "example": {
          "key": "checkout",
          "name": "Checkout",
          "description": "Checkout and payments surfaces."
        }
      },
      "PublicCreateSdkKeyRequest": {
        "required": [
          "name",
          "type"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "enum": [
              "ClientSide",
              "ServerSide"
            ],
            "type": "string",
            "description": "Allowed values: ClientSide, ServerSide."
          }
        },
        "additionalProperties": false,
        "description": "Request body for `POST /api/v1/orgs/{org}/projects/{project}/environments/{env}/sdk-keys`.\nType is a bare string (\"ClientSide\" or \"ServerSide\") — the controller parses it\nagainst a NAME allowlist (not a bare TryParse``1(ReadOnlySpan{Char},Boolean,``0@), which would\nsilently accept a numeric string like `\"0\"`) before dispatching. Named distinctly from\nthe dashboard's own `CreateSdkKeyRequest` — both\ncontrollers share one Swagger document, and an identical type name in either namespace throws\na schemaId collision at `--export-openapi` time.",
        "example": {
          "name": "Production server key",
          "description": "Used by the checkout backend.",
          "type": "ServerSide"
        }
      },
      "PublicCreateSdkKeyResponse": {
        "required": [
          "id",
          "key",
          "lastFourCharacters",
          "type",
          "name",
          "createdAt",
          "warning"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "key": {
            "type": "string"
          },
          "lastFourCharacters": {
            "type": "string"
          },
          "type": {
            "enum": [
              "ClientSide",
              "ServerSide"
            ],
            "type": "string",
            "description": "Allowed values: ClientSide, ServerSide."
          },
          "name": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "warning": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "description": "Response body for a successful `POST .../sdk-keys`. The ONLY place the plaintext\nKey is ever returned — PublicSdkKeyResponse (list/get) carries just\n`LastFourCharacters`. Built directly from CreateSdkKeyResult rather than a\nre-fetch (unlike `FeatureFlagsController.Create`'s re-fetch pattern) because the\nplaintext key only ever exists on the create result — a subsequent\nGetSdkKeyQuery can't recover it.",
        "example": {
          "id": "0197b6a2-4d5e-7f6a-9b7c-8d9e0f1a2b3c",
          "key": "ff_server_9f8e7d6c5b4a39281706f5e4d3c2b1a0",
          "lastFourCharacters": "b1a0",
          "type": "ServerSide",
          "name": "Production server key",
          "createdAt": "2026-06-01T12:00:00Z",
          "warning": "Store this key securely — it will not be shown again."
        }
      },
      "PublicCreateSegmentRequest": {
        "required": [
          "key",
          "name",
          "conditions"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "conditions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicSegmentConditionDto"
            }
          }
        },
        "additionalProperties": false,
        "description": "Request body for `POST /api/v1/orgs/{org}/projects/{project}/segments`. Named distinctly\nfrom the dashboard's own `CreateUserSegmentRequest` — see\nPublicCreateEnvironmentRequest for the schemaId-collision rationale (both\ncontrollers share one Swagger document).",
        "example": {
          "key": "beta-testers",
          "name": "Beta Testers",
          "description": "Users enrolled in the beta program.",
          "conditions": [
            {
              "attribute": "email",
              "operator": "EndsWith",
              "values": [
                "@acme.com"
              ],
              "negate": false
            }
          ]
        }
      },
      "PublicCreateTargetingRuleRequest": {
        "required": [
          "conditionGroups"
        ],
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "nullable": true
          },
          "variationId": {
            "type": "string",
            "format": "uuid"
          },
          "rolloutPercentage": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "userSegmentId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "conditionGroups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicConditionGroupRequest"
            }
          },
          "bucketBy": {
            "type": "string",
            "description": "Context attribute the rollout hashes on (default `user_id`; `userId` is accepted as an alias). A context without it skips this rule, even at 100%. Changing it reshuffles who is in the rollout. A fixed rule (no `rolloutPercentage`) never hashes and always stores `user_id`. When omitted on `PUT .../targeting`, a rollout keeps the value of the existing rollout it edits: the existing rule with the same targeting, told apart from others with that targeting by its variation, then its description, then its position. Any other rule gets `user_id`. The request is refused with 400 until it sends `bucketBy` for a rollout whose edited rule it can't tell when the answer changes its attribute: the rollout shares only its targeting with several rules that bucket differently, or it matches no existing rule while the request removes a rollout bucketed by another attribute. On create, omitting it gives `user_id`.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for `POST .../rules`. The Application-side\n`CreateTargetingRuleDto`/`CreateConditionGroupDto`/`CreateConditionDto` all take\ntheir `Operator` as a bare string, re-parsed CASE-SENSITIVELY inside\n`CreateTargetingRuleCommandHandler` — `FlagTargetingController`'s mapping helpers\nvalidate every operator against the enum's member-name allowlist AND canonicalize the casing\n(e.g. `\"in\"` → `\"In\"`) before building the command DTO, so a valid\ncase-insensitive match never trips the handler's strict re-parse.",
        "example": {
          "description": "North American users get the new flow at 25%.",
          "variationId": "0197b6a0-6a1b-7d4f-8c2e-2f3a4b5c6d7e",
          "rolloutPercentage": 25,
          "bucketBy": "user_id",
          "conditionGroups": [
            {
              "operator": "And",
              "conditions": [
                {
                  "attribute": "country",
                  "operator": "In",
                  "values": [
                    "US",
                    "CA"
                  ],
                  "negate": false
                }
              ]
            }
          ]
        }
      },
      "PublicCreateVariationDto": {
        "required": [
          "key",
          "name",
          "value"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A variation supplied at flag-creation time. Maps 1:1 onto\nCreateVariationDto."
      },
      "PublicCreateWebhookSubscriptionRequest": {
        "required": [
          "name",
          "url",
          "provider"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "provider": {
            "enum": [
              "GenericHttp",
              "Slack",
              "Datadog",
              "Grafana"
            ],
            "type": "string",
            "description": "Allowed values: GenericHttp, Slack, Datadog, Grafana."
          },
          "eventTypes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "projectIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          },
          "environmentIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          },
          "credential": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Creates a webhook subscription. `provider` is `GenericHttp`, `Slack` (an incoming\nwebhook url), `Datadog` (your site's Events API url) or `Grafana` (your Grafana's\n`/api/annotations` url). Datadog and Grafana also need `credential`: a Datadog API key\nor a Grafana service account token. It is stored encrypted and never returned. Omit `eventTypes`,\n`projectIds` or `environmentIds` (or send an empty list) to receive every event,\nproject or environment. A token restricted to specific projects must list at least one project,\nall of them within its allowlist.",
        "example": {
          "name": "Checkout flag changes to deploy pipeline",
          "url": "https://hooks.acme.example/featureflip",
          "provider": "GenericHttp",
          "eventTypes": [
            "flag.toggled",
            "flag.updated"
          ],
          "projectIds": [
            "0197b69f-1a2b-7c3d-8e4f-5a6b7c8d9e0f"
          ],
          "environmentIds": [
            "0197b69f-2b3c-7d4e-9f5a-6b7c8d9e0f1a"
          ]
        }
      },
      "PublicCreateWebhookSubscriptionResponse": {
        "required": [
          "id",
          "secret",
          "warning"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "secret": {
            "type": "string"
          },
          "warning": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "description": "The created subscription's id and its signing secret. The secret is shown only here.",
        "example": {
          "id": "0197b6a4-6f7a-7b8c-9d0e-1f2a3b4c5d6e",
          "secret": "whsec_q2Vb8XJ1s0mYpZ4tK7wRr3uN9cL6aD5eF1gH2iJ3kL4=",
          "warning": "Store this secret securely — it will not be shown again."
        }
      },
      "PublicDefaultFlagLifetimeImpact": {
        "required": [
          "newlyPastExpiry",
          "noLongerPastExpiry"
        ],
        "type": "object",
        "properties": {
          "newlyPastExpiry": {
            "type": "integer",
            "format": "int32"
          },
          "noLongerPastExpiry": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Response of `GET .../default-flag-lifetime/impact`: how many temporary flags with no expiry\ndate of their own would newly be past expiry, and how many would stop being past it."
      },
      "PublicEnvironmentResponse": {
        "required": [
          "id",
          "key",
          "name",
          "sortOrder",
          "requireChangeReason",
          "requireConfirmation"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The environment's id.",
            "format": "uuid"
          },
          "key": {
            "type": "string",
            "description": "The environment's key."
          },
          "name": {
            "type": "string",
            "description": "The environment's display name."
          },
          "color": {
            "type": "string",
            "description": "The environment's display color, or null.",
            "nullable": true
          },
          "sortOrder": {
            "type": "integer",
            "description": "Position among the project's environments.",
            "format": "int32"
          },
          "requireChangeReason": {
            "type": "boolean",
            "description": "Require a change reason (X-Intent-Reason) on every change to flags in this environment. Business plan and above."
          },
          "requireConfirmation": {
            "type": "boolean",
            "description": "Ask dashboard users to type the environment key before a change lands. Dashboard only; not enforced by the API."
          },
          "_actions": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/ActionCapability"
            },
            "description": "Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it."
          }
        },
        "additionalProperties": false,
        "description": "Public representation of an environment, returned by\n`GET /api/v1/orgs/{org}/projects/{project}/environments` (list),\n`GET .../environments/{env}` (detail), and the body of a successful create/update. Drops\ninternal fields (e.g. `ProjectId` is implicit in the route) — mirrors\n`ProjectResponse`'s minimal shape. Named `PublicEnvironmentResponse` rather than\n`EnvironmentResponse` (unlike the sibling `ProjectResponse`, which didn't collide)\nbecause the dashboard already has its own\n`EnvironmentResponse` — see\nPublicCreateEnvironmentRequest for the schemaId-collision rationale.",
        "example": {
          "id": "0197b69f-2b3c-7d4e-9f5a-6b7c8d9e0f1a",
          "key": "production",
          "name": "Production",
          "color": "#16A34A",
          "sortOrder": 2,
          "requireChangeReason": false,
          "requireConfirmation": false
        }
      },
      "PublicEnvironmentResponsePagedResult": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicEnvironmentResponse"
            }
          },
          "next_cursor": {
            "type": "string",
            "nullable": true
          },
          "_actions": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/ActionCapability"
            },
            "description": "Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it."
          }
        },
        "additionalProperties": false,
        "description": "A page of results plus an opaque cursor for the next page, or null when this is the last\npage. Wire keys are frozen: `items` (already lowercase under the camelCase policy) and\n`next_cursor` (pinned explicitly — the policy alone would emit `nextCursor`)."
      },
      "PublicEnvironmentSideSummary": {
        "required": [
          "isEnabled",
          "ruleCount",
          "prerequisiteCount"
        ],
        "type": "object",
        "properties": {
          "isEnabled": {
            "type": "boolean"
          },
          "ruleCount": {
            "type": "integer",
            "format": "int32"
          },
          "prerequisiteCount": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "One side's headline numbers in a project-level comparison row."
      },
      "PublicEnvironmentSnapshot": {
        "required": [
          "isEnabled",
          "defaultVariation",
          "strategy",
          "rules",
          "prerequisites"
        ],
        "type": "object",
        "properties": {
          "isEnabled": {
            "type": "boolean"
          },
          "defaultVariation": {
            "$ref": "#/components/schemas/PublicKeyedRef"
          },
          "strategy": {
            "type": "string"
          },
          "rules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicSnapshotRule"
            }
          },
          "prerequisites": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicPrerequisiteDto"
            }
          }
        },
        "additionalProperties": false,
        "description": "A flag's configuration in one environment, as a comparison or copy result reports it."
      },
      "PublicEvaluationSource": {
        "required": [
          "source",
          "ruleExists",
          "count",
          "share",
          "variations"
        ],
        "type": "object",
        "properties": {
          "source": {
            "enum": [
              "rule",
              "fallthrough",
              "off",
              "prerequisite",
              "error",
              "notFound",
              "unknown"
            ],
            "type": "string",
            "description": "One of rule, fallthrough, off, prerequisite, error, notFound or unknown (an SDK that reports no reason, or evaluations recorded before sources were). Allowed values: rule, fallthrough, off, prerequisite, error, notFound, unknown."
          },
          "ruleId": {
            "type": "string",
            "description": "For a rule, its id (rules have no key). Null otherwise, or when the SDK didn't say which rule.",
            "format": "uuid",
            "nullable": true
          },
          "ruleLabel": {
            "type": "string",
            "description": "For a live rule, its description or a generated label. Null otherwise.",
            "nullable": true
          },
          "ruleExists": {
            "type": "boolean",
            "description": "False when the rule is no longer in the environment's targeting."
          },
          "count": {
            "type": "integer",
            "description": "Evaluations this source served.",
            "format": "int64"
          },
          "share": {
            "type": "number",
            "description": "Count as a fraction (0 to 1) of all sources' counts combined.",
            "format": "double"
          },
          "variations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicEvaluationVariation"
            },
            "description": "What this source served, with shares of this source's count."
          },
          "rollout": {
            "$ref": "#/components/schemas/PublicRolloutCheck"
          }
        },
        "additionalProperties": false,
        "description": "The evaluations one part of the targeting served."
      },
      "PublicEvaluationVariation": {
        "required": [
          "exists",
          "count",
          "share"
        ],
        "type": "object",
        "properties": {
          "variationKey": {
            "type": "string",
            "description": "The variation served, or null for evaluations recorded without one.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "The variation's name, or null when the key no longer matches one of the flag's variations.",
            "nullable": true
          },
          "exists": {
            "type": "boolean",
            "description": "False when the key no longer matches one of the flag's variations."
          },
          "count": {
            "type": "integer",
            "description": "Evaluations that served this variation.",
            "format": "int64"
          },
          "share": {
            "type": "number",
            "description": "Count as a fraction (0 to 1) of the parent total: the window's total, or for a source's variations that source's count. 0 when the parent total is 0.",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "One variation's evaluations."
      },
      "PublicFlagComparison": {
        "required": [
          "flagKey",
          "differences"
        ],
        "type": "object",
        "properties": {
          "flagKey": {
            "type": "string"
          },
          "differences": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "base": {
            "$ref": "#/components/schemas/PublicFlagComparisonSide"
          },
          "other": {
            "$ref": "#/components/schemas/PublicFlagComparisonSide"
          }
        },
        "additionalProperties": false,
        "description": "Response of `GET .../flags/{flag}/compare`."
      },
      "PublicFlagComparisonRow": {
        "required": [
          "flagKey",
          "flagName",
          "tags",
          "status",
          "differences"
        ],
        "type": "object",
        "properties": {
          "flagKey": {
            "type": "string"
          },
          "flagName": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "ownerUserId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "status": {
            "type": "string"
          },
          "differences": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "base": {
            "$ref": "#/components/schemas/PublicEnvironmentSideSummary"
          },
          "other": {
            "$ref": "#/components/schemas/PublicEnvironmentSideSummary"
          }
        },
        "additionalProperties": false,
        "description": "One flag in `GET .../projects/{project}/compare`. `differences` lists the sections that differ\n(`state`, `defaultVariation`, `strategy`, `rules`, `prerequisites`). A side is null when\nthe flag has no configuration in that environment."
      },
      "PublicFlagComparisonRowPagedResult": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicFlagComparisonRow"
            }
          },
          "next_cursor": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A page of results plus an opaque cursor for the next page, or null when this is the last\npage. Wire keys are frozen: `items` (already lowercase under the camelCase policy) and\n`next_cursor` (pinned explicitly — the policy alone would emit `nextCursor`)."
      },
      "PublicFlagComparisonSide": {
        "required": [
          "config",
          "targeting",
          "snapshot",
          "ruleHasMatchInOther"
        ],
        "type": "object",
        "properties": {
          "config": {
            "$ref": "#/components/schemas/PublicFlagEnvConfigResponse"
          },
          "targeting": {
            "$ref": "#/components/schemas/PublicTargetingConfigResponse"
          },
          "snapshot": {
            "$ref": "#/components/schemas/PublicEnvironmentSnapshot"
          },
          "ruleHasMatchInOther": {
            "type": "array",
            "items": {
              "type": "boolean"
            },
            "description": "Per rule in evaluation order: whether the other environment has an equal rule."
          }
        },
        "additionalProperties": false,
        "description": "One environment's side of a per-flag comparison."
      },
      "PublicFlagEnvConfigResponse": {
        "required": [
          "environmentId",
          "environmentKey",
          "isEnabled",
          "defaultVariationId",
          "strategy",
          "prerequisites"
        ],
        "type": "object",
        "properties": {
          "environmentId": {
            "type": "string",
            "format": "uuid"
          },
          "environmentKey": {
            "type": "string"
          },
          "isEnabled": {
            "type": "boolean"
          },
          "defaultVariationId": {
            "type": "string",
            "format": "uuid"
          },
          "strategy": {
            "enum": [
              "SingleVariation",
              "PercentageRollout",
              "TargetedRollout"
            ],
            "type": "string",
            "description": "Allowed values: SingleVariation, PercentageRollout, TargetedRollout."
          },
          "prerequisites": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicPrerequisiteDto"
            }
          },
          "_actions": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/ActionCapability"
            },
            "description": "Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it."
          }
        },
        "additionalProperties": false,
        "description": "Public representation of a flag's config within a single environment, returned by\n`GET .../flags/{flag}/environments` and `GET .../flags/{flag}/environments/{env}`.\nDrops internal/dashboard-only fields present on FlagEnvironmentConfigurationDto\n— Id (an internal row id, not part of the public\ncontract; EnvironmentId is the addressable key), `FeatureFlagId` (implicit\nin the route), the environment's name/color/sort-order (dashboard display fields — the public\ncontract only needs the addressable EnvironmentKey), and `Staleness` (an\ninternal analytics signal).",
        "example": {
          "environmentId": "0197b69f-2b3c-7d4e-9f5a-6b7c8d9e0f1a",
          "environmentKey": "production",
          "isEnabled": true,
          "defaultVariationId": "0197b6a0-6a1b-7d4f-8c2e-3a4b5c6d7e8f",
          "strategy": "PercentageRollout",
          "prerequisites": [
            {
              "prerequisiteFlagKey": "checkout-api-enabled",
              "expectedVariationKey": "true"
            }
          ]
        }
      },
      "PublicFlagEvaluationsResponse": {
        "required": [
          "environmentKey",
          "days",
          "fromUtc",
          "toUtc",
          "totalCount",
          "variations",
          "sources"
        ],
        "type": "object",
        "properties": {
          "environmentKey": {
            "type": "string",
            "description": "The environment's key."
          },
          "days": {
            "type": "integer",
            "description": "The window requested: 7, 30 or 90.",
            "format": "int32"
          },
          "fromUtc": {
            "type": "string",
            "description": "Start of the window: UTC midnight `days - 1` days ago, or the flag's creation day if later.",
            "format": "date-time"
          },
          "toUtc": {
            "type": "string",
            "description": "When the counts were read.",
            "format": "date-time"
          },
          "totalCount": {
            "type": "integer",
            "description": "Evaluations in the window. Evaluation counts, not unique users.",
            "format": "int64"
          },
          "lastEvaluatedAtUtc": {
            "type": "string",
            "description": "The last reported evaluation, or null if none was reported.",
            "format": "date-time",
            "nullable": true
          },
          "variations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicEvaluationVariation"
            },
            "description": "Evaluations per variation over the window."
          },
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicEvaluationSource"
            },
            "description": "Evaluations per part of the targeting that served them: live rules in evaluation order, then deleted rules, then fallthrough, off, prerequisite, error, notFound and unknown. A live percentage-rollout rule is always listed, with a count of 0 and no variations when it served nothing in the window, so its rollout check (and rollout.unreached) has a row."
          }
        },
        "additionalProperties": false,
        "description": "What a flag served in one environment over the window, returned by\n`GET .../flags/{flag}/environments/{env}/evaluations` (#4225). These are evaluation\ncounts, not unique users. They come from SDK-reported events, so an environment whose SDKs\nreport none reads zero: no evaluations reported, not necessarily no traffic. The public\ncounterpart of FlagEvaluationAnalyticsDto, keyed by environment key instead of\nid and without the dashboard's daily series.",
        "example": {
          "environmentKey": "production",
          "days": 7,
          "fromUtc": "2026-06-14T00:00:00Z",
          "toUtc": "2026-06-20T09:15:00Z",
          "totalCount": 10000,
          "lastEvaluatedAtUtc": "2026-06-20T09:15:00Z",
          "variations": [
            {
              "variationKey": "true",
              "name": "On",
              "exists": true,
              "count": 4080,
              "share": 0.408
            },
            {
              "variationKey": "false",
              "name": "Off",
              "exists": true,
              "count": 5920,
              "share": 0.592
            }
          ],
          "sources": [
            {
              "source": "rule",
              "ruleId": "0197b6a3-5e6f-7a7b-8c8d-9e0f1a2b3c4d",
              "ruleLabel": "Beta users 50/50",
              "ruleExists": true,
              "count": 8000,
              "share": 0.8,
              "variations": [
                {
                  "variationKey": "true",
                  "name": "On",
                  "exists": true,
                  "count": 4080,
                  "share": 0.51
                },
                {
                  "variationKey": "false",
                  "name": "Off",
                  "exists": true,
                  "count": 3920,
                  "share": 0.49
                }
              ],
              "rollout": {
                "configured": [
                  {
                    "variationKey": "true",
                    "name": "On",
                    "weight": 50
                  },
                  {
                    "variationKey": "false",
                    "name": "Off",
                    "weight": 50
                  }
                ],
                "evaluable": true,
                "pValue": 0.074,
                "flagged": false,
                "bucketBy": "user_id"
              }
            },
            {
              "source": "fallthrough",
              "ruleExists": false,
              "count": 2000,
              "share": 0.2,
              "variations": [
                {
                  "variationKey": "false",
                  "name": "Off",
                  "exists": true,
                  "count": 2000,
                  "share": 1
                }
              ]
            }
          ]
        }
      },
      "PublicFlagListItem": {
        "required": [
          "id",
          "key",
          "name",
          "type",
          "isArchived",
          "clientSideVisible",
          "tags",
          "createdAt",
          "updatedAt",
          "isPermanent"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "enum": [
              "Boolean",
              "String",
              "Number",
              "Json"
            ],
            "type": "string",
            "description": "Allowed values: Boolean, String, Number, Json."
          },
          "isArchived": {
            "type": "boolean"
          },
          "clientSideVisible": {
            "type": "boolean"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAtUtc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "owner": {
            "$ref": "#/components/schemas/PublicFlagOwner"
          },
          "removalPrUrl": {
            "type": "string",
            "nullable": true
          },
          "isPermanent": {
            "type": "boolean"
          },
          "effectiveExpiresAtUtc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "expirySource": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Public list-item representation of a feature flag, returned by\n`GET .../flags`. Narrower than PublicFlagResponse — drops\nVariations (a summary-only shape upstream) and\nStaleness, matching the \"list is narrower than detail\"\nsplit already present on the Application-layer DTOs.\nEffectiveExpiresAtUtc is when the flag counts as past expiry, from its own ExpiresAtUtc\nor its project's default lifetime; ExpirySource says which (`explicit` / `project-default`),\nboth null when neither applies."
      },
      "PublicFlagListItemPagedResult": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicFlagListItem"
            }
          },
          "next_cursor": {
            "type": "string",
            "nullable": true
          },
          "_actions": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/ActionCapability"
            },
            "description": "Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it."
          }
        },
        "additionalProperties": false,
        "description": "A page of results plus an opaque cursor for the next page, or null when this is the last\npage. Wire keys are frozen: `items` (already lowercase under the camelCase policy) and\n`next_cursor` (pinned explicitly — the policy alone would emit `nextCursor`).",
        "example": {
          "items": [
            {
              "id": "0197b6a0-5f2a-7c3e-9b4d-1e2f3a4b5c6d",
              "key": "new-checkout-flow",
              "name": "New Checkout Flow",
              "type": "Boolean",
              "isArchived": false,
              "clientSideVisible": false,
              "tags": [
                "checkout",
                "q3-launch"
              ],
              "createdAt": "2026-06-01T12:00:00Z",
              "updatedAt": "2026-06-15T08:30:00Z",
              "isPermanent": false
            }
          ],
          "next_cursor": "MjA"
        }
      },
      "PublicFlagOwner": {
        "required": [
          "id",
          "email",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "description": "A flag's owner as returned on flag reads. Null means the flag is unowned."
      },
      "PublicFlagRemovalCandidate": {
        "required": [
          "key",
          "reason",
          "treatment",
          "status",
          "blockedBy"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "treatment": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "blockedBy": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false,
        "description": "One dead flag the Featureflip Flag Cleanup Action should remove, returned by\n`GET .../flags/removal-candidates`. `Treatment` is the kill decision: true → keep the\nflag's on-branch, false → keep the off-branch. `Status` is the flag's staleness tier\n(`\"Stale\"` or `\"Dead\"`, never `\"Active\"`) — lets a caller distinguish the two when\n`?staleness=stale` widens the response to include both tiers. This is the ONLY public\nprojection of staleness — PublicFlagResponse and PublicFlagListItem\nstill omit it by design. `BlockedBy` names the live flags that still list this one as a\nprerequisite, sorted by key; while it is non-empty the flag cannot be archived\n(`FLAG_HAS_DEPENDENTS`), so a caller should remove those dependents first."
      },
      "PublicFlagRemovalCandidatePagedResult": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicFlagRemovalCandidate"
            }
          },
          "next_cursor": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A page of results plus an opaque cursor for the next page, or null when this is the last\npage. Wire keys are frozen: `items` (already lowercase under the camelCase policy) and\n`next_cursor` (pinned explicitly — the policy alone would emit `nextCursor`)."
      },
      "PublicFlagResponse": {
        "required": [
          "id",
          "key",
          "name",
          "type",
          "isArchived",
          "clientSideVisible",
          "tags",
          "variations",
          "createdAt",
          "updatedAt",
          "isPermanent"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "enum": [
              "Boolean",
              "String",
              "Number",
              "Json"
            ],
            "type": "string",
            "description": "Allowed values: Boolean, String, Number, Json."
          },
          "isArchived": {
            "type": "boolean"
          },
          "clientSideVisible": {
            "type": "boolean"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "variations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicVariationResponse"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAtUtc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "owner": {
            "$ref": "#/components/schemas/PublicFlagOwner"
          },
          "removalPrUrl": {
            "type": "string",
            "nullable": true
          },
          "isPermanent": {
            "type": "boolean"
          },
          "effectiveExpiresAtUtc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "expirySource": {
            "type": "string",
            "nullable": true
          },
          "_actions": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/ActionCapability"
            },
            "description": "Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it."
          }
        },
        "additionalProperties": false,
        "description": "Public detail representation of a feature flag, returned by\n`GET .../flags/{flag}` and the body of a successful create. Drops internal/dashboard-only\nfields present on FeatureFlagDto — notably `ProjectId` (implicit in the\nroute) and `Staleness` (an internal analytics signal, not part of the public contract).\nEffectiveExpiresAtUtc is when the flag counts as past expiry, from its own ExpiresAtUtc\nor its project's default lifetime; ExpirySource says which (`explicit` / `project-default`),\nboth null when neither applies.",
        "example": {
          "id": "0197b6a0-5f2a-7c3e-9b4d-1e2f3a4b5c6d",
          "key": "new-checkout-flow",
          "name": "New Checkout Flow",
          "description": "Gates the redesigned checkout experience.",
          "type": "Boolean",
          "isArchived": false,
          "clientSideVisible": false,
          "tags": [
            "checkout",
            "q3-launch"
          ],
          "variations": [
            {
              "id": "0197b6a0-6a1b-7d4f-8c2e-2f3a4b5c6d7e",
              "key": "true",
              "name": "Enabled",
              "value": "true",
              "description": "Serve the new checkout."
            },
            {
              "id": "0197b6a0-6a1b-7d4f-8c2e-3a4b5c6d7e8f",
              "key": "false",
              "name": "Disabled",
              "value": "false",
              "description": "Serve the legacy checkout."
            }
          ],
          "createdAt": "2026-06-01T12:00:00Z",
          "updatedAt": "2026-06-15T08:30:00Z",
          "isPermanent": false
        }
      },
      "PublicFlagTriggerResponse": {
        "required": [
          "id",
          "name",
          "action",
          "enabled",
          "secretLastFour",
          "createdAt",
          "updatedAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "action": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "secretLastFour": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastFiredAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A flag trigger (#4651) as `/api/v1` returns it. Carries only the secret's last four characters:\nthe URL is returned once, by PublicFlagTriggerWithUrlResponse. Flag and environment are\nimplicit in the route."
      },
      "PublicFlagTriggerResponsePagedResult": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicFlagTriggerResponse"
            }
          },
          "next_cursor": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A page of results plus an opaque cursor for the next page, or null when this is the last\npage. Wire keys are frozen: `items` (already lowercase under the camelCase policy) and\n`next_cursor` (pinned explicitly — the policy alone would emit `nextCursor`)."
      },
      "PublicFlagTriggerWithUrlResponse": {
        "required": [
          "trigger",
          "url",
          "endpoint",
          "secret",
          "warning"
        ],
        "type": "object",
        "properties": {
          "trigger": {
            "$ref": "#/components/schemas/PublicFlagTriggerResponse"
          },
          "url": {
            "type": "string"
          },
          "endpoint": {
            "type": "string"
          },
          "secret": {
            "type": "string"
          },
          "warning": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "description": "The only response that carries a trigger's secret: create and rotate. Fire it by POSTing to\nUrl, or to Endpoint with `Authorization: Bearer {Secret}`, which keeps\nthe secret out of the URL. Anyone holding either can fire the trigger, so store it as a secret in the\nmonitoring tool."
      },
      "PublicKeyedRef": {
        "required": [
          "id"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "key": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "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."
      },
      "PublicPlanLimit": {
        "required": [
          "resource",
          "plan",
          "max"
        ],
        "type": "object",
        "properties": {
          "resource": {
            "type": "string"
          },
          "plan": {
            "type": "string"
          },
          "max": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "The cap behind a `plan_limit_reached` error. `resource` is the capped collection\n(`projects`, `environments`, `flags`, `webhooks`, `members`);\n`plan` is the plan's wire name, as `GET /api/v1/orgs/{org}` returns it; `max` is\nthe cap. The environment and flag caps are per project."
      },
      "PublicPrerequisiteDto": {
        "required": [
          "prerequisiteFlagKey",
          "expectedVariationKey"
        ],
        "type": "object",
        "properties": {
          "prerequisiteFlagKey": {
            "type": "string"
          },
          "expectedVariationKey": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "description": "A single prerequisite entry on a flag's per-environment config. Maps 1:1 onto\nPrerequisiteDto (read side) and PrerequisiteInput (write side)."
      },
      "PublicPutTargetingRequest": {
        "type": "object",
        "properties": {
          "rules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicCreateTargetingRuleRequest"
            },
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for `PUT .../targeting` — a declarative full replace of the environment's\nordered targeting rule set. Rules are applied in array order (index = priority, so the array\norder IS the evaluation order). Rules is nullable so that an OMITTED `rules`\nfield (a body of `{}`) binds successfully instead of failing ASP.NET Core's implicit\nrequired-property check on non-nullable reference types — both an omitted `rules` field\nand an explicit empty list (`{ \"rules\": [] }`) clear all targeting rules for the\nenvironment. Each element is a PublicCreateTargetingRuleRequest (identical to the\n`POST .../rules` body), so `UserSegmentId` is supported — segment-scoped rules can be\nsubmitted through this endpoint. The replace is atomic (all-or-nothing): the whole rule set is\nswapped in one transaction, or nothing changes."
      },
      "PublicReorderRulesRequest": {
        "required": [
          "ruleIds"
        ],
        "type": "object",
        "properties": {
          "ruleIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "additionalProperties": false,
        "description": "Request body for `PUT .../rules/reorder`. Must include every existing rule id exactly\nonce — `ReorderTargetingRulesCommandHandler` rejects duplicate, omitted, or unknown rule\nids with `BadRequestException`, surfaced as an HTTP 400 `bad_request` envelope\ncarrying the handler's message."
      },
      "PublicRolloutCheck": {
        "required": [
          "configured",
          "evaluable",
          "flagged",
          "bucketBy"
        ],
        "type": "object",
        "properties": {
          "configured": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicConfiguredWeight"
            },
            "description": "The configured weights, in percent; they sum to 100."
          },
          "splitChangedAtUtc": {
            "type": "string",
            "description": "The last time the split may have changed (the rule was edited, or a variation was added), or null if it hasn't since the rule was created. A change inside the window mixes two splits.",
            "format": "date-time",
            "nullable": true
          },
          "evaluable": {
            "type": "boolean",
            "description": "Whether the check could run. See NotEvaluableReason when false."
          },
          "pValue": {
            "type": "number",
            "description": "The sample-ratio test's p-value, or null when not evaluable.",
            "format": "double",
            "nullable": true
          },
          "flagged": {
            "type": "boolean",
            "description": "True only when the served split is both unlikely under the configured weights (p < 0.001) and at least 2 percentage points off for some variation."
          },
          "notEvaluableReason": {
            "enum": [
              "too-little-traffic",
              "unexpected-variation"
            ],
            "type": "string",
            "description": "too-little-traffic or unexpected-variation when the check couldn't run; null otherwise. Allowed values: too-little-traffic, unexpected-variation.",
            "nullable": true
          },
          "bucketBy": {
            "type": "string",
            "description": "The context attribute the rollout hashes on. A context without it skips the rule, even at 100%."
          },
          "unreached": {
            "$ref": "#/components/schemas/PublicRolloutUnreached"
          }
        },
        "additionalProperties": false,
        "description": "A percentage-rollout rule's configured split beside a sample-ratio check of what it served."
      },
      "PublicRolloutUnreached": {
        "required": [
          "eligibleEvaluations",
          "sinceUtc"
        ],
        "type": "object",
        "properties": {
          "eligibleEvaluations": {
            "type": "integer",
            "description": "Evaluations that reached the flag's rules or fallthrough since SinceUtc, while this rule served none.",
            "format": "int64"
          },
          "sinceUtc": {
            "type": "string",
            "description": "The window start, or the first UTC midnight after the rule last changed when that is later.",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "A live rollout rule that no evaluations reached."
      },
      "PublicRotateWebhookSecretResponse": {
        "required": [
          "secretId",
          "secret",
          "warning"
        ],
        "type": "object",
        "properties": {
          "secretId": {
            "type": "string",
            "format": "uuid"
          },
          "secret": {
            "type": "string"
          },
          "warning": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "description": "A newly added signing secret. The secret is shown only here."
      },
      "PublicSdkKeyResponse": {
        "required": [
          "id",
          "name",
          "type",
          "lastFourCharacters",
          "isActive",
          "createdAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "enum": [
              "ClientSide",
              "ServerSide"
            ],
            "type": "string",
            "description": "Allowed values: ClientSide, ServerSide."
          },
          "lastFourCharacters": {
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUsedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "revokedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "_actions": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/ActionCapability"
            },
            "description": "Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it."
          }
        },
        "additionalProperties": false,
        "description": "Public representation of an SDK key, returned by\n`GET /api/v1/orgs/{org}/projects/{project}/environments/{env}/sdk-keys` (list) and\n`GET .../sdk-keys/{sdkKey}` (detail). Deliberately narrower than\nSdkKeyDto — drops `RevokedBy` (an internal user id) and\n`EnvironmentId` (implicit in the route), and carries no plaintext key field: only\nLastFourCharacters is ever exposed once the key has been created. The plaintext\nkey is a one-time value that appears solely in PublicCreateSdkKeyResponse.",
        "example": {
          "id": "0197b6a2-4d5e-7f6a-9b7c-8d9e0f1a2b3c",
          "name": "Production server key",
          "description": "Used by the checkout backend.",
          "type": "ServerSide",
          "lastFourCharacters": "b1a0",
          "isActive": true,
          "createdAt": "2026-06-01T12:00:00Z",
          "lastUsedAt": "2026-06-20T09:15:00Z"
        }
      },
      "PublicSdkKeyResponsePagedResult": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicSdkKeyResponse"
            }
          },
          "next_cursor": {
            "type": "string",
            "nullable": true
          },
          "_actions": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/ActionCapability"
            },
            "description": "Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it."
          }
        },
        "additionalProperties": false,
        "description": "A page of results plus an opaque cursor for the next page, or null when this is the last\npage. Wire keys are frozen: `items` (already lowercase under the camelCase policy) and\n`next_cursor` (pinned explicitly — the policy alone would emit `nextCursor`)."
      },
      "PublicSegmentConditionDto": {
        "required": [
          "attribute",
          "operator",
          "values"
        ],
        "type": "object",
        "properties": {
          "attribute": {
            "type": "string"
          },
          "operator": {
            "enum": [
              "Equals",
              "NotEquals",
              "Contains",
              "NotContains",
              "GreaterThan",
              "LessThan",
              "GreaterThanOrEqual",
              "LessThanOrEqual",
              "In",
              "NotIn",
              "MatchesRegex",
              "StartsWith",
              "EndsWith",
              "Before",
              "After",
              "SemverEquals",
              "SemverGreaterThan",
              "SemverGreaterThanOrEqual",
              "SemverLessThan",
              "SemverLessThanOrEqual"
            ],
            "type": "string",
            "description": "Allowed values: Equals, NotEquals, Contains, NotContains, GreaterThan, LessThan, GreaterThanOrEqual, LessThanOrEqual, In, NotIn, MatchesRegex, StartsWith, EndsWith, Before, After, SemverEquals, SemverGreaterThan, SemverGreaterThanOrEqual, SemverLessThan, SemverLessThanOrEqual."
          },
          "values": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "negate": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "description": "A single targeting condition on a segment, used both as input (create/update) and output\n(Conditions). Operator is a bare string on\nboth sides of the wire — on write it's parsed to\nOperatorType by `SegmentsController` (an unknown\nvalue fails closed with a 400, never silently dropped or defaulted); on read it's mapped\nstraight through from Operator, which is already a string."
      },
      "PublicSegmentResponse": {
        "required": [
          "id",
          "key",
          "name",
          "conditions",
          "createdAt",
          "updatedAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "conditions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicSegmentConditionDto"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "_actions": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/ActionCapability"
            },
            "description": "Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it."
          }
        },
        "additionalProperties": false,
        "description": "Public representation of a user segment, returned by `GET .../segments`,\n`GET .../segments/{segment}`, and the body of a successful create.",
        "example": {
          "id": "0197b6a1-3c4d-7e5f-8a6b-7c8d9e0f1a2b",
          "key": "beta-testers",
          "name": "Beta Testers",
          "description": "Users enrolled in the beta program.",
          "conditions": [
            {
              "attribute": "email",
              "operator": "EndsWith",
              "values": [
                "@acme.com"
              ],
              "negate": false
            }
          ],
          "createdAt": "2026-06-01T12:00:00Z",
          "updatedAt": "2026-06-15T08:30:00Z"
        }
      },
      "PublicSegmentResponsePagedResult": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicSegmentResponse"
            }
          },
          "next_cursor": {
            "type": "string",
            "nullable": true
          },
          "_actions": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/ActionCapability"
            },
            "description": "Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it."
          }
        },
        "additionalProperties": false,
        "description": "A page of results plus an opaque cursor for the next page, or null when this is the last\npage. Wire keys are frozen: `items` (already lowercase under the camelCase policy) and\n`next_cursor` (pinned explicitly — the policy alone would emit `nextCursor`)."
      },
      "PublicSetDefaultFlagLifetimeRequest": {
        "required": [
          "days"
        ],
        "type": "object",
        "properties": {
          "days": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for `PUT /api/v1/orgs/{org}/projects/{project}/default-flag-lifetime`. `days`\nis 1–3650, or an explicit null to remove the default. `days` is required: a body without it\n(`{}`, or a misspelled field) is a `validation_failed` 400, never a removal, so a typo\ncan't silently wipe the setting (#3788). A request with no body is rejected too."
      },
      "PublicSetFlagExpiryRequest": {
        "type": "object",
        "properties": {
          "expiresAtUtc": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "Request body for `PUT /api/v1/orgs/{org}/projects/{project}/flags/{flag}/expiry`. Expiry is a\ndedicated sub-resource, deliberately NOT a field on PublicUpdateFeatureFlagRequest: that\nPUT is a full replace, so a new nullable field there would let any client that doesn't know about\nexpiry (the Terraform provider included) wipe it on every update. A bare date means the end of that\nUTC day; a full timestamp is stored exactly."
      },
      "PublicSetFlagOwnerRequest": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for `PUT /api/v1/orgs/{org}/projects/{project}/flags/{flag}/owner`. A dedicated\nsub-resource for the same reason as expiry: the main flag PUT is a full replace, so an owner field\nthere would let every client that doesn't know about owners wipe one. `email` must belong\nto an active member of the organization (case-insensitive)."
      },
      "PublicSetFlagRemovalPrRequest": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for `PUT /api/v1/orgs/{org}/projects/{project}/flags/{flag}/removal-pr`: the\npull request that removes this flag from code, as opened by the Featureflip Flag Cleanup Action.\nA dedicated sub-resource for the same reason as expiry and owner. `url` must be an https\npull or merge request URL (`https://{host}/{owner}/{repo}/pull/{number}`, a GitLab\n`https://{host}/{group}/{project}/-/merge_requests/{number}` or a Bitbucket Cloud\n`https://{host}/{workspace}/{repo}/pull-requests/{number}`)."
      },
      "PublicSnapshotRule": {
        "required": [
          "variation",
          "conditionGroups"
        ],
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "nullable": true
          },
          "variation": {
            "$ref": "#/components/schemas/PublicKeyedRef"
          },
          "segment": {
            "$ref": "#/components/schemas/PublicKeyedRef"
          },
          "rolloutPercentage": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "bucketBy": {
            "type": "string",
            "nullable": true
          },
          "conditionGroups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicConditionGroupResponse"
            }
          }
        },
        "additionalProperties": false,
        "description": "A targeting rule as a comparison or copy shows it: the variation and segment with key and name, and the\ncondition groups in the shape the targeting endpoints return."
      },
      "PublicTargetingConfigResponse": {
        "required": [
          "isEnabled",
          "rules"
        ],
        "type": "object",
        "properties": {
          "isEnabled": {
            "type": "boolean"
          },
          "rules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicTargetingRuleResponse"
            }
          },
          "_actions": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/ActionCapability"
            },
            "description": "Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it."
          }
        },
        "additionalProperties": false,
        "description": "The full targeting configuration for a flag in a single environment, returned by\n`GET .../targeting`. Maps 1:1 onto TargetingConfigurationDto — including\nits IsEnabled field, which reflects the parent\n`FlagEnvironmentConfiguration.IsEnabled` (whether the flag is on in this environment at\nall), not anything specific to targeting itself."
      },
      "PublicTargetingRuleResponse": {
        "required": [
          "id",
          "priority",
          "variationId",
          "bucketBy",
          "conditionGroups"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "priority": {
            "type": "integer",
            "format": "int32"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "variationId": {
            "type": "string",
            "format": "uuid"
          },
          "rolloutPercentage": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "bucketBy": {
            "type": "string",
            "description": "Context attribute the rollout hashes on (default `user_id`; `userId` is accepted as an alias). A context without it skips this rule, even at 100%. Lookup is exact and case-sensitive, except `user_id`/`userId`, which both read the user id."
          },
          "userSegmentId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "conditionGroups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicConditionGroupResponse"
            }
          },
          "_actions": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/ActionCapability"
            },
            "description": "Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it."
          }
        },
        "additionalProperties": false,
        "description": "A single targeting rule, returned by `GET .../rules/{ruleId}`,\n`POST .../rules` (201 body), and nested within PublicTargetingConfigResponse.\nMaps 1:1 onto TargetingRuleDto, dropping nothing — every field on the\nApplication DTO is part of the public contract.",
        "example": {
          "id": "0197b6a3-5e6f-7a7b-8c8d-9e0f1a2b3c4d",
          "priority": 0,
          "description": "North American users get the new flow at 25%.",
          "variationId": "0197b6a0-6a1b-7d4f-8c2e-2f3a4b5c6d7e",
          "rolloutPercentage": 25,
          "bucketBy": "user_id",
          "userSegmentId": "0197b6a1-3c4d-7e5f-8a6b-7c8d9e0f1a2b",
          "conditionGroups": [
            {
              "operator": "And",
              "conditions": [
                {
                  "attribute": "country",
                  "operator": "In",
                  "values": [
                    "US",
                    "CA"
                  ],
                  "negate": false
                }
              ]
            }
          ]
        }
      },
      "PublicTestWebhookSubscriptionResponse": {
        "required": [
          "webhookEventId",
          "webhookDeliveryId"
        ],
        "type": "object",
        "properties": {
          "webhookEventId": {
            "type": "string",
            "format": "uuid"
          },
          "webhookDeliveryId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "description": "The queued test event and its delivery. Poll the delivery log for the outcome."
      },
      "PublicToggleFlagRequest": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for `POST .../flags/{flag}/environments/{env}/toggle`. Named distinctly from\nthe dashboard's own `ToggleFlagInEnvironmentRequest`\n(which uses `IsEnabled`) — the public field is named Enabled per the phase-3c\ncontract. Enabled is a NULLABLE `bool?` deliberately: a non-nullable value\ntype would bind an omitted/empty body to `false` with no validation error (ASP.NET's\nimplicit-required only covers non-nullable reference types, not value types), silently disabling\nthe flag. The controller rejects a null Enabled with a `validation_failed` 400\nso the intent is never ambiguous (#1806)."
      },
      "PublicUpdateEnvironmentRequest": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The environment's display name."
          },
          "color": {
            "type": "string",
            "description": "The environment's display color, or null.",
            "nullable": true
          },
          "sortOrder": {
            "type": "integer",
            "description": "Position among the project's environments.",
            "format": "int32"
          },
          "requireChangeReason": {
            "type": "boolean",
            "description": "Require a change reason (X-Intent-Reason) on every change to flags in this environment. Business plan and above. Omit on update to leave unchanged. Turning it off needs Admin or Owner and an X-Intent-Reason.",
            "nullable": true
          },
          "requireConfirmation": {
            "type": "boolean",
            "description": "Ask dashboard users to type the environment key before a change lands. Dashboard only; not enforced by the API. Omit on update to leave unchanged. Turning it off needs Admin or Owner and an X-Intent-Reason.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for `PUT /api/v1/orgs/{org}/projects/{project}/environments/{env}`. See\nPublicCreateEnvironmentRequest for why this is named distinctly from the\ndashboard's `UpdateEnvironmentRequest`."
      },
      "PublicUpdateFeatureFlagRequest": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "clientSideVisible": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for `PUT /api/v1/orgs/{org}/projects/{project}/flags/{flag}`. See\nPublicCreateFeatureFlagRequest for why this is named distinctly from the\ndashboard's `UpdateFeatureFlagRequest`. The flag's key and type are immutable via this\nendpoint (mirrors `UpdateFeatureFlagCommand`, which has no `Key`/`Type`)."
      },
      "PublicUpdateFlagEnvConfigRequest": {
        "type": "object",
        "properties": {
          "defaultVariationId": {
            "type": "string",
            "format": "uuid"
          },
          "strategy": {
            "enum": [
              "SingleVariation",
              "PercentageRollout",
              "TargetedRollout"
            ],
            "type": "string",
            "description": "Allowed values: SingleVariation, PercentageRollout, TargetedRollout.",
            "nullable": true
          },
          "prerequisites": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicPrerequisiteDto"
            },
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for `PUT .../flags/{flag}/environments/{env}`. Named distinctly from the\ndashboard's own `UpdateFlagEnvironmentConfigurationRequest`\n— see PublicCreateEnvironmentRequest for the schemaId-collision rationale (both\ncontrollers share one Swagger document). Strategy is passed through verbatim to\nStrategy\n— the existing command validator name-allowlists it (SingleVariation/PercentageRollout/\nTargetedRollout or null), so an invalid value surfaces as the handler's own 400, not a\ncontroller-level guard. A null Prerequisites leaves prerequisites untouched; a\nnon-null list replaces them wholesale (mirrors UpdateFlagPrerequisitesCommand's\nreplace-all semantics).",
        "example": {
          "defaultVariationId": "0197b6a0-6a1b-7d4f-8c2e-3a4b5c6d7e8f",
          "strategy": "PercentageRollout",
          "prerequisites": [
            {
              "prerequisiteFlagKey": "checkout-api-enabled",
              "expectedVariationKey": "true"
            }
          ]
        }
      },
      "PublicUpdateFlagTriggerRequest": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "enabled": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for `PUT .../triggers/{trigger}`. The action is fixed at creation. Enabled is\nnullable so leaving it out is a 400 rather than a bound `false` that silently turns the trigger off."
      },
      "PublicUpdateProjectRequest": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for `PUT /api/v1/orgs/{org}/projects/{project}`. See\nPublicCreateProjectRequest for why this is named distinctly from the\ndashboard's `UpdateProjectRequest`."
      },
      "PublicUpdateSdkKeyRequest": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for `PUT /api/v1/orgs/{org}/projects/{project}/environments/{env}/sdk-keys/{sdkKey}`.\nType and key material are immutable via this endpoint (mirrors\nUpdateSdkKeyCommand, which\ncarries no `Type`)."
      },
      "PublicUpdateSegmentRequest": {
        "required": [
          "name",
          "conditions"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "conditions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicSegmentConditionDto"
            }
          }
        },
        "additionalProperties": false,
        "description": "Request body for `PUT /api/v1/orgs/{org}/projects/{project}/segments/{segment}`. The\nsegment's key is immutable via this endpoint (mirrors `UpdateUserSegmentCommand`, which\ncarries no `Key`)."
      },
      "PublicUpdateTargetingRuleRequest": {
        "required": [
          "conditionGroups"
        ],
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "nullable": true
          },
          "variationId": {
            "type": "string",
            "format": "uuid"
          },
          "rolloutPercentage": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "userSegmentId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "conditionGroups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicConditionGroupRequest"
            }
          },
          "bucketBy": {
            "type": "string",
            "description": "Context attribute the rollout hashes on (default `user_id`; `userId` is accepted as an alias). Omit to keep the current value. A fixed rule (no `rolloutPercentage`) never hashes and always stores `user_id`, so one made a rollout without `bucketBy` gets `user_id`. A context without it skips this rule, even at 100%. Changing it reshuffles who is in the rollout.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for `PUT .../rules/{ruleId}`. Same shape as\nPublicCreateTargetingRuleRequest — see its remarks on operator\nvalidation/canonicalization, which applies identically here."
      },
      "PublicUpdateVariationRequest": {
        "required": [
          "name",
          "value"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for\n`PUT /api/v1/orgs/{org}/projects/{project}/flags/{flag}/variations/{variationId}`. The\nvariation's key is immutable via this endpoint (mirrors\n`UpdateVariationCommand`, which\ncarries no `Key`)."
      },
      "PublicUpdateWebhookSubscriptionRequest": {
        "required": [
          "name",
          "url"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "eventTypes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "projectIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          },
          "environmentIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          },
          "isEnabled": {
            "type": "boolean",
            "nullable": true
          },
          "credential": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Replaces a subscription's configuration (full replace — omitted lists become empty, meaning\n\"all\"). `isEnabled` is required. The provider cannot be changed. `credential`\nreplaces a Datadog or Grafana subscription's stored credential; omit it to keep the current\none, unless the `url` changes, which needs the credential sent again."
      },
      "PublicVariationResponse": {
        "required": [
          "id",
          "key",
          "name",
          "value"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "_actions": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/ActionCapability"
            },
            "description": "Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it."
          }
        },
        "additionalProperties": false,
        "description": "A single variation on a flag, as returned in Variations.",
        "example": {
          "id": "0197b6a0-6a1b-7d4f-8c2e-2f3a4b5c6d7e",
          "key": "true",
          "name": "Enabled",
          "value": "true",
          "description": "Serve the new checkout."
        }
      },
      "PublicWebhookDeliveryResponse": {
        "required": [
          "id",
          "webhookEventId",
          "status",
          "attemptCount",
          "nextAttemptAt",
          "createdAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "webhookEventId": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "enum": [
              "Pending",
              "Succeeded",
              "DeadLettered"
            ],
            "type": "string",
            "description": "Allowed values: Pending, Succeeded, DeadLettered."
          },
          "attemptCount": {
            "type": "integer",
            "format": "int32"
          },
          "nextAttemptAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastResponseStatusCode": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "lastError": {
            "type": "string",
            "nullable": true
          },
          "completedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "One delivery attempt record. `status` is `Pending` (awaiting its first attempt,\nbacking off, or in flight), `Succeeded` or `DeadLettered`."
      },
      "PublicWebhookDeliveryResponsePagedResult": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicWebhookDeliveryResponse"
            }
          },
          "next_cursor": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A page of results plus an opaque cursor for the next page, or null when this is the last\npage. Wire keys are frozen: `items` (already lowercase under the camelCase policy) and\n`next_cursor` (pinned explicitly — the policy alone would emit `nextCursor`)."
      },
      "PublicWebhookSecretResponse": {
        "required": [
          "id",
          "createdAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "retiredAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A signing secret's id and lifecycle. A secret with no `retiredAt` is active and signs every delivery."
      },
      "PublicWebhookSubscriptionResponse": {
        "required": [
          "id",
          "name",
          "url",
          "provider",
          "isEnabled",
          "eventTypes",
          "projectIds",
          "environmentIds",
          "consecutiveFailureCount",
          "createdAt",
          "updatedAt",
          "secrets",
          "overPlanLimit"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "provider": {
            "enum": [
              "GenericHttp",
              "Slack",
              "Datadog",
              "Grafana"
            ],
            "type": "string",
            "description": "Allowed values: GenericHttp, Slack, Datadog, Grafana."
          },
          "isEnabled": {
            "type": "boolean"
          },
          "eventTypes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "projectIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "environmentIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "consecutiveFailureCount": {
            "type": "integer",
            "format": "int32"
          },
          "autoDisabledAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "secrets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicWebhookSecretResponse"
            }
          },
          "overPlanLimit": {
            "type": "boolean"
          },
          "_actions": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/ActionCapability"
            },
            "description": "Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it."
          }
        },
        "additionalProperties": false,
        "description": "A webhook subscription. Never carries secret material: signing secrets are listed by id and\nlifecycle only — the value itself is returned once, when it is created or rotated.\n`overPlanLimit` is true when the organization has more subscriptions than its plan\nallows, which happens after a downgrade. The oldest subscriptions up to the limit keep\ndelivering. The rest receive nothing and cannot be re-enabled, tested or redelivered to until\nthe plan is upgraded or older subscriptions are deleted.",
        "example": {
          "id": "0197b6a4-6f7a-7b8c-9d0e-1f2a3b4c5d6e",
          "name": "Checkout flag changes to deploy pipeline",
          "url": "https://hooks.acme.example/featureflip",
          "provider": "GenericHttp",
          "isEnabled": true,
          "eventTypes": [
            "flag.toggled",
            "flag.updated"
          ],
          "projectIds": [
            "0197b69f-1a2b-7c3d-8e4f-5a6b7c8d9e0f"
          ],
          "environmentIds": [
            "0197b69f-2b3c-7d4e-9f5a-6b7c8d9e0f1a"
          ],
          "consecutiveFailureCount": 0,
          "overPlanLimit": false,
          "createdAt": "2026-06-01T12:00:00Z",
          "updatedAt": "2026-06-15T08:30:00Z",
          "secrets": [
            {
              "id": "0197b6a4-7a8b-7c9d-8e0f-2a3b4c5d6e7f",
              "createdAt": "2026-06-01T12:00:00Z"
            }
          ]
        }
      },
      "PublicWebhookSubscriptionResponsePagedResult": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicWebhookSubscriptionResponse"
            }
          },
          "next_cursor": {
            "type": "string",
            "nullable": true
          },
          "_actions": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/ActionCapability"
            },
            "description": "Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it."
          }
        },
        "additionalProperties": false,
        "description": "A page of results plus an opaque cursor for the next page, or null when this is the last\npage. Wire keys are frozen: `items` (already lowercase under the camelCase policy) and\n`next_cursor` (pinned explicitly — the policy alone would emit `nextCursor`)."
      }
    },
    "headers": {
      "X-RateLimit-Limit": {
        "description": "The maximum number of requests permitted per rate-limit window for this caller.",
        "schema": {
          "type": "integer"
        }
      },
      "X-RateLimit-Remaining": {
        "description": "The number of requests remaining in the current rate-limit window.",
        "schema": {
          "type": "integer"
        }
      },
      "X-RateLimit-Reset": {
        "description": "The UTC time at which the current rate-limit window resets, as a Unix timestamp in seconds.",
        "schema": {
          "type": "integer"
        }
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "apiKey",
        "description": "JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token in the text input below.",
        "name": "Authorization",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "Bearer": [ ]
    }
  ],
  "tags": [
    {
      "name": "Environments",
      "description": "Environments within a resolved organization + project — one level deeper than\nProjectsController. Every route here carries `{org}`, so\nResolveTenantFilter has already resolved + access-checked\nit before any action runs. `{project}` is resolved key-or-guid, scoped to the resolved\norg, via ResolveProjectIdAsync for every action (list\nneeds it too, unlike ProjectsController's org-only list). `{env}`\n(get/update/delete) is then resolved key-or-guid, scoped to the resolved project, via\nResolveEnvironmentIdAsync. Dispatched commands/queries\nalways use the resolved GUIDs, never the raw route strings. Writes (create/update/delete)\nrequire at least Member (RequireRole);\na Viewer attempting one gets a 403 `forbidden` envelope. Deleting a project's last\nenvironment surfaces the existing `LAST_ENVIRONMENT` guard\n(DeleteEnvironmentCommandHandler) as-is — it throws the custom\nValidationException, which\nPublicApiExceptionFilterAttribute maps to a 400\n`validation_failed` envelope automatically, so Delete doesn't special-case it.\nListEnvironmentsQuery has no `Skip`/`Take` (unlike\n`ListProjectsQuery`) — a project's environment count is small, so List\nfetches the full set and paginates in-memory to still expose the standard cursor contract."
    },
    {
      "name": "Feature Flags",
      "description": "Feature flags within a resolved organization + project — mirrors\nEnvironmentsController's resolve-then-dispatch shape one level deeper.\n`{project}` is resolved key-or-guid, scoped to the resolved org (with the service-token\nproject allowlist forwarded), via ResolveProjectIdAsync\nfor every action. `{flag}` (get/update/archive/restore/delete) is then resolved\nkey-or-guid, scoped to the resolved project, via\nResolveFlagIdAsync. Dispatched commands/queries always\nuse the resolved GUIDs, never the raw route strings. Writes (create/update/archive/restore/\ndelete) require at least Member\n(RequireRole); a Viewer attempting one gets a 403\n`forbidden` envelope. Flag deletion/variation-removal guards (`FLAG_HAS_DEPENDENTS`,\netc.) surface as-is via the existing handlers' custom\nValidationException, which\nPublicApiExceptionFilterAttribute maps to a 400 `validation_failed`\nenvelope automatically; the flag cap on create and restore throws its subclass\nPlanLimitExceededException, a 403\n`plan_limit_reached`. No action here special-cases either. Defers flag *runtime config*\n(env-config, toggle, targeting rules, prerequisites) and variations to their own controllers\n(phase 3b Task 3 / phase 3c)."
    },
    {
      "name": "Flag Triggers",
      "description": "Flag triggers (#4651) within a resolved flag and environment. `{project}`, `{flag}` and\n`{env}` accept a key or a guid, resolved the same way as\nFlagEnvironmentConfigController; `{trigger}` is guid-only, since triggers have no\nkey, and anything else is the same 404 as a missing trigger. Writes need at least Member, and a\nchange reason when the environment requires one. The URL a monitoring tool calls is returned only by\ncreate and rotate."
    },
    {
      "name": "Me",
      "description": "The caller's own identity. This route has no `{org}` segment, so\nResolveTenantFilter is a pass-through here — the caller\nis read entirely from the authenticated principal (via GetCurrentUserQuery for a\nuser/PAT, or directly from claims for a service token), never from\nResolvedOrgId."
    },
    {
      "name": "Organizations",
      "description": "The caller's organizations. `List` has no `{org}` segment (pass-through tenant\nfilter) and dispatches ListOrganizationsQuery, which already scopes to the\ncaller's own memberships. `Get` carries `{org}`, so\nResolveTenantFilter resolves + access-checks it first —\nthe action dispatches GetOrganizationQuery with the resolved GUID\n(ResolvedOrgId), never the raw route string."
    },
    {
      "name": "Projects",
      "description": "Projects within a resolved organization. Every route here carries `{org}`, so\nResolveTenantFilter has already resolved + access-checked\nit before any action runs — dispatched commands/queries always use\nResolvedOrgId, never the raw route string.\n`{project}` (get/update/delete) is resolved key-or-guid, scoped to the resolved org, via\nResolveProjectIdAsync — same addressing pattern as\nOrganizationsController uses for `{org}`. Writes (create/update/delete)\nrequire at least Member\n(RequireRole); a Viewer attempting one gets a 403\n`forbidden` envelope."
    },
    {
      "name": "SDK Keys",
      "description": "SDK keys within a resolved organization + project + environment — one level deeper than\nEnvironmentsController. Every action resolves `{project}` (key-or-guid,\nscoped to the resolved org, with the service-token project allowlist forwarded) then\n`{env}` (key-or-guid, scoped to the resolved project) via\nIPublicApiTenantResolver, mirroring FeatureFlagsController's\nresolve-then-dispatch shape. Unlike `{project}`/`{env}`, `{sdkKey}` is\nguid-only — SDK keys have no key/slug of their own — resolved via\nResolveSdkKeyIdAsync, which throws the same\nnot-found error for a non-guid segment as a genuinely missing key. Writes\n(create/update/revoke) require at least Member\n(RequireRole); a Viewer attempting one gets a 403\n`forbidden` envelope.\n\nType is a bare string on the wire; Create\nparses it to SdkKeyType against a NAME allowlist\n(`Enum.TryParse` + `Enum.GetNames().Contains(...)`) rather than a bare\n`Enum.TryParse`/`Enum.IsDefined` pair — the latter would silently accept a numeric\nstring (e.g. `\"0\"`) and resolve it to the first enum member. An unrecognized value throws\nthe custom ValidationException BEFORE the environment is resolved or any command\nis dispatched, mapped to a 400 `validation_failed` envelope by\nPublicApiExceptionFilterAttribute — same pattern as\nMapConditions's operator parse.\nThe plaintext key returned by CreateSdkKeyResult is a one-time value — it is\nnever recoverable afterward, so unlike Create's\nre-fetch-after-write pattern, Create builds its response directly from the\ncommand result rather than dispatching a follow-up query. List and\nGet return PublicSdkKeyResponse, which carries only\n`LastFourCharacters` — never the plaintext."
    },
    {
      "name": "User Segments",
      "description": "User segments within a resolved organization + project — mirrors\nEnvironmentsController's resolve-then-dispatch shape one level deeper.\n`{project}` is resolved key-or-guid, scoped to the resolved org (with the service-token\nproject allowlist forwarded), via ResolveProjectIdAsync\nfor every action. `{segment}` (get/update/delete) is then resolved key-or-guid, scoped to\nthe resolved project, via ResolveSegmentIdAsync.\nDispatched commands/queries always use the resolved GUIDs, never the raw route strings. Writes\n(create/update/delete) require at least Member\n(RequireRole); a Viewer attempting one gets a 403\n`forbidden` envelope.\n\nThere is no `GetUserSegmentQuery` — Get resolves `{segment}` then\ndispatches ListUserSegmentsQuery and finds the match in-memory, throwing\nNotFoundException if absent. This keeps the task scoped to the public layer with\nno new Application handler: the resolver has already validated the id exists within the\nproject, and a project's segment set is bounded (unlike flags/environments' own list, this\nnever needs true server-side pagination for the lookup).\nOperator is a bare string on the wire; write actions\nparse it to OperatorType via TryParse``1(ReadOnlySpan{Char},Boolean,``0@)\n(case-insensitive). An unrecognized value throws the custom\nValidationException BEFORE any command is dispatched — mapped to a 400\n`validation_failed` envelope by PublicApiExceptionFilterAttribute, same as\nevery other handler-thrown validation failure on this surface."
    },
    {
      "name": "Webhooks",
      "description": "Manage outbound webhook subscriptions: where configuration-change events are sent, which\nevents and projects they cover, their signing secrets, and their delivery log."
    }
  ]
}