> ## Documentation Index
> Fetch the complete documentation index at: https://confidence-auth-testing.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Edit Flag Schema

> Learn how to add or change properties in a flag's schema.

**Edit Flag Schema**

Learn how to add or change properties in a flag's schema.

[Do this via the API →](/docs/reference/api/how-to-guides/flags/define-flag-schema.md)

The [flag schema](/docs/capabilities/flags/create-flags.md#flag-schema) defines the available properties and their data types for a flag.

## Edit Schema

Boolean flags start with a single `enabled` property of Boolean type. JSON flags start with the properties you defined during creation. You can add more properties to any flag type.

You can always add new properties to a flag's schema.

> [!TIP]
>
> Program your clients so that they can always handle the presence of new
> properties in flag value.

You can change the name of a property if no variant sets a value for that
particular property. The same is true for deleting a property from the schema.
You can only delete a property if no variant sets a value for it. The schema editor disables properties that are in use by variants.

To edit the schema for a flag, follow these steps.

**1. Go to Confidence**

**2. On the left sidebar, select Flags**

**3. Go to the flag you want to edit the schema for**

**4. Click the edit schema button**

Click the edit schema button (pencil icon) next to the **Variants** heading on the flag detail page.

**5. Click Add property and select a type**

Click **Add property** and select the property type from the menu: string, bool, int, double, or struct.

**6. Enter the property name**

Give the new property a descriptive name.

**7. Click Save**

Click **Save** to apply your changes to the schema.

> [!TIP]
>
> * Use short and descriptive name of the properties. For example, `color` is great.
> * Use boolean properties to represent the state of a feature. For example, use
>   `enable` to represent if you should enable a feature or not.
> * Use kebab-case for property names: `result-count` is better than `resultCount`.
> * Avoid putting too much information in the name. For example, `color` is better
>   than `bgColor`.

## Related Resources

> **[Create Variants](/docs/capabilities/flags/create-flag-variant.md)**
>
> Add variants with values for your schema properties

> **[Create a Flag](/docs/capabilities/flags/create-flag.md)**
>
> Set up a new feature flag

> **[Flags Reference](/docs/capabilities/flags/create-flags.md)**
>
> Learn about flag schemas and configuration

> **[Define Flag Schema API](/docs/reference/api/how-to-guides/flags/define-flag-schema.md)**
>
> API reference for schemas
