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

# Flags

> Reference documentation for flag schemas and variants in Confidence.

Flags let you remotely control the behavior in your application,
like a website or a mobile app.

## Flag Schema

Flags in Confidence don't just describe a boolean decision to enable or disable
a feature. Instead, flags have multiple properties that you use to control
multiple aspects of the experience. The flag schema defines the available
properties and their data type. The schema lets applications consume the flag
value while knowing what to expect.

Confidence supports the following data types in the schema:

| Type    | Description      | Example values               |
| :------ | :--------------- | :--------------------------- |
| String  | A string         | `"HELO"`                     |
| Integer | An integer       | `42`, `199932`               |
| Double  | A double         | `3.14`, `50.0`               |
| Boolean | Boolean          | `true`, `false`              |
| Struct  | Nested structure | `{ age: 23, country: "SE" }` |

## Variants

A variant is a named set of values for the properties of the flag. Workflows, like A/B tests and
rollouts, use variants to give users different experiences.

If a variant doesn't specify the value of a property, the SDK uses the
default value specified when a client resolves the flag.

Each variant displays a status badge to help you understand whether it's actively used:

* **In use**: At least one rule references the variant.
* **Unused**: No rule references the variant.

## Client Association

Not all clients should have access to all flags. For example, some
flags might be sensitive and should only be available to clients that are
running in an trusted environment.

Mobile apps and websites batch resolve flags to reduce the number of requests
made to Confidence. Associate a flag with as few clients as possible to limit
the number of resolved flags. Doing so also reduces costs.

## Permissions

You can manage access permissions for individual flags. Click **Permissions** at the top of the flag detail page to control who can view or edit the flag. Restricting access helps protect sensitive flags in larger teams.

When you share a flag, related resources like segments are automatically shared with the same permissions.

## Update History

Click **Updates** at the top of the flag detail page or **View updates** below the flag heading to see a chronological history of changes made to the flag. The update history shows who changed what and when, which helps with auditing and debugging.

## Flag Activity

The flag detail page sidebar shows information about flag usage.

### Resolves

The **Resolves** section in the sidebar displays a time-series chart of flag resolution activity. It shows how often clients resolve the flag over time. Use the **Day** and **Week** toggle to switch between daily and weekly views.

Use the resolves chart to:

* Monitor flag usage patterns
* Identify unused flags that you can archive
* Troubleshoot resolution issues

### Status

The **Status** section in the sidebar shows when the flag was last applied by a client (for example, "Last apply was 2 hours ago"). Use this to understand flag lifecycle and identify stale or actively used flags.

## Archive Flags

When a flag is no longer needed, you can archive it. Archiving a flag prevents
clients from resolving and using it.

## Related Resources

<CardGroup cols={2}>
  <Card title="Create a Flag" href="/docs/how-to-guides/create-flag">
    Step-by-step flag creation guide
  </Card>

  <Card title="Define Rules" href="/docs/flags/define-rules">
    Control how variants are assigned
  </Card>

  <Card title="Flag Quickstart" href="/docs/quickstarts/configure-flag">
    End-to-end flag setup tutorial
  </Card>

  <Card title="Manage Flag Permissions" href="/docs/how-to-guides/manage-flag-permissions">
    Control who can view or edit a flag
  </Card>

  <Card title="SDKs Reference" href="/docs/sdks/introduction">
    Integrate flags in your application
  </Card>
</CardGroup>
