---
title: "Replace a flag's targeting in an environment"
description: "A whole-config write; the console always sends If-Match with the config's ETag. 400 for an unknown variation or segment, or when a comment is required and missing; 400 snapshot_too_large when the environment's compiled snapshot would exceed 8 MB."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.ezghcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Feature Flags API

`PUT /v1/organizations/{orgId}/projects/{projectId}/flags/{flagId}/environments/{environmentId}`

A whole-config write; the console always sends If-Match with the config's ETag. 400 for an unknown variation or segment, or when a comment is required and missing; 400 snapshot_too_large when the environment's compiled snapshot would exceed 8 MB.

## Authentication

Requires one of the following:

- `apiKey`, http, header `Authorization`
- `oauth`, http, header `Authorization`
- `sessionCookie`, apiKey, in cookie

## Path parameters

- `UpdateFlagConfig.path.orgId` (string, required)
  - format `uuid`
- `UpdateFlagConfig.path.projectId` (string, required)
  - format `uuid`
- `UpdateFlagConfig.path.flagId` (string, required)
  - format `uuid`
- `UpdateFlagConfig.path.environmentId` (string, required)
  - format `uuid`

## Header parameters

- `UpdateFlagConfig.header.If-Match` (string, optional) — The ETag as last read, or *. Without it the write isn't conditional; with a stale one it's 412.

## Request body

_Required._

- `UpdateFlagConfig.defaultServe` (object, required) — Exactly one of variation and rollout.
  - `UpdateFlagConfig.defaultServe.rollout` (object, optional)
    - `UpdateFlagConfig.defaultServe.rollout.weights` (array<object>, required) — Weights sum to exactly 100000 (0.001 % steps).
      - `UpdateFlagConfig.defaultServe.rollout.weights.variation` (string, required) — Lowercase letters, digits, _ and -, starting with a letter or digit; at most 64 characters. Immutable.
        - pattern `^[a-z0-9][a-z0-9_-]{0,63}$`
      - `UpdateFlagConfig.defaultServe.rollout.weights.weight` (integer, required)
        - min 0; max 100000
    - `UpdateFlagConfig.defaultServe.rollout.bucketBy` (string, optional) — The context attribute to bucket on; targetingKey by default. A context without it gets the first variation.
  - `UpdateFlagConfig.defaultServe.variation` (string, optional) — Lowercase letters, digits, _ and -, starting with a letter or digit; at most 64 characters. Immutable.
    - pattern `^[a-z0-9][a-z0-9_-]{0,63}$`
- `UpdateFlagConfig.enabled` (boolean, required)
- `UpdateFlagConfig.offVariation` (string, required) — Lowercase letters, digits, _ and -, starting with a letter or digit; at most 64 characters. Immutable.
  - pattern `^[a-z0-9][a-z0-9_-]{0,63}$`
- `UpdateFlagConfig.rules` (array<object>, required)
  - `UpdateFlagConfig.rules.clauses` (array<object>, required) — ANDed; at most 10.
    - `UpdateFlagConfig.rules.clauses.operator` (unknown, required)
      - one of `"in"`, `"notIn"`, `"contains"`, `"startsWith"`, `"endsWith"`, `"lt"`, `"lte"`, `"gt"`, `"gte"`, `"semverEq"`, `"semverLt"`, `"semverGt"`, `"segmentMatch"`, `"notSegmentMatch"`
    - `UpdateFlagConfig.rules.clauses.values` (array<string | number | boolean>, required) — Strings, numbers or booleans (booleans with in and notIn); segment keys for the segment operators. At most 1,000.
    - `UpdateFlagConfig.rules.clauses.attribute` (string, optional) — A context attribute; dot paths reach nested ones (company.plan). Absent for segmentMatch and notSegmentMatch.
  - `UpdateFlagConfig.rules.id` (string, required)
    - format `uuid`
  - `UpdateFlagConfig.rules.serve` (object, required) — Exactly one of variation and rollout.
    - `UpdateFlagConfig.rules.serve.rollout` (object, optional)
      - `UpdateFlagConfig.rules.serve.rollout.weights` (array<object>, required) — Weights sum to exactly 100000 (0.001 % steps).
        - `UpdateFlagConfig.rules.serve.rollout.weights.variation` (string, required) — Lowercase letters, digits, _ and -, starting with a letter or digit; at most 64 characters. Immutable.
          - pattern `^[a-z0-9][a-z0-9_-]{0,63}$`
        - `UpdateFlagConfig.rules.serve.rollout.weights.weight` (integer, required)
          - min 0; max 100000
      - `UpdateFlagConfig.rules.serve.rollout.bucketBy` (string, optional) — The context attribute to bucket on; targetingKey by default. A context without it gets the first variation.
    - `UpdateFlagConfig.rules.serve.variation` (string, optional) — Lowercase letters, digits, _ and -, starting with a letter or digit; at most 64 characters. Immutable.
      - pattern `^[a-z0-9][a-z0-9_-]{0,63}$`
  - `UpdateFlagConfig.rules.description` (string, optional)
    - maxLength 200
- `UpdateFlagConfig.targets` (array<object>, required)
  - `UpdateFlagConfig.targets.values` (array<string>, required)
  - `UpdateFlagConfig.targets.variation` (string, required) — Lowercase letters, digits, _ and -, starting with a letter or digit; at most 64 characters. Immutable.
    - pattern `^[a-z0-9][a-z0-9_-]{0,63}$`
- `UpdateFlagConfig.comment` (string, optional) — Kept with the version; required when the environment's requireComment is true.
  - maxLength 1000

## Example request

```json
{
  "comment": "string",
  "defaultServe": {
    "rollout": {
      "bucketBy": "string",
      "weights": [
        {
          "variation": "string",
          "weight": 100000
        }
      ]
    },
    "variation": "string"
  },
  "enabled": true,
  "offVariation": "string",
  "rules": [
    {
      "clauses": [
        {
          "attribute": "string",
          "operator": "in",
          "values": [
            "string"
          ]
        }
      ],
      "description": "string",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "serve": {
        "rollout": {
          "bucketBy": "string",
          "weights": [
            {
              "variation": "string",
              "weight": 100000
            }
          ]
        },
        "variation": "string"
      }
    }
  ],
  "targets": [
    {
      "values": [
        "string"
      ],
      "variation": "string"
    }
  ]
}
```

## Code samples

### cURL

```curl
curl --request PUT \
  --url https://flags-api.ezghcloud.com/v1/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/flags/497f6eca-6276-4993-bfeb-53cbbbba6f08/environments/497f6eca-6276-4993-bfeb-53cbbbba6f08 \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "comment": "string",
  "defaultServe": {
    "rollout": {
      "bucketBy": "string",
      "weights": [
        {
          "variation": "string",
          "weight": 100000
        }
      ]
    },
    "variation": "string"
  },
  "enabled": true,
  "offVariation": "string",
  "rules": [
    {
      "clauses": [
        {
          "attribute": "string",
          "operator": "in",
          "values": [
            "string"
          ]
        }
      ],
      "description": "string",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "serve": {
        "rollout": {
          "bucketBy": "string",
          "weights": [
            {
              "variation": "string",
              "weight": 100000
            }
          ]
        },
        "variation": "string"
      }
    }
  ],
  "targets": [
    {
      "values": [
        "string"
      ],
      "variation": "string"
    }
  ]
}
'
```

### TypeScript

```typescript
const url = 'https://flags-api.ezghcloud.com/v1/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/flags/497f6eca-6276-4993-bfeb-53cbbbba6f08/environments/497f6eca-6276-4993-bfeb-53cbbbba6f08';
const options = {
  method: 'PUT',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({
    comment: 'string',
    defaultServe: {
      rollout: {bucketBy: 'string', weights: [{variation: 'string', weight: 100000}]},
      variation: 'string'
    },
    enabled: true,
    offVariation: 'string',
    rules: [
      {
        clauses: [{attribute: 'string', operator: 'in', values: ['string']}],
        description: 'string',
        id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',
        serve: {
          rollout: {bucketBy: 'string', weights: [{variation: 'string', weight: 100000}]},
          variation: 'string'
        }
      }
    ],
    targets: [{values: ['string'], variation: 'string'}]
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://flags-api.ezghcloud.com/v1/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/flags/497f6eca-6276-4993-bfeb-53cbbbba6f08/environments/497f6eca-6276-4993-bfeb-53cbbbba6f08"

payload = {
    "comment": "string",
    "defaultServe": {
        "rollout": {
            "bucketBy": "string",
            "weights": [
                {
                    "variation": "string",
                    "weight": 100000
                }
            ]
        },
        "variation": "string"
    },
    "enabled": True,
    "offVariation": "string",
    "rules": [
        {
            "clauses": [
                {
                    "attribute": "string",
                    "operator": "in",
                    "values": ["string"]
                }
            ],
            "description": "string",
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "serve": {
                "rollout": {
                    "bucketBy": "string",
                    "weights": [
                        {
                            "variation": "string",
                            "weight": 100000
                        }
                    ]
                },
                "variation": "string"
            }
        }
    ],
    "targets": [
        {
            "values": ["string"],
            "variation": "string"
        }
    ]
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

The config, at its new version.

#### Example

```json
{
  "access": {
    "update": true
  },
  "defaultServe": {
    "rollout": {
      "bucketBy": "string",
      "weights": [
        {
          "variation": "string",
          "weight": 100000
        }
      ]
    },
    "variation": "string"
  },
  "enabled": true,
  "environmentId": "19f5cc2e-7657-437a-9268-83cd3d563563",
  "environmentKey": "string",
  "flagId": "8872ed4e-aef3-4929-9fcf-2d71741365e7",
  "flagKey": "string",
  "offVariation": "string",
  "rules": [
    {
      "clauses": [
        {
          "attribute": "string",
          "operator": "in",
          "values": [
            "string"
          ]
        }
      ],
      "description": "string",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "serve": {
        "rollout": {
          "bucketBy": "string",
          "weights": [
            {
              "variation": "string",
              "weight": 100000
            }
          ]
        },
        "variation": "string"
      }
    }
  ],
  "targets": [
    {
      "values": [
        "string"
      ],
      "variation": "string"
    }
  ],
  "updatedAt": "2019-08-24T14:15:22Z",
  "version": 0
}
```

- `UpdateFlagConfig.response.200.access` (object, required)
  - `UpdateFlagConfig.response.200.access.update` (boolean, required) — Whether the caller may change this flag's targeting in this environment (flags.configs.update).
- `UpdateFlagConfig.response.200.defaultServe` (object, required) — Exactly one of variation and rollout.
  - `UpdateFlagConfig.response.200.defaultServe.rollout` (object, optional)
    - `UpdateFlagConfig.response.200.defaultServe.rollout.weights` (array<object>, required) — Weights sum to exactly 100000 (0.001 % steps).
      - `UpdateFlagConfig.response.200.defaultServe.rollout.weights.variation` (string, required) — Lowercase letters, digits, _ and -, starting with a letter or digit; at most 64 characters. Immutable.
        - pattern `^[a-z0-9][a-z0-9_-]{0,63}$`
      - `UpdateFlagConfig.response.200.defaultServe.rollout.weights.weight` (integer, required)
        - min 0; max 100000
    - `UpdateFlagConfig.response.200.defaultServe.rollout.bucketBy` (string, optional) — The context attribute to bucket on; targetingKey by default. A context without it gets the first variation.
  - `UpdateFlagConfig.response.200.defaultServe.variation` (string, optional) — Lowercase letters, digits, _ and -, starting with a letter or digit; at most 64 characters. Immutable.
    - pattern `^[a-z0-9][a-z0-9_-]{0,63}$`
- `UpdateFlagConfig.response.200.enabled` (boolean, required)
- `UpdateFlagConfig.response.200.environmentId` (string, required)
  - format `uuid`
- `UpdateFlagConfig.response.200.environmentKey` (string, required) — Lowercase letters, digits, _ and -, starting with a letter or digit; at most 64 characters. Immutable.
  - pattern `^[a-z0-9][a-z0-9_-]{0,63}$`
- `UpdateFlagConfig.response.200.flagId` (string, required)
  - format `uuid`
- `UpdateFlagConfig.response.200.flagKey` (string, required) — Lowercase letters, digits, _ and -, starting with a letter or digit; at most 64 characters. Immutable.
  - pattern `^[a-z0-9][a-z0-9_-]{0,63}$`
- `UpdateFlagConfig.response.200.offVariation` (string, required) — Lowercase letters, digits, _ and -, starting with a letter or digit; at most 64 characters. Immutable.
  - pattern `^[a-z0-9][a-z0-9_-]{0,63}$`
- `UpdateFlagConfig.response.200.rules` (array<object>, required)
  - `UpdateFlagConfig.response.200.rules.clauses` (array<object>, required) — ANDed; at most 10.
    - `UpdateFlagConfig.response.200.rules.clauses.operator` (unknown, required)
      - one of `"in"`, `"notIn"`, `"contains"`, `"startsWith"`, `"endsWith"`, `"lt"`, `"lte"`, `"gt"`, `"gte"`, `"semverEq"`, `"semverLt"`, `"semverGt"`, `"segmentMatch"`, `"notSegmentMatch"`
    - `UpdateFlagConfig.response.200.rules.clauses.values` (array<string | number | boolean>, required) — Strings, numbers or booleans (booleans with in and notIn); segment keys for the segment operators. At most 1,000.
    - `UpdateFlagConfig.response.200.rules.clauses.attribute` (string, optional) — A context attribute; dot paths reach nested ones (company.plan). Absent for segmentMatch and notSegmentMatch.
  - `UpdateFlagConfig.response.200.rules.id` (string, required)
    - format `uuid`
  - `UpdateFlagConfig.response.200.rules.serve` (object, required) — Exactly one of variation and rollout.
    - `UpdateFlagConfig.response.200.rules.serve.rollout` (object, optional)
      - `UpdateFlagConfig.response.200.rules.serve.rollout.weights` (array<object>, required) — Weights sum to exactly 100000 (0.001 % steps).
        - `UpdateFlagConfig.response.200.rules.serve.rollout.weights.variation` (string, required) — Lowercase letters, digits, _ and -, starting with a letter or digit; at most 64 characters. Immutable.
          - pattern `^[a-z0-9][a-z0-9_-]{0,63}$`
        - `UpdateFlagConfig.response.200.rules.serve.rollout.weights.weight` (integer, required)
          - min 0; max 100000
      - `UpdateFlagConfig.response.200.rules.serve.rollout.bucketBy` (string, optional) — The context attribute to bucket on; targetingKey by default. A context without it gets the first variation.
    - `UpdateFlagConfig.response.200.rules.serve.variation` (string, optional) — Lowercase letters, digits, _ and -, starting with a letter or digit; at most 64 characters. Immutable.
      - pattern `^[a-z0-9][a-z0-9_-]{0,63}$`
  - `UpdateFlagConfig.response.200.rules.description` (string, optional)
    - maxLength 200
- `UpdateFlagConfig.response.200.targets` (array<object>, required)
  - `UpdateFlagConfig.response.200.targets.values` (array<string>, required)
  - `UpdateFlagConfig.response.200.targets.variation` (string, required) — Lowercase letters, digits, _ and -, starting with a letter or digit; at most 64 characters. Immutable.
    - pattern `^[a-z0-9][a-z0-9_-]{0,63}$`
- `UpdateFlagConfig.response.200.updatedAt` (string, required)
  - format `date-time`
- `UpdateFlagConfig.response.200.version` (integer, required)

### 400

invalid_request (with issues), invalid_cursor, or the endpoint's own 400 codes.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `UpdateFlagConfig.response.400.error` (object, required)
  - `UpdateFlagConfig.response.400.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `UpdateFlagConfig.response.400.error.message` (string, required)
    - maxLength 1024
  - `UpdateFlagConfig.response.400.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `UpdateFlagConfig.response.400.error.issues.message` (string, required)
    - `UpdateFlagConfig.response.400.error.issues.path` (string, required)
  - `UpdateFlagConfig.response.400.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `UpdateFlagConfig.response.400.error.quota.id` (string, required)
    - `UpdateFlagConfig.response.400.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `UpdateFlagConfig.response.400.error.quota.limit` (integer, required)
      - min 0
    - `UpdateFlagConfig.response.400.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `UpdateFlagConfig.response.400.error.quota.inFlight` (integer, optional)
      - min 0
    - `UpdateFlagConfig.response.400.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `UpdateFlagConfig.response.400.error.quota.region` (string, optional)
    - `UpdateFlagConfig.response.400.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `UpdateFlagConfig.response.400.error.quota.scopeResourceName` (string, optional)
    - `UpdateFlagConfig.response.400.error.quota.used` (integer, optional)
      - min 0
    - `UpdateFlagConfig.response.400.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 401

unauthenticated: no credential, or one that doesn't check out.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `UpdateFlagConfig.response.401.error` (object, required)
  - `UpdateFlagConfig.response.401.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `UpdateFlagConfig.response.401.error.message` (string, required)
    - maxLength 1024
  - `UpdateFlagConfig.response.401.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `UpdateFlagConfig.response.401.error.issues.message` (string, required)
    - `UpdateFlagConfig.response.401.error.issues.path` (string, required)
  - `UpdateFlagConfig.response.401.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `UpdateFlagConfig.response.401.error.quota.id` (string, required)
    - `UpdateFlagConfig.response.401.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `UpdateFlagConfig.response.401.error.quota.limit` (integer, required)
      - min 0
    - `UpdateFlagConfig.response.401.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `UpdateFlagConfig.response.401.error.quota.inFlight` (integer, optional)
      - min 0
    - `UpdateFlagConfig.response.401.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `UpdateFlagConfig.response.401.error.quota.region` (string, optional)
    - `UpdateFlagConfig.response.401.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `UpdateFlagConfig.response.401.error.quota.scopeResourceName` (string, optional)
    - `UpdateFlagConfig.response.401.error.quota.used` (integer, optional)
      - min 0
    - `UpdateFlagConfig.response.401.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 403

access_denied: the caller's policies don't allow the action; forbidden_origin: a cookie-authenticated write from an origin that isn't allowed; spend_limit_reached.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `UpdateFlagConfig.response.403.error` (object, required)
  - `UpdateFlagConfig.response.403.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `UpdateFlagConfig.response.403.error.message` (string, required)
    - maxLength 1024
  - `UpdateFlagConfig.response.403.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `UpdateFlagConfig.response.403.error.issues.message` (string, required)
    - `UpdateFlagConfig.response.403.error.issues.path` (string, required)
  - `UpdateFlagConfig.response.403.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `UpdateFlagConfig.response.403.error.quota.id` (string, required)
    - `UpdateFlagConfig.response.403.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `UpdateFlagConfig.response.403.error.quota.limit` (integer, required)
      - min 0
    - `UpdateFlagConfig.response.403.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `UpdateFlagConfig.response.403.error.quota.inFlight` (integer, optional)
      - min 0
    - `UpdateFlagConfig.response.403.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `UpdateFlagConfig.response.403.error.quota.region` (string, optional)
    - `UpdateFlagConfig.response.403.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `UpdateFlagConfig.response.403.error.quota.scopeResourceName` (string, optional)
    - `UpdateFlagConfig.response.403.error.quota.used` (integer, optional)
      - min 0
    - `UpdateFlagConfig.response.403.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 404

not_found: unknown, malformed, or in an organization the caller isn't in.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `UpdateFlagConfig.response.404.error` (object, required)
  - `UpdateFlagConfig.response.404.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `UpdateFlagConfig.response.404.error.message` (string, required)
    - maxLength 1024
  - `UpdateFlagConfig.response.404.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `UpdateFlagConfig.response.404.error.issues.message` (string, required)
    - `UpdateFlagConfig.response.404.error.issues.path` (string, required)
  - `UpdateFlagConfig.response.404.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `UpdateFlagConfig.response.404.error.quota.id` (string, required)
    - `UpdateFlagConfig.response.404.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `UpdateFlagConfig.response.404.error.quota.limit` (integer, required)
      - min 0
    - `UpdateFlagConfig.response.404.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `UpdateFlagConfig.response.404.error.quota.inFlight` (integer, optional)
      - min 0
    - `UpdateFlagConfig.response.404.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `UpdateFlagConfig.response.404.error.quota.region` (string, optional)
    - `UpdateFlagConfig.response.404.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `UpdateFlagConfig.response.404.error.quota.scopeResourceName` (string, optional)
    - `UpdateFlagConfig.response.404.error.quota.used` (integer, optional)
      - min 0
    - `UpdateFlagConfig.response.404.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 409

quota_exceeded (an allocation quota, with quota), idempotency_conflict, idempotency_in_progress (with Retry-After), organization_deletion_pending, operation_in_progress, or the endpoint's own 409 codes.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `UpdateFlagConfig.response.409.error` (object, required)
  - `UpdateFlagConfig.response.409.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `UpdateFlagConfig.response.409.error.message` (string, required)
    - maxLength 1024
  - `UpdateFlagConfig.response.409.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `UpdateFlagConfig.response.409.error.issues.message` (string, required)
    - `UpdateFlagConfig.response.409.error.issues.path` (string, required)
  - `UpdateFlagConfig.response.409.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `UpdateFlagConfig.response.409.error.quota.id` (string, required)
    - `UpdateFlagConfig.response.409.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `UpdateFlagConfig.response.409.error.quota.limit` (integer, required)
      - min 0
    - `UpdateFlagConfig.response.409.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `UpdateFlagConfig.response.409.error.quota.inFlight` (integer, optional)
      - min 0
    - `UpdateFlagConfig.response.409.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `UpdateFlagConfig.response.409.error.quota.region` (string, optional)
    - `UpdateFlagConfig.response.409.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `UpdateFlagConfig.response.409.error.quota.scopeResourceName` (string, optional)
    - `UpdateFlagConfig.response.409.error.quota.used` (integer, optional)
      - min 0
    - `UpdateFlagConfig.response.409.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 412

precondition_failed: it changed since the If-Match ETag was read. Nothing was changed.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `UpdateFlagConfig.response.412.error` (object, required)
  - `UpdateFlagConfig.response.412.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `UpdateFlagConfig.response.412.error.message` (string, required)
    - maxLength 1024
  - `UpdateFlagConfig.response.412.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `UpdateFlagConfig.response.412.error.issues.message` (string, required)
    - `UpdateFlagConfig.response.412.error.issues.path` (string, required)
  - `UpdateFlagConfig.response.412.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `UpdateFlagConfig.response.412.error.quota.id` (string, required)
    - `UpdateFlagConfig.response.412.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `UpdateFlagConfig.response.412.error.quota.limit` (integer, required)
      - min 0
    - `UpdateFlagConfig.response.412.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `UpdateFlagConfig.response.412.error.quota.inFlight` (integer, optional)
      - min 0
    - `UpdateFlagConfig.response.412.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `UpdateFlagConfig.response.412.error.quota.region` (string, optional)
    - `UpdateFlagConfig.response.412.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `UpdateFlagConfig.response.412.error.quota.scopeResourceName` (string, optional)
    - `UpdateFlagConfig.response.412.error.quota.used` (integer, optional)
      - min 0
    - `UpdateFlagConfig.response.412.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 413

payload_too_large: the body is over the endpoint's limit (1 MiB unless it says otherwise).

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `UpdateFlagConfig.response.413.error` (object, required)
  - `UpdateFlagConfig.response.413.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `UpdateFlagConfig.response.413.error.message` (string, required)
    - maxLength 1024
  - `UpdateFlagConfig.response.413.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `UpdateFlagConfig.response.413.error.issues.message` (string, required)
    - `UpdateFlagConfig.response.413.error.issues.path` (string, required)
  - `UpdateFlagConfig.response.413.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `UpdateFlagConfig.response.413.error.quota.id` (string, required)
    - `UpdateFlagConfig.response.413.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `UpdateFlagConfig.response.413.error.quota.limit` (integer, required)
      - min 0
    - `UpdateFlagConfig.response.413.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `UpdateFlagConfig.response.413.error.quota.inFlight` (integer, optional)
      - min 0
    - `UpdateFlagConfig.response.413.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `UpdateFlagConfig.response.413.error.quota.region` (string, optional)
    - `UpdateFlagConfig.response.413.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `UpdateFlagConfig.response.413.error.quota.scopeResourceName` (string, optional)
    - `UpdateFlagConfig.response.413.error.quota.used` (integer, optional)
      - min 0
    - `UpdateFlagConfig.response.413.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 429

too_many_requests, with Retry-After; or quota_exceeded (a rate, usage or concurrency quota, with quota), never with Retry-After.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `UpdateFlagConfig.response.429.error` (object, required)
  - `UpdateFlagConfig.response.429.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `UpdateFlagConfig.response.429.error.message` (string, required)
    - maxLength 1024
  - `UpdateFlagConfig.response.429.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `UpdateFlagConfig.response.429.error.issues.message` (string, required)
    - `UpdateFlagConfig.response.429.error.issues.path` (string, required)
  - `UpdateFlagConfig.response.429.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `UpdateFlagConfig.response.429.error.quota.id` (string, required)
    - `UpdateFlagConfig.response.429.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `UpdateFlagConfig.response.429.error.quota.limit` (integer, required)
      - min 0
    - `UpdateFlagConfig.response.429.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `UpdateFlagConfig.response.429.error.quota.inFlight` (integer, optional)
      - min 0
    - `UpdateFlagConfig.response.429.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `UpdateFlagConfig.response.429.error.quota.region` (string, optional)
    - `UpdateFlagConfig.response.429.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `UpdateFlagConfig.response.429.error.quota.scopeResourceName` (string, optional)
    - `UpdateFlagConfig.response.429.error.quota.used` (integer, optional)
      - min 0
    - `UpdateFlagConfig.response.429.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 500

internal_error: a bug; the details are in the logs, under the request ID.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `UpdateFlagConfig.response.500.error` (object, required)
  - `UpdateFlagConfig.response.500.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `UpdateFlagConfig.response.500.error.message` (string, required)
    - maxLength 1024
  - `UpdateFlagConfig.response.500.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `UpdateFlagConfig.response.500.error.issues.message` (string, required)
    - `UpdateFlagConfig.response.500.error.issues.path` (string, required)
  - `UpdateFlagConfig.response.500.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `UpdateFlagConfig.response.500.error.quota.id` (string, required)
    - `UpdateFlagConfig.response.500.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `UpdateFlagConfig.response.500.error.quota.limit` (integer, required)
      - min 0
    - `UpdateFlagConfig.response.500.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `UpdateFlagConfig.response.500.error.quota.inFlight` (integer, optional)
      - min 0
    - `UpdateFlagConfig.response.500.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `UpdateFlagConfig.response.500.error.quota.region` (string, optional)
    - `UpdateFlagConfig.response.500.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `UpdateFlagConfig.response.500.error.quota.scopeResourceName` (string, optional)
    - `UpdateFlagConfig.response.500.error.quota.used` (integer, optional)
      - min 0
    - `UpdateFlagConfig.response.500.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 503

unavailable: a dependency the request needs is down. Retry after Retry-After.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `UpdateFlagConfig.response.503.error` (object, required)
  - `UpdateFlagConfig.response.503.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `UpdateFlagConfig.response.503.error.message` (string, required)
    - maxLength 1024
  - `UpdateFlagConfig.response.503.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `UpdateFlagConfig.response.503.error.issues.message` (string, required)
    - `UpdateFlagConfig.response.503.error.issues.path` (string, required)
  - `UpdateFlagConfig.response.503.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `UpdateFlagConfig.response.503.error.quota.id` (string, required)
    - `UpdateFlagConfig.response.503.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `UpdateFlagConfig.response.503.error.quota.limit` (integer, required)
      - min 0
    - `UpdateFlagConfig.response.503.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `UpdateFlagConfig.response.503.error.quota.inFlight` (integer, optional)
      - min 0
    - `UpdateFlagConfig.response.503.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `UpdateFlagConfig.response.503.error.quota.region` (string, optional)
    - `UpdateFlagConfig.response.503.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `UpdateFlagConfig.response.503.error.quota.scopeResourceName` (string, optional)
    - `UpdateFlagConfig.response.503.error.quota.used` (integer, optional)
      - min 0
    - `UpdateFlagConfig.response.503.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.


Source: https://docs.ezghcloud.com/flags-api/UpdateFlagConfig/index.md
