Skip to main content
After creating a flag, define its schema to specify what fields the flag value can contain.

Define the Schema

Set the schema on your flag:
Available schema types: boolSchema, stringSchema, intSchema, doubleSchema, listSchema, structSchema. See Variants for details on how schemas work.

Add Fields to an Existing Schema

To add new fields, include them in the schema:

Define a Nested Schema

Use structSchema for nested fields:

Define a List Schema

Use listSchema for array fields:

Remove a Field

To remove a field, first update all variants to remove that field, then update the schema:
The request will fail if any variant still uses the field you’re trying to remove.

Next Steps

After defining your schema:
  1. Create variants with values matching the schema
  2. Create segments to target audiences
  3. Create rules to assign variants