---
title: "Create or update flag defaults for project"
method: PUT
path: "/api/v2/projects/{projectKey}/flag-defaults"
tags: ["Projects"]
---

# Create or update flag defaults for project

`PUT /api/v2/projects/{projectKey}/flag-defaults`

Create or update flag defaults for a project.

## Path parameters

- `projectKey` string, string, required — The project key

## Request body

- UpsertFlagDefaultsPayload
  - `tags` string[], required — A list of default tags for each flag
  - `temporary` boolean, required — Whether the flag should be temporary by default
  - `booleanDefaults` BooleanFlagDefaults, required
    - `trueDisplayName` string, required — The display name for the true variation, displayed in the LaunchDarkly user interface
    - `falseDisplayName` string, required — The display name for the false variation, displayed in the LaunchDarkly user interface
    - `trueDescription` string, required — The description for the true variation
    - `falseDescription` string, required — The description for the false variation
    - `onVariation` integer, required — The variation index of the flag variation to use for the default targeting behavior when a flag's targeting is on and the target did not match any rules
    - `offVariation` integer, required — The variation index of the flag variation to use for the default targeting behavior when a flag's targeting is off
  - `defaultClientSideAvailability` DefaultClientSideAvailability, required
    - `usingMobileKey` boolean, required — Whether to enable availability for mobile SDKs
    - `usingEnvironmentId` boolean, required — Whether to enable availability for client-side SDKs

## Response `200`

Flag default response

- UpsertPayloadRep
  - `_links` object — The location and content type of related resources
  - `tags` string[], required — A list of default tags for each flag
  - `temporary` boolean, required — Whether the flag should be temporary by default
  - `booleanDefaults` BooleanFlagDefaults, required
    - `trueDisplayName` string, required — The display name for the true variation, displayed in the LaunchDarkly user interface
    - `falseDisplayName` string, required — The display name for the false variation, displayed in the LaunchDarkly user interface
    - `trueDescription` string, required — The description for the true variation
    - `falseDescription` string, required — The description for the false variation
    - `onVariation` integer, required — The variation index of the flag variation to use for the default targeting behavior when a flag's targeting is on and the target did not match any rules
    - `offVariation` integer, required — The variation index of the flag variation to use for the default targeting behavior when a flag's targeting is off
  - `defaultClientSideAvailability` DefaultClientSideAvailability, required
    - `usingMobileKey` boolean, required — Whether to enable availability for mobile SDKs
    - `usingEnvironmentId` boolean, required — Whether to enable availability for client-side SDKs

## Other responses

- `400` — Invalid request
- `401` — Invalid access token
- `403` — Forbidden
- `404` — Invalid resource identifier
- `409` — Status conflict
- `429` — Rate limited

---

[API](https://skmtc.dev/launchdarkly/apis/launchdarkly-rest-api.md) · [All operations](https://skmtc.dev/launchdarkly/apis/launchdarkly-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/launchdarkly/launchdarkly-rest-api/revisions/69c5c9aafe78/schema)
