LaunchDarkly

Feature flagging and experimentation platform

apidocs.launchdarkly.com ↗
Version
2.0
OpenAPI
3.0.3
Endpoints
259
Schemas
448
Updated
3 days ago
Developer tools feature-flags devops experimentation
Use this API in your AI agent

Query structured spec data via REST or MCP. Get exactly what your agent needs.

Get API Key

Server URLs

https://app.launchdarkly.com
https://app.launchdarkly.us

Authentication

apiKey

Endpoints

Clear filters

Access tokens 2 endpoints

POST /api/v2/tokens

Create a new access token.

operationId: AccessTokens_createNewToken

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/AccessTokenPost"
      },
      "example": {
        "role": "reader"
      }
    }
  },
  "required": true
}

Responses

201 Access token response
400 Invalid request
401 Invalid access token
403 Forbidden
429 Rate limited
POST /api/v2/tokens
POST /api/v2/tokens/{id}/reset

Reset an access token's secret key with an optional expiry time for the old key.

operationId: AccessTokens_resetSecretKey

Parameters

Name In Required Type Description
id path required string The ID of the access token to update
expiry query optional integer An expiration time for the old token key, expressed as a Unix epoch time in milliseconds. By default, the token will expire immediately.

Responses

200 Access token response
401 Invalid access token
403 Forbidden
404 Invalid resource identifier
429 Rate limited
POST /api/v2/tokens/{id}/reset

Account members 2 endpoints

POST /api/v2/members

Invite one or more new members to join an account. Each member is sent an invitation. Members with "admin" or "owner" roles may create new members, as well as anyone with a "createMember" permission for "member/\*". If a member cannot be invited, the entire request is rejected and no members are invited from that request. Each member _must_ have an `email` field and either a `role` or a `customRoles` field. If any of the fields are not populated correctly, the request is rejected with the reason specified in the "message" field of the response. Requests to create account members will not work if SCIM is enabled for the account. _No more than 50 members may be created per request._ A request may also fail because of conflicts with existing members. These conflicts are reported using the additional `code` and `invalid_emails` response fields with the following possible values for `code`: - **email_already_exists_in_account**: A member with this email address already exists in this account. - **email_taken_in_different_account**: A member with this email address exists in another account. - **duplicate_email**s: This request contains two or more members with the same email address. A request that fails for one of the above reasons returns an HTTP response code of 400 (Bad Request).

operationId: AccountMembers_inviteNewMembers

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/NewMemberFormListPost"
      }
    }
  },
  "required": true
}

Responses

201 Member collection response
400 Invalid request
401 Invalid access token
403 Forbidden
409 Status conflict
429 Rate limited
POST /api/v2/members
POST /api/v2/members/{id}/teams

Add one member to one or more teams.

operationId: AccountMembers_addToTeams

Parameters

Name In Required Type Description
id path required string The member ID

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/MemberTeamsPostInput"
      }
    }
  },
  "required": true
}

Responses

201 Member response
400 Invalid request
401 Invalid access token
403 Forbidden
404 Member not found
409 Status conflict
429 Rate limited
POST /api/v2/members/{id}/teams

Approvals 7 endpoints

POST /api/v2/approval-requests

Create an approval request. This endpoint currently supports creating an approval request for a flag across all environments with the following instructions: - `addVariation` - `removeVariation` - `updateVariation` - `updateDefaultVariation` For details on using these instructions, read [Update feature flag](https://apidocs.launchdarkly.com). To create an approval for a flag specific to an environment, use [Create approval request for a flag](https://apidocs.launchdarkly.com).

operationId: Approvals_createRequestFlag

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/createApprovalRequestRequest"
      }
    }
  },
  "required": true
}

Responses

201 Approval request response
400 Invalid request
401 Invalid access token
403 Forbidden
429 Rate limited
POST /api/v2/approval-requests
POST /api/v2/approval-requests/{id}/apply

Apply an approval request that has been approved.

operationId: Approvals_applyRequestFlag

Parameters

Name In Required Type Description
id path required string The feature flag approval request ID

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/postApprovalRequestApplyRequest"
      }
    }
  },
  "required": true
}

Responses

200 Approval request apply response
400 Invalid request
401 Invalid access token
403 Forbidden
404 Invalid resource identifier
429 Rate limited
POST /api/v2/approval-requests/{id}/apply
POST /api/v2/approval-requests/{id}/reviews

Review an approval request by approving or denying changes.

operationId: Approvals_reviewRequest

Parameters

Name In Required Type Description
id path required string The approval request ID

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/postApprovalRequestReviewRequest"
      }
    }
  },
  "required": true
}

Responses

200 Approval request review response
400 Invalid request
401 Invalid access token
404 Invalid resource identifier
405 Method not allowed
409 Status conflict
429 Rate limited
POST /api/v2/approval-requests/{id}/reviews
POST /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests

Create an approval request for a feature flag.

operationId: Approvals_createRequestFlag

Parameters

Name In Required Type Description
projectKey path required string The project key
featureFlagKey path required string The feature flag key
environmentKey path required string The environment key

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/createFlagConfigApprovalRequestRequest"
      }
    }
  },
  "required": true
}

Responses

201 Approval request response
400 Invalid request
401 Invalid access token
403 Forbidden
429 Rate limited
POST /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests
POST /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests-flag-copy

Create an approval request to copy a feature flag's configuration across environments.

operationId: Approvals_createFlagCopyRequest

Parameters

Name In Required Type Description
projectKey path required string The project key
featureFlagKey path required string The feature flag key
environmentKey path required string The environment key for the target environment

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/createCopyFlagConfigApprovalRequestRequest"
      }
    }
  },
  "required": true
}

Responses

201 Approval request response
400 Invalid request
401 Invalid access token
403 Forbidden
409 Status conflict
429 Rate limited
POST /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests-flag-copy
POST /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}/apply

Apply an approval request that has been approved.

operationId: Approvals_applyRequestFlag

Parameters

Name In Required Type Description
projectKey path required string The project key
featureFlagKey path required string The feature flag key
environmentKey path required string The environment key
id path required string The feature flag approval request ID

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/postApprovalRequestApplyRequest"
      }
    }
  },
  "required": true
}

Responses

200 Approval request apply response
400 Invalid request
401 Invalid access token
403 Forbidden
404 Invalid resource identifier
429 Rate limited
POST /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}/apply
POST /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}/reviews

Review an approval request by approving or denying changes.

operationId: Approvals_reviewFlagRequest

Parameters

Name In Required Type Description
projectKey path required string The project key
featureFlagKey path required string The feature flag key
environmentKey path required string The environment key
id path required string The feature flag approval request ID

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/postApprovalRequestReviewRequest"
      }
    }
  },
  "required": true
}

Responses

200 Approval request review response
400 Invalid request
401 Invalid access token
403 Forbidden
404 Invalid resource identifier
429 Rate limited
POST /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}/reviews

Code references 3 endpoints

POST /api/v2/code-refs/repositories

Create a repository with the specified name.

operationId: CodeReferences_createRepository

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/repositoryPost"
      }
    }
  },
  "required": true
}

Responses

200 Repository response
400 Invalid request
401 Invalid access token
403 Forbidden
409 Status conflict
429 Rate limited
POST /api/v2/code-refs/repositories
POST /api/v2/code-refs/repositories/{repo}/branch-delete-tasks

Asynchronously delete a number of branches.

operationId: CodeReferences_asynchronouslyDeleteBranches

Parameters

Name In Required Type Description
repo path required string The repository name to delete branches for.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/CodeReferencesAsynchronouslyDeleteBranchesRequest"
      },
      "example": [
        "branch-to-be-deleted",
        "another-branch-to-be-deleted"
      ]
    }
  },
  "required": true
}

Responses

200 Action succeeded
400 Invalid request
401 Invalid access token
403 Forbidden
404 Invalid resource identifier
429 Rate limited
POST /api/v2/code-refs/repositories/{repo}/branch-delete-tasks
POST /api/v2/code-refs/repositories/{repo}/branches/{branch}/extinction-events

Create a new extinction.

operationId: CodeReferences_createExtinction

Parameters

Name In Required Type Description
repo path required string The repository name
branch path required string The URL-encoded branch name

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ExtinctionListPost"
      }
    }
  },
  "required": true
}

Responses

200 Action succeeded
400 Invalid request
401 Invalid access token
403 Forbidden
404 Invalid resource identifier
429 Rate limited
POST /api/v2/code-refs/repositories/{repo}/branches/{branch}/extinction-events

Contexts 3 endpoints

POST /api/v2/projects/{projectKey}/environments/{environmentKey}/context-instances/search

Search for context instances. You can use either the query parameters or the request body parameters. If both are provided, there is an error. To learn more about the filter syntax, read [Filtering contexts and context instances](https://apidocs.launchdarkly.com). To learn more about context instances, read [Understanding context instances](https://docs.launchdarkly.com/home/contexts#understanding-context-instances).

operationId: Contexts_searchContextInstances

Parameters

Name In Required Type Description
projectKey path required string The project key
environmentKey path required string The environment key
limit query optional integer Specifies the maximum number of items in the collection to return (max: 50, default: 20)
continuationToken query optional string Limits results to context instances with sort values after the value specified. You can use this for pagination, however, we recommend using the `next` link we provide instead.
sort query optional string Specifies a field by which to sort. LaunchDarkly supports sorting by timestamp in ascending order by specifying `ts` for this value, or descending order by specifying `-ts`.
filter query optional string A comma-separated list of context filters. This endpoint only accepts an `applicationId` filter. To learn more about the filter syntax, read [Filtering contexts and context instances](https://apidocs.launchdarkly.com).
includeTotalCount query optional boolean Specifies whether to include or omit the total count of matching context instances. Defaults to true.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ContextInstanceSearch"
      }
    }
  },
  "required": true
}

Responses

200 Context instances collection response
400 Invalid request
401 Invalid access token
403 Forbidden
429 Rate limited
POST /api/v2/projects/{projectKey}/environments/{environmentKey}/context-instances/search
POST /api/v2/projects/{projectKey}/environments/{environmentKey}/contexts/search

Search for contexts. You can use either the query parameters or the request body parameters. If both are provided, there is an error. To learn more about the filter syntax, read [Filtering contexts and context instances](https://apidocs.launchdarkly.com). To learn more about contexts, read [Understanding contexts and context kinds](https://docs.launchdarkly.com/home/contexts#understanding-contexts-and-context-kinds).

operationId: Contexts_searchContexts

Parameters

Name In Required Type Description
projectKey path required string The project key
environmentKey path required string The environment key
limit query optional integer Specifies the maximum number of items in the collection to return (max: 50, default: 20)
continuationToken query optional string Limits results to contexts with sort values after the value specified. You can use this for pagination, however, we recommend using the `next` link we provide instead.
sort query optional string Specifies a field by which to sort. LaunchDarkly supports sorting by timestamp in ascending order by specifying `ts` for this value, or descending order by specifying `-ts`.
filter query optional string A comma-separated list of context filters. To learn more about the filter syntax, read [Filtering contexts and context instances](https://apidocs.launchdarkly.com).
includeTotalCount query optional boolean Specifies whether to include or omit the total count of matching contexts. Defaults to true.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ContextSearch"
      }
    }
  },
  "required": true
}

Responses

200 Contexts collection response
400 Invalid request
401 Invalid access token
403 Forbidden
429 Rate limited
POST /api/v2/projects/{projectKey}/environments/{environmentKey}/contexts/search
POST /api/v2/projects/{projectKey}/environments/{environmentKey}/flags/evaluate

Evaluate flags for a context instance, for example, to determine the expected flag variation. **Do not use this API instead of an SDK.** The LaunchDarkly SDKs are specialized for the tasks of evaluating feature flags in your application at scale and generating analytics events based on those evaluations. This API is not designed for that use case. Any evaluations you perform with this API will not be reflected in features such as flag statuses and flag insights. Context instances evaluated by this API will not appear in the Contexts list. To learn more, read [Comparing LaunchDarkly's SDKs and REST API](https://docs.launchdarkly.com/guide/api/comparing-sdk-rest-api). ### Filtering LaunchDarkly supports the `filter` query param for filtering, with the following fields: - `query` filters for a string that matches against the flags' keys and names. It is not case sensitive. For example: `filter=query equals dark-mode`. - `tags` filters the list to flags that have all of the tags in the list. For example: `filter=tags contains ["beta","q1"]`. You can also apply multiple filters at once. For example, setting `filter=query equals dark-mode, tags contains ["beta","q1"]` matches flags which match the key or name `dark-mode` and are tagged `beta` and `q1`.

operationId: Contexts_evaluateFlagsForContextInstance

Parameters

Name In Required Type Description
projectKey path required string The project key
environmentKey path required string The environment key
limit query optional integer The number of feature flags to return. Defaults to -1, which returns all flags
offset query optional integer Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`.
sort query optional string A comma-separated list of fields to sort by. Fields prefixed by a dash ( - ) sort in descending order
filter query optional string A comma-separated list of filters. Each filter is of the form `field operator value`. Supported fields are explained above.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ContextInstance"
      },
      "example": {
        "key": "user-key-123abc",
        "kind": "user",
        "otherAttribute": "other attribute value"
      }
    }
  },
  "required": true
}

Responses

200 Flag evaluation collection response
400 Invalid request
401 Invalid access token
403 Forbidden
404 Invalid resource identifier
429 Rate limited
POST /api/v2/projects/{projectKey}/environments/{environmentKey}/flags/evaluate

Custom roles 1 endpoints

POST /api/v2/roles

Create a new custom role

operationId: CustomRoles_createNewRole

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/CustomRolePost"
      },
      "example": {
        "key": "role-key-123abc",
        "name": "Ops team",
        "policy": [
          {
            "effect": "allow",
            "actions": [
              "updateOn"
            ],
            "resources": [
              "proj/*:env/production:flag/*"
            ]
          }
        ],
        "description": "An example role for members of the ops team",
        "basePermissions": "reader"
      }
    }
  },
  "required": true
}

Responses

201 Custom role response
400 Invalid request
401 Invalid access token
403 Forbidden
409 Status conflict
429 Rate limited
POST /api/v2/roles

Data export destinations 1 endpoints

POST /api/v2/destinations/{projectKey}/{environmentKey}

Create a new Data Export destination. In the `config` request body parameter, the fields required depend on the type of Data Export destination. <details> <summary>Click to expand <code>config</code> parameter details</summary> #### Azure Event Hubs To create a Data Export destination with a `kind` of `azure-event-hubs`, the `config` object requires the following fields: * `namespace`: The Event Hub Namespace name * `name`: The Event Hub name * `policyName`: The shared access signature policy name. You can find your policy name in the settings of your Azure Event Hubs Namespace. * `policyKey`: The shared access signature key. You can find your policy key in the settings of your Azure Event Hubs Namespace. #### Google Cloud Pub/Sub To create a Data Export destination with a `kind` of `google-pubsub`, the `config` object requires the following fields: * `project`: The Google PubSub project ID for the project to publish to * `topic`: The Google PubSub topic ID for the topic to publish to #### Amazon Kinesis To create a Data Export destination with a `kind` of `kinesis`, the `config` object requires the following fields: * `region`: The Kinesis stream's AWS region key * `roleArn`: The Amazon Resource Name (ARN) of the AWS role that will be writing to Kinesis * `streamName`: The name of the Kinesis stream that LaunchDarkly is sending events to. This is not the ARN of the stream. #### mParticle To create a Data Export destination with a `kind` of `mparticle`, the `config` object requires the following fields: * `apiKey`: The mParticle API key * `secret`: The mParticle API secret * `userIdentity`: The type of identifier you use to identify your end users in mParticle * `anonymousUserIdentity`: The type of identifier you use to identify your anonymous end users in mParticle #### Segment To create a Data Export destination with a `kind` of `segment`, the `config` object requires the following fields: * `writeKey`: The Segment write key. This is used to authenticate LaunchDarkly's calls to Segment. </details>

operationId: DataExportDestinations_createDestination

Parameters

Name In Required Type Description
projectKey path required string The project key
environmentKey path required string The environment key

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DestinationPost"
      },
      "example": {
        "kind": "google-pubsub",
        "config": {
          "topic": "ld-pubsub-test-192301",
          "project": "test-prod"
        }
      }
    }
  },
  "required": true
}

Responses

201 Destination response
400 Invalid request
401 Invalid access token
403 Forbidden
409 Status conflict
429 Rate limited
POST /api/v2/destinations/{projectKey}/{environmentKey}

Environments 3 endpoints

POST /api/v2/projects/{projectKey}/environments

> ### Approval settings > > The `approvalSettings` key is only returned when the Flag Approvals feature is enabled. > > You cannot update approval settings when creating new environments. Update approval settings with the PATCH Environment API. Create a new environment in a specified project with a given name, key, swatch color, and default TTL.

operationId: Environments_createNewEnvironment

Parameters

Name In Required Type Description
projectKey path required string The project key

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/EnvironmentPost"
      },
      "example": {
        "key": "environment-key-123abc",
        "name": "My Environment",
        "color": "DADBEE"
      }
    }
  },
  "required": true
}

Responses

201 Environment response
400 Invalid request
401 Invalid access token
403 Forbidden
404 Invalid resource identifier
409 Status conflict
429 Rate limited
POST /api/v2/projects/{projectKey}/environments
POST /api/v2/projects/{projectKey}/environments/{environmentKey}/apiKey

Reset an environment's SDK key with an optional expiry time for the old key.

operationId: Environments_resetSdkKey

Parameters

Name In Required Type Description
projectKey path required string The project key
environmentKey path required string The environment key
expiry query optional integer The time at which you want the old SDK key to expire, in UNIX milliseconds. By default, the key expires immediately. During the period between this call and the time when the old SDK key expires, both the old SDK key and the new SDK key will work.

Responses

200 Environment response
400 Invalid request
401 Invalid access token
403 Forbidden
404 Invalid resource identifier
409 Status conflict
429 Rate limited
POST /api/v2/projects/{projectKey}/environments/{environmentKey}/apiKey
POST /api/v2/projects/{projectKey}/environments/{environmentKey}/mobileKey

Reset an environment's mobile key. The optional expiry for the old key is deprecated for this endpoint, so the old key will always expire immediately.

operationId: Environments_resetMobileSdkKey

Parameters

Name In Required Type Description
projectKey path required string The project key
environmentKey path required string The environment key

Responses

200 Environment response
400 Invalid request
401 Invalid access token
403 Forbidden
404 Invalid resource identifier
409 Status conflict
429 Rate limited
POST /api/v2/projects/{projectKey}/environments/{environmentKey}/mobileKey

Experiments (beta) 2 endpoints

POST /api/v2/projects/{projectKey}/environments/{environmentKey}/experiments

Create an experiment. To run this experiment, you'll need to [create an iteration](https://apidocs.launchdarkly.com)#operation/createIteration) and then [update the experiment](https://apidocs.launchdarkly.com)#operation/patchExperiment) with the `startIteration` instruction. To learn more, read [Creating experiments](https://docs.launchdarkly.com/home/creating-experiments).

operationId: ExperimentsBeta_createNew

Parameters

Name In Required Type Description
projectKey path required string The project key
environmentKey path required string The environment key

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ExperimentPost"
      }
    }
  },
  "required": true
}

Responses

201 Experiment response
400 Invalid request
401 Invalid access token
403 Forbidden
404 Invalid resource identifier
429 Rate limited
POST /api/v2/projects/{projectKey}/environments/{environmentKey}/experiments
POST /api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey}/iterations

Create an experiment iteration. Experiment iterations let you record experiments in individual blocks of time. Initially, iterations are created with a status of `not_started` and appear in the `draftIteration` field of an experiment. To start or stop an iteration, [update the experiment](https://apidocs.launchdarkly.com)#operation/patchExperiment) with the `startIteration` or `stopIteration` instruction. To learn more, read [Starting experiment iterations](https://docs.launchdarkly.com/home/creating-experiments#starting-experiment-iterations).

operationId: ExperimentsBeta_createIteration

Parameters

Name In Required Type Description
projectKey path required string The project key
environmentKey path required string The environment key
experimentKey path required string The experiment key

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/IterationInput"
      }
    }
  },
  "required": true
}

Responses

200 Iteration response
400 Invalid request
401 Invalid access token
403 Forbidden
404 Invalid resource identifier
429 Rate limited
POST /api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey}/iterations

Feature flags 3 endpoints

POST /api/v2/flags/{projectKey}

Create a feature flag with the given name, key, and variations. <details> <summary>Click to expand instructions for <strong>creating a migration flag</strong></summary> ### Creating a migration flag When you create a migration flag, the variations are pre-determined based on the number of stages in the migration. To create a migration flag, omit the `variations` and `defaults` information. Instead, provide a `purpose` of `migration`, and `migrationSettings`. If you create a migration flag with six stages, `contextKind` is required. Otherwise, it should be omitted. Here's an example: ```json { "key": "flag-key-123", "purpose": "migration", "migrationSettings": { "stageCount": 6, "contextKind": "account" } } ``` To learn more, read [Migration Flags](https://docs.launchdarkly.com/home/flag-types/migration-flags). </details>

operationId: FeatureFlags_createFeatureFlag

Parameters

Name In Required Type Description
projectKey path required string The project key
clone query optional string The key of the feature flag to be cloned. The key identifies the flag in your code. For example, setting `clone=flagKey` copies the full targeting configuration for all environments, including `on/off` state, from the original flag to the new flag.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/FeatureFlagBody"
      },
      "example": {
        "key": "flag-key-123abc",
        "name": "My Flag",
        "clientSideAvailability": {
          "usingMobileKey": true,
          "usingEnvironmentId": true
        }
      }
    }
  },
  "required": true
}

Responses

201 Global flag response
400 Invalid request
401 Invalid access token
409 Status conflict
429 Rate limited
POST /api/v2/flags/{projectKey}
POST /api/v2/flags/{projectKey}/{featureFlagKey}/copy

> ### Copying flag settings is an Enterprise feature > > Copying flag settings is available to customers on an Enterprise plan. To learn more, [read about our pricing](https://launchdarkly.com/pricing/). To upgrade your plan, [contact Sales](https://launchdarkly.com/contact-sales/). Copy flag settings from a source environment to a target environment. By default, this operation copies the entire flag configuration. You can use the `includedActions` or `excludedActions` to specify that only part of the flag configuration is copied. If you provide the optional `currentVersion` of a flag, this operation tests to ensure that the current flag version in the environment matches the version you've specified. The operation rejects attempts to copy flag settings if the environment's current version of the flag does not match the version you've specified. You can use this to enforce optimistic locking on copy attempts.

operationId: FeatureFlags_copyFlagSettings

Parameters

Name In Required Type Description
projectKey path required string The project key
featureFlagKey path required string The feature flag key. The key identifies the flag in your code.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/FlagCopyConfigPost"
      },
      "example": {
        "source": {
          "key": "source-env-key-123abc",
          "currentVersion": 1
        },
        "target": {
          "key": "target-env-key-123abc",
          "currentVersion": 1
        },
        "comment": "optional comment"
      }
    }
  },
  "required": true
}

Responses

201 Global flag response
400 Invalid request
401 Invalid access token
405 Method not allowed
409 Status conflict
429 Rate limited
POST /api/v2/flags/{projectKey}/{featureFlagKey}/copy
POST /api/v2/projects/{projectKey}/flags/{flagKey}/environments/{environmentKey}/migration-safety-issues

Returns the migration safety issues that are associated with the POSTed flag patch. The patch must use the semantic patch format for updating feature flags.

operationId: FeatureFlagsBeta_getMigrationSafetyIssues

Parameters

Name In Required Type Description
projectKey path required string The project key
flagKey path required string The migration flag key
environmentKey path required string The environment key

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/flagSempatch"
      }
    }
  },
  "required": true
}

Responses

200 Migration safety issues found
204 No safety issues found
400 Invalid request
401 Invalid access token
403 Forbidden
404 Invalid resource identifier
429 Rate limited
503 Service unavailable
POST /api/v2/projects/{projectKey}/flags/{flagKey}/environments/{environmentKey}/migration-safety-issues

Flag triggers 1 endpoints

POST /api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}

Create a new flag trigger.

operationId: FlagTriggers_createTriggerWorkflow

Parameters

Name In Required Type Description
projectKey path required string The project key
environmentKey path required string The environment key
featureFlagKey path required string The feature flag key

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/triggerPost"
      }
    }
  },
  "required": true
}

Responses

201 Flag trigger response
400 Invalid request
401 Invalid access token
403 Forbidden
404 Invalid resource identifier
429 Rate limited
POST /api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}

Insights deployments (beta) 1 endpoints

POST /api/v2/engineering-insights/deployment-events

Create deployment event

operationId: InsightsDeploymentsBeta_createDeploymentEvent

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/PostDeploymentEventInput"
      }
    }
  },
  "required": true
}

Responses

201 Created
400 Invalid request
401 Invalid access token
403 Forbidden
404 Invalid resource identifier
429 Rate limited
POST /api/v2/engineering-insights/deployment-events

Insights scores (beta) 1 endpoints

POST /api/v2/engineering-insights/insights/group

Create insight group

operationId: InsightsScoresBeta_createInsightGroup

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/PostInsightGroupParams"
      }
    }
  },
  "required": true
}

Responses

201 Created
400 Invalid request
401 Invalid access token
403 Forbidden
404 Invalid resource identifier
409 Status conflict
429 Rate limited
POST /api/v2/engineering-insights/insights/group

Integration audit log subscriptions 1 endpoints

POST /api/v2/integrations/{integrationKey}

Create an audit log subscription.<br /><br />For each subscription, you must specify the set of resources you wish to subscribe to audit log notifications for. You can describe these resources using a custom role policy. To learn more, read [Custom role concepts](https://docs.launchdarkly.com/home/members/role-concepts).

operationId: IntegrationAuditLogSubscriptions_createSubscription

Parameters

Name In Required Type Description
integrationKey path required string The integration key

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/subscriptionPost"
      },
      "example": {
        "on": false,
        "name": "Example audit log subscription.",
        "tags": [
          "testing-tag"
        ],
        "config": {
          "url": "https://example.com",
          "optional": "an optional property",
          "required": "the required property"
        },
        "statements": [
          {
            "effect": "allow",
            "actions": [
              "*"
            ],
            "resources": [
              "proj/*:env/*:flag/*;testing-tag"
            ]
          }
        ]
      }
    }
  },
  "required": true
}

Responses

201 Integration response
400 Invalid request
401 Invalid access token
403 Forbidden
404 Invalid resource identifier
429 Rate limited
POST /api/v2/integrations/{integrationKey}

Integration delivery configurations (beta) 2 endpoints

POST /api/v2/integration-capabilities/featureStore/{projectKey}/{environmentKey}/{integrationKey}

Create a delivery configuration.

operationId: IntegrationDeliveryConfigurationsBeta_createDeliveryConfiguration

Parameters

Name In Required Type Description
projectKey path required string The project key
environmentKey path required string The environment key
integrationKey path required string The integration key

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/IntegrationDeliveryConfigurationPost"
      },
      "example": {
        "on": false,
        "name": "Sample integration",
        "tags": [
          "example-tag"
        ],
        "config": {
          "optional": "example value for optional formVariables property for sample-integration",
          "required": "example value for required formVariables property for sample-integration"
        }
      }
    }
  },
  "required": true
}

Responses

201 Integration delivery configuration response
400 Invalid request
401 Invalid access token
403 Forbidden
404 Invalid resource identifier
429 Rate limited
POST /api/v2/integration-capabilities/featureStore/{projectKey}/{environmentKey}/{integrationKey}
POST /api/v2/integration-capabilities/featureStore/{projectKey}/{environmentKey}/{integrationKey}/{id}/validate

Validate the saved delivery configuration, using the `validationRequest` in the integration's `manifest.json` file.

operationId: IntegrationDeliveryConfigurationsBeta_validateDeliveryConfiguration

Parameters

Name In Required Type Description
projectKey path required string The project key
environmentKey path required string The environment key
integrationKey path required string The integration key
id path required string The configuration ID

Responses

200 Integration delivery configuration validation response
400 Invalid request
401 Invalid access token
403 Forbidden
404 Invalid resource identifier
429 Rate limited
POST /api/v2/integration-capabilities/featureStore/{projectKey}/{environmentKey}/{integrationKey}/{id}/validate

Integrations (beta) 1 endpoints

POST /api/v2/integration-capabilities/big-segment-store/{projectKey}/{environmentKey}/{integrationKey}

Create a persistent store integration. If you are using server-side SDKs, segments synced from external tools and larger list-based segments require a persistent store within your infrastructure. LaunchDarkly keeps the persistent store up to date and consults it during flag evaluation. You can use either Redis or DynamoDB as your persistent store. When you create a persistent store integration, the fields in the `config` object in the request vary depending on which persistent store you use. If you are using Redis to create your persistent store integration, you will need to know: * Your Redis host * Your Redis port * Your Redis username * Your Redis password * Whether or not LaunchDarkly should connect using TLS If you are using DynamoDB to create your persistent store integration, you will need to know: * Your DynamoDB table name. The table must have the following schema: * Partition key: `namespace` (string) * Sort key: `key` (string) * Your DynamoDB Amazon Web Services (AWS) region. * Your AWS role Amazon Resource Name (ARN). This is the role that LaunchDarkly will assume to manage your DynamoDB table. * The External ID you specified when creating your Amazon Resource Name (ARN). To learn more, read [Segment configuration](https://docs.launchdarkly.com/home/segments/big-segment-configuration).

operationId: IntegrationsBeta_createPersistentStoreIntegration

Parameters

Name In Required Type Description
projectKey path required string The project key
environmentKey path required string The environment key
integrationKey path required string The integration key, either `redis` or `dynamodb`

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/IntegrationDeliveryConfigurationPost"
      },
      "example": {
        "on": false,
        "name": "Example persistent store integration",
        "tags": [
          "example-tag"
        ],
        "config": {
          "optional": "example value for optional formVariables property for sample-integration",
          "required": "example value for required formVariables property for sample-integration"
        }
      }
    }
  },
  "required": true
}

Responses

201 Big segment store response
400 Invalid request
401 Invalid access token
403 Forbidden
404 Environment or project not found
409 Status conflict
429 Rate limited
POST /api/v2/integration-capabilities/big-segment-store/{projectKey}/{environmentKey}/{integrationKey}

Metrics 1 endpoints

POST /api/v2/metrics/{projectKey}

Create a new metric in the specified project. The expected `POST` body differs depending on the specified `kind` property.

operationId: Metrics_createNewMetric

Parameters

Name In Required Type Description
projectKey path required string The project key

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/MetricPost"
      },
      "example": {
        "key": "metric-key-123abc",
        "kind": "custom",
        "eventKey": "trackedClick",
        "isActive": true,
        "isNumeric": false
      }
    }
  },
  "required": true
}

Responses

201 Metric response
400 Invalid request
401 Invalid access token
403 Forbidden
404 Invalid resource identifier
409 Status conflict
429 Rate limited
POST /api/v2/metrics/{projectKey}

Metrics (beta) 1 endpoints

POST /api/v2/projects/{projectKey}/metric-groups

Create a new metric group in the specified project

operationId: MetricsBeta_createMetricGroup

Parameters

Name In Required Type Description
projectKey path required string The project key

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/MetricGroupPost"
      }
    }
  },
  "required": true
}

Responses

201 Metric group response
400 Invalid request
401 Invalid access token
403 Forbidden
404 Invalid resource identifier
405 Method not allowed
429 Rate limited
POST /api/v2/projects/{projectKey}/metric-groups

Oauth2 clients 1 endpoints

POST /api/v2/oauth/clients

Create (register) a LaunchDarkly OAuth2 client. OAuth2 clients allow you to build custom integrations using LaunchDarkly as your identity provider.

operationId: OAuth2Clients_createClient

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/oauthClientPost"
      }
    }
  },
  "required": true
}

Responses

201 OAuth 2.0 client response
400 Invalid request
401 Invalid access token
403 Forbidden
POST /api/v2/oauth/clients

Projects 1 endpoints

POST /api/v2/projects

Create a new project with the given key and name. Project keys must be unique within an account.

operationId: Projects_createNewProject

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ProjectPost"
      },
      "example": {
        "key": "project-key-123abc",
        "name": "My Project"
      }
    }
  },
  "required": true
}

Responses

201 Project response
400 Invalid request
401 Invalid access token
403 Forbidden
409 Status conflict
429 Rate limited
POST /api/v2/projects

Relay proxy configurations 2 endpoints

POST /api/v2/account/relay-auto-configs

Create a Relay Proxy config.

operationId: RelayProxyConfigurations_createNewConfig

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/RelayAutoConfigPost"
      },
      "example": {
        "name": "Sample Relay Proxy config for all proj and env",
        "policy": [
          {
            "effect": "allow",
            "actions": [
              "*"
            ],
            "resources": [
              "proj/*:env/*"
            ]
          }
        ]
      }
    }
  },
  "required": true
}

Responses

201 Relay auto config response
400 Invalid request
401 Invalid access token
429 Rate limited
POST /api/v2/account/relay-auto-configs
POST /api/v2/account/relay-auto-configs/{id}/reset

Reset a Relay Proxy configuration's secret key with an optional expiry time for the old key.

operationId: RelayProxyConfigurations_resetSecretKeyWithExpiry

Parameters

Name In Required Type Description
id path required string The Relay Proxy configuration ID
expiry query optional integer An expiration time for the old Relay Proxy configuration key, expressed as a Unix epoch time in milliseconds. By default, the Relay Proxy configuration will expire immediately.

Responses

200 Relay auto config response
401 Invalid access token
403 Forbidden
404 Invalid resource identifier
429 Rate limited
POST /api/v2/account/relay-auto-configs/{id}/reset

Release pipelines (beta) 1 endpoints

POST /api/v2/projects/{projectKey}/release-pipelines

Creates a new release pipeline. The first release pipeline you create is automatically set as the default release pipeline for your project. To change the default release pipeline, use the [Update project](https://apidocs.launchdarkly.com) API to set the `defaultReleasePipelineKey`. You can create up to 20 release pipelines per project.

operationId: ReleasePipelinesBeta_createNewPipeline

Parameters

Name In Required Type Description
projectKey path required string The project key

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/CreateReleasePipelineInput"
      }
    }
  },
  "required": true
}

Responses

201 Release pipeline response
400 Invalid request
403 Forbidden
404 Invalid resource identifier
409 Status conflict
POST /api/v2/projects/{projectKey}/release-pipelines

Scheduled changes 1 endpoints

POST /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes

Create scheduled changes for a feature flag. If the `ignoreConficts` query parameter is false and there are conflicts between these instructions and existing scheduled changes, the request will fail. If the parameter is true and there are conflicts, the request will succeed.

operationId: ScheduledChanges_createWorkflow

Parameters

Name In Required Type Description
projectKey path required string The project key
featureFlagKey path required string The feature flag key
environmentKey path required string The environment key
ignoreConflicts query optional boolean Whether to succeed (`true`) or fail (`false`) when these instructions conflict with existing scheduled changes

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/PostFlagScheduledChangesInput"
      },
      "example": {
        "comment": "Optional comment describing the scheduled changes",
        "instructions": [
          {
            "kind": "turnFlagOn"
          }
        ],
        "executionDate": 1718467200000
      }
    }
  },
  "required": true
}

Responses

201 Scheduled changes response
400 Invalid request
401 Invalid access token
403 Forbidden
404 Invalid resource identifier
405 Method not allowed
409 Status conflict
429 Rate limited
POST /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes

Segments 4 endpoints

POST /api/v2/projects/{projectKey}/environments/{environmentKey}/segments/evaluate

For a given context instance with attributes, get membership details for all segments. In the request body, pass in the context instance.

operationId: Segments_evaluateSegmentMemberships

Parameters

Name In Required Type Description
projectKey path required string The project key
environmentKey path required string The environment key

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ContextInstance"
      },
      "example": {
        "key": "context-key-123abc",
        "kind": "user",
        "name": "Sandy",
        "address": {
          "city": "Springfield",
          "street": "123 Main Street"
        },
        "jobFunction": "doctor"
      }
    }
  },
  "required": true
}

Responses

200 Context instance segment membership collection response
400 Invalid request
401 Invalid access token
404 Invalid resource identifier
POST /api/v2/projects/{projectKey}/environments/{environmentKey}/segments/evaluate
POST /api/v2/segments/{projectKey}/{environmentKey}

Create a new segment.

operationId: Segments_createSegment

Parameters

Name In Required Type Description
projectKey path required string The project key
environmentKey path required string The environment key

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SegmentBody"
      }
    }
  },
  "required": true
}

Responses

201 Segment response
400 Invalid request
401 Invalid access token
403 Forbidden
404 Invalid resource identifier
429 Rate limited
POST /api/v2/segments/{projectKey}/{environmentKey}
POST /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/contexts

Update context targets included or excluded in a big segment. Big segments include larger list-based segments and synced segments. This operation does not support standard segments.

operationId: Segments_updateContextTargets

Parameters

Name In Required Type Description
projectKey path required string The project key
environmentKey path required string The environment key
segmentKey path required string The segment key

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SegmentUserState"
      }
    }
  },
  "required": true
}

Responses

204 Action succeeded
400 Invalid request
401 Invalid access token
404 Invalid resource identifier
429 Rate limited
POST /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/contexts
POST /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/users

Update user context targets included or excluded in a big segment. Big segments include larger list-based segments and synced segments. This operation does not support standard segments.

operationId: Segments_updateUserContextTargets

Parameters

Name In Required Type Description
projectKey path required string The project key
environmentKey path required string The environment key
segmentKey path required string The segment key

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SegmentUserState"
      }
    }
  },
  "required": true
}

Responses

204 Action succeeded
400 Invalid request
401 Invalid access token
404 Invalid resource identifier
429 Rate limited
POST /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/users

Segments (beta) 2 endpoints

POST /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/exports

Starts a new export process for a big segment. This is an export for a synced segment or a list-based segment that can include more than 15,000 entries.

operationId: SegmentsBeta_startBigSegmentExport

Parameters

Name In Required Type Description
projectKey path required string The project key
environmentKey path required string The environment key
segmentKey path required string The segment key

Responses

200 Action succeeded
400 Invalid request
401 Invalid access token
404 Invalid resource identifier
429 Rate limited
POST /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/exports
POST /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/imports

Start a new import process for a big segment. This is an import for a list-based segment that can include more than 15,000 entries.

operationId: SegmentsBeta_startBigSegmentImport

Parameters

Name In Required Type Description
projectKey path required string The project key
environmentKey path required string The environment key
segmentKey path required string The segment key

Request Body

{
  "content": {
    "multipart/form-data": {
      "schema": {
        "$ref": "#/components/schemas/SegmentsBetaStartBigSegmentImportRequest"
      }
    }
  },
  "required": true
}

Responses

204 Import request submitted successfully
400 Invalid request
401 Invalid access token
404 Invalid resource identifier
409 Conflicting process
429 Rate limited
POST /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/imports

Teams 2 endpoints

POST /api/v2/teams

Create a team. To learn more, read [Creating a team](https://docs.launchdarkly.com/home/teams/creating). ### Expanding the teams response LaunchDarkly supports four fields for expanding the "Create team" response. By default, these fields are **not** included in the response. To expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields: * `members` includes the total count of members that belong to the team. * `roles` includes a paginated list of the custom roles that you have assigned to the team. * `projects` includes a paginated list of the projects that the team has any write access to. * `maintainers` includes a paginated list of the maintainers that you have assigned to the team. For example, `expand=members,roles` includes the `members` and `roles` fields in the response.

operationId: Teams_createTeam

Parameters

Name In Required Type Description
expand query optional string A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/teamPostInput"
      },
      "example": {
        "key": "team-key-123abc",
        "name": "Example team",
        "memberIDs": [
          "12ab3c45de678910fgh12345"
        ],
        "description": "An example team",
        "customRoleKeys": [
          "example-role1",
          "example-role2"
        ]
      }
    }
  },
  "required": true
}

Responses

201 Teams response
400 Invalid request
401 Invalid access token
405 Method not allowed
429 Rate limited
POST /api/v2/teams
POST /api/v2/teams/{teamKey}/members

Add multiple members to an existing team by uploading a CSV file of member email addresses. Your CSV file must include email addresses in the first column. You can include data in additional columns, but LaunchDarkly ignores all data outside the first column. Headers are optional. To learn more, read [Managing team members](https://docs.launchdarkly.com/home/teams/managing#managing-team-members). **Members are only added on a `201` response.** A `207` indicates the CSV file contains a combination of valid and invalid entries. A `207` results in no members being added to the team. On a `207` response, if an entry contains bad input, the `message` field contains the row number as well as the reason for the error. The `message` field is omitted if the entry is valid. Example `207` response: ```json { "items": [ { "status": "success", "value": "new-team-member@acme.com" }, { "message": "Line 2: empty row", "status": "error", "value": "" }, { "message": "Line 3: email already exists in the specified team", "status": "error", "value": "existing-team-member@acme.com" }, { "message": "Line 4: invalid email formatting", "status": "error", "value": "invalid email format" } ] } ``` Message | Resolution --- | --- Empty row | This line is blank. Add an email address and try again. Duplicate entry | This email address appears in the file twice. Remove the email from the file and try again. Email already exists in the specified team | This member is already on your team. Remove the email from the file and try again. Invalid formatting | This email address is not formatted correctly. Fix the formatting and try again. Email does not belong to a LaunchDarkly member | The email address doesn't belong to a LaunchDarkly account member. Invite them to LaunchDarkly, then re-add them to the team. On a `400` response, the `message` field may contain errors specific to this endpoint. Example `400` response: ```json { "code": "invalid_request", "message": "Unable to process file" } ``` Message | Resolution --- | --- Unable to process file | LaunchDarkly could not process the file for an unspecified reason. Review your file for errors and try again. File exceeds 25mb | Break up your file into multiple files of less than 25mbs each. All emails have invalid formatting | None of the email addresses in the file are in the correct format. Fix the formatting and try again. All emails belong to existing team members | All listed members are already on this team. Populate the file with member emails that do not belong to the team and try again. File is empty | The CSV file does not contain any email addresses. Populate the file and try again. No emails belong to members of your LaunchDarkly organization | None of the email addresses belong to members of your LaunchDarkly account. Invite these members to LaunchDarkly, then re-add them to the team.

operationId: Teams_addMultipleMembersToTeam

Parameters

Name In Required Type Description
teamKey path required string The team key

Request Body

{
  "content": {
    "multipart/form-data": {
      "schema": {
        "$ref": "#/components/schemas/TeamsAddMultipleMembersToTeamRequest"
      }
    }
  },
  "required": true
}

Responses

201 Team member imports response
207 Partial Success
400 Invalid request
401 Invalid access token
405 Method not allowed
429 Rate limited
POST /api/v2/teams/{teamKey}/members

Webhooks 1 endpoints

POST /api/v2/webhooks

Create a new webhook.

operationId: Webhooks_createNewWebhook

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/webhookPost"
      },
      "example": {
        "on": true,
        "url": "https://example.com",
        "name": "apidocs test webhook",
        "sign": false,
        "tags": [
          "example-tag"
        ],
        "statements": [
          {
            "effect": "allow",
            "actions": [
              "*"
            ],
            "resources": [
              "proj/test"
            ]
          }
        ]
      }
    }
  },
  "required": true
}

Responses

200 Webhook response
400 Invalid request
401 Invalid access token
403 Forbidden
429 Rate limited
POST /api/v2/webhooks

Workflow templates 1 endpoints

POST /api/v2/templates

Create a template for a feature flag workflow

operationId: WorkflowTemplates_createFeatureFlagTemplate

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/CreateWorkflowTemplateInput"
      }
    }
  },
  "required": true
}

Responses

201 Workflow template response JSON
400 Invalid request
401 Invalid access token
403 Forbidden
429 Rate limited
POST /api/v2/templates

Workflows 1 endpoints

POST /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/workflows

Create a workflow for a feature flag. You can create a workflow directly, or you can apply a template to create a new workflow. ### Creating a workflow You can use the create workflow endpoint to create a workflow directly by adding a `stages` array to the request body. For each stage, define the `name`, `conditions` when the stage should be executed, and `action` that describes the stage. <details> <summary>Click to expand example</summary> _Example request body_ ```json { "name": "Progressive rollout starting in two days", "description": "Turn flag targeting on and increase feature rollout in 10% increments each day", "stages": [ { "name": "10% rollout on day 1", "conditions": [ { "kind": "schedule", "scheduleKind": "relative", // or "absolute" // If "scheduleKind" is "absolute", set "executionDate"; // "waitDuration" and "waitDurationUnit" will be ignored "waitDuration": 2, "waitDurationUnit": "calendarDay" }, { "kind": "ld-approval", "notifyMemberIds": [ "507f1f77bcf86cd799439011" ], "notifyTeamKeys": [ "team-key-123abc" ] } ], "action": { "instructions": [ { "kind": "turnFlagOn" }, { "kind": "updateFallthroughVariationOrRollout", "rolloutWeights": { "452f5fb5-7320-4ba3-81a1-8f4324f79d49": 90000, "fc15f6a4-05d3-4aa4-a997-446be461345d": 10000 } } ] } } ] } ``` </details> ### Creating a workflow by applying a workflow template You can also create a workflow by applying a workflow template. If you pass a valid workflow template key as the `templateKey` query parameter with the request, the API will attempt to create a new workflow with the stages defined in the workflow template with the corresponding key. #### Applicability of stages Templates are created in the context of a particular flag in a particular environment in a particular project. However, because workflows created from a template can be applied to any project, environment, and flag, some steps of the workflow may need to be updated in order to be applicable for the target resource. You can pass a `dryRun` query parameter to tell the API to return a report of which steps of the workflow template are applicable in the target project/environment/flag, and which will need to be updated. When the `dryRun` query parameter is present the response body includes a `meta` property that holds a list of parameters that could potentially be inapplicable for the target resource. Each of these parameters will include a `valid` field. You will need to update any invalid parameters in order to create the new workflow. You can do this using the `parameters` property, which overrides the workflow template parameters. #### Overriding template parameters You can use the `parameters` property in the request body to tell the API to override the specified workflow template parameters with new values that are specific to your target project/environment/flag. <details> <summary>Click to expand example</summary> _Example request body_ ```json { "name": "workflow created from my-template", "description": "description of my workflow", "parameters": [ { "_id": "62cf2bc4cadbeb7697943f3b", "path": "/clauses/0/values", "default": { "value": ["updated-segment"] } }, { "_id": "62cf2bc4cadbeb7697943f3d", "path": "/variationId", "default": { "value": "abcd1234-abcd-1234-abcd-1234abcd12" } } ] } ``` </details> If there are any steps in the template that are not applicable to the target resource, the workflow will not be created, and the `meta` property will be included in the response body detailing which parameters need to be updated.

operationId: Workflows_createWorkflow

Parameters

Name In Required Type Description
templateKey query optional string The template key to apply as a starting point for the new workflow
dryRun query optional boolean Whether to call the endpoint in dry-run mode
projectKey path required string The project key
featureFlagKey path required string The feature flag key
environmentKey path required string The environment key

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/CustomWorkflowInput"
      },
      "example": {
        "name": "Progressive rollout starting in two days",
        "stages": [
          {
            "name": "10% rollout on day 1",
            "action": {
              "instructions": [
                {
                  "kind": "turnFlagOn"
                },
                {
                  "kind": "updateFallthroughVariationOrRollout",
                  "rolloutWeights": {
                    "452f5fb5-7320-4ba3-81a1-8f4324f79d49": 90000,
                    "fc15f6a4-05d3-4aa4-a997-446be461345d": 10000
                  }
                }
              ]
            },
            "conditions": [
              {
                "kind": "schedule",
                "scheduleKind": "relative",
                "waitDuration": 2,
                "waitDurationUnit": "calendarDay"
              }
            ]
          }
        ],
        "description": "Turn flag on for 10% of customers each day"
      }
    }
  },
  "required": true
}

Responses

201 Workflow response
400 Invalid request
401 Invalid access token
403 Forbidden
404 Invalid resource identifier
429 Rate limited
POST /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/workflows

Schemas

object Access
{
  "type": "object",
  "required": [
    "denied",
    "allowed"
  ],
  "properties": {
    "denied": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/AccessDenied"
      }
    },
    "allowed": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/AccessAllowedRep"
      }
    }
  }
}
object AccessAllowedReason
{
  "type": "object",
  "required": [
    "effect"
  ],
  "properties": {
    "effect": {
      "enum": [
        "allow",
        "deny"
      ],
      "type": "string",
      "example": "allow",
      "description": "Whether this statement should allow or deny actions on the resources."
    },
    "actions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ActionSpecifier"
      },
      "example": [
        "*"
      ],
      "description": "Actions to perform on a resource"
    },
    "resources": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "proj/*:env/*;qa_*:/flag/*"
      ],
      "description": "Resource specifier strings"
    },
    "role_name": {
      "type": "string"
    },
    "notActions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ActionSpecifier"
      },
      "description": "Targeted actions are the actions NOT in this list. The <code>actions</code> and <code>notResources</code> fields must be empty to use this field."
    },
    "notResources": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Targeted resources are the resources NOT in this list. The <code>resources</code> and <code>notActions</code> fields must be empty to use this field."
    }
  }
}
object AccessAllowedRep
{
  "type": "object",
  "required": [
    "action",
    "reason"
  ],
  "properties": {
    "action": {
      "$ref": "#/components/schemas/ActionIdentifier"
    },
    "reason": {
      "$ref": "#/components/schemas/AccessAllowedReason"
    }
  }
}
object AccessDenied
{
  "type": "object",
  "required": [
    "action",
    "reason"
  ],
  "properties": {
    "action": {
      "$ref": "#/components/schemas/ActionIdentifier"
    },
    "reason": {
      "$ref": "#/components/schemas/AccessDeniedReason"
    }
  }
}
object AccessDeniedReason
{
  "type": "object",
  "required": [
    "effect"
  ],
  "properties": {
    "effect": {
      "enum": [
        "allow",
        "deny"
      ],
      "type": "string",
      "example": "allow",
      "description": "Whether this statement should allow or deny actions on the resources."
    },
    "actions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ActionSpecifier"
      },
      "example": [
        "*"
      ],
      "description": "Actions to perform on a resource"
    },
    "resources": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "proj/*:env/*;qa_*:/flag/*"
      ],
      "description": "Resource specifier strings"
    },
    "role_name": {
      "type": "string"
    },
    "notActions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ActionSpecifier"
      },
      "description": "Targeted actions are the actions NOT in this list. The <code>actions</code> and <code>notResources</code> fields must be empty to use this field."
    },
    "notResources": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Targeted resources are the resources NOT in this list. The <code>resources</code> and <code>notActions</code> fields must be empty to use this field."
    }
  }
}
object AccessTokenPost
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "A human-friendly name for the access token"
    },
    "role": {
      "enum": [
        "reader",
        "writer",
        "admin"
      ],
      "type": "string",
      "description": "Built-in role for the token"
    },
    "inlineRole": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StatementPost"
      },
      "description": "A JSON array of statements represented as JSON objects with three attributes: effect, resources, actions. May be used in place of a built-in or custom role."
    },
    "description": {
      "type": "string",
      "description": "A description for the access token"
    },
    "serviceToken": {
      "type": "boolean",
      "description": "Whether the token is a service token https://docs.launchdarkly.com/home/account-security/api-access-tokens#service-tokens"
    },
    "customRoleIds": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "A list of custom role IDs to use as access limits for the access token"
    },
    "defaultApiVersion": {
      "type": "integer",
      "description": "The default API version for this token"
    }
  }
}
string ActionIdentifier
{
  "type": "string"
}
object ActionInput
{
  "type": "object",
  "properties": {
    "instructions": {
      "example": "{\"instructions\": [{ \"kind\": \"turnFlagOn\"}]}",
      "description": "An array of instructions for the stage. Each object in the array uses the semantic patch format for updating a feature flag."
    }
  }
}
object ActionOutput
{
  "type": "object",
  "required": [
    "kind",
    "instructions"
  ],
  "properties": {
    "kind": {
      "type": "string",
      "example": "patch",
      "description": "The type of action for this stage"
    },
    "instructions": {
      "$ref": "#/components/schemas/Instructions",
      "example": "[{\"kind\": \"turnFlagOn\"}]",
      "description": "An array of instructions for the stage. Each object in the array uses the semantic patch format for updating a feature flag."
    }
  }
}
string ActionSpecifier
{
  "type": "string"
}
object AllVariationsSummary
{
  "type": "object",
  "additionalProperties": {
    "$ref": "#/components/schemas/VariationSummary"
  }
}
object ApplicationCollectionRep
{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ApplicationRep"
      },
      "description": "A list of applications"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "totalCount": {
      "type": "integer",
      "example": 1,
      "description": "The number of applications"
    }
  }
}
object ApplicationFlagCollectionRep
{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/FlagListingRep"
      },
      "description": "A list of the flags that have been evaluated by the application"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "totalCount": {
      "type": "integer",
      "example": 1,
      "description": "The number of flags that have been evaluated by the application"
    }
  }
}
object ApplicationRep
{
  "type": "object",
  "required": [
    "autoAdded",
    "key",
    "kind",
    "name"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "com.launchdarkly.cafe",
      "description": "The unique identifier of this application"
    },
    "kind": {
      "enum": [
        "browser",
        "mobile",
        "server"
      ],
      "type": "string",
      "example": "mobile",
      "description": "To distinguish the kind of application"
    },
    "name": {
      "type": "string",
      "example": "LaunchDarklyCafe",
      "description": "The name of the application"
    },
    "flags": {
      "$ref": "#/components/schemas/ApplicationFlagCollectionRep",
      "description": "Details about the flags that have been evaluated by the application"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "_access": {
      "$ref": "#/components/schemas/Access",
      "description": "Details on the allowed and denied actions for this application"
    },
    "_version": {
      "type": "integer",
      "description": "Version of the application"
    },
    "autoAdded": {
      "type": "boolean",
      "example": true,
      "description": "Whether the application was automatically created because it was included in a context when a LaunchDarkly SDK evaluated a feature flag, or was created through the LaunchDarkly UI or REST API."
    },
    "_maintainer": {
      "$ref": "#/components/schemas/MaintainerRep",
      "description": "Associated maintainer member or team info for the application"
    },
    "description": {
      "type": "string",
      "example": "The LaunchDarkly Cafe app",
      "description": "The application description"
    },
    "creationDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1654104600000",
      "description": "Timestamp of when the application version was created"
    }
  }
}
object ApplicationVersionRep
{
  "type": "object",
  "required": [
    "autoAdded",
    "key",
    "name"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "2",
      "description": "The unique identifier of this application version"
    },
    "name": {
      "type": "string",
      "example": "01.02.03",
      "description": "The name of this version"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "_access": {
      "$ref": "#/components/schemas/Access",
      "description": "Details on the allowed and denied actions for this application version"
    },
    "_version": {
      "type": "integer",
      "description": "Version of the application version"
    },
    "autoAdded": {
      "type": "boolean",
      "example": true,
      "description": "Whether the application version was automatically created, because it was included in a context when a LaunchDarkly SDK evaluated a feature flag, or if the application version was created through the LaunchDarkly UI or REST API. "
    },
    "supported": {
      "type": "boolean",
      "example": true,
      "description": "Whether this version is supported. Only applicable if the application <code>kind</code> is <code>mobile</code>."
    },
    "creationDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1654104600000",
      "description": "Timestamp of when the application version was created"
    }
  }
}
object ApplicationVersionsCollectionRep
{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ApplicationVersionRep"
      },
      "description": "A list of the versions for this application"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "totalCount": {
      "type": "integer",
      "example": 1,
      "description": "The number of versions for this application"
    }
  }
}
object ApprovalRequestResponse
{
  "type": "object",
  "required": [
    "_id",
    "_version",
    "creationDate",
    "serviceKind",
    "reviewStatus",
    "allReviews",
    "notifyMemberIds",
    "status",
    "instructions",
    "conflicts",
    "_links"
  ],
  "properties": {
    "_id": {
      "type": "string",
      "example": "12ab3c45de678910abc12345",
      "description": "The ID of this approval request"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {}
    },
    "source": {
      "$ref": "#/components/schemas/CopiedFromEnv",
      "description": "Details about the source feature flag, if copied"
    },
    "status": {
      "enum": [
        "pending",
        "completed",
        "failed",
        "scheduled"
      ],
      "type": "string",
      "example": "pending",
      "description": "Current status of the approval request"
    },
    "_version": {
      "type": "integer",
      "example": 1,
      "description": "Version of the approval request"
    },
    "conflicts": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Conflict"
      },
      "description": "Details on any conflicting approval requests"
    },
    "allReviews": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ReviewResponse"
      },
      "description": "An array of individual reviews of this approval request"
    },
    "resourceId": {
      "type": "string",
      "description": "String representation of a resource"
    },
    "appliedDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1654104600000",
      "description": "Timestamp of when the approval request was applied"
    },
    "description": {
      "type": "string",
      "example": "example: request approval from someone",
      "description": "A human-friendly name for the approval request"
    },
    "requestorId": {
      "type": "string",
      "example": "12ab3c45de678910abc12345",
      "description": "The ID of the member who requested the approval"
    },
    "serviceKind": {
      "$ref": "#/components/schemas/ApprovalRequestServiceKind",
      "example": "launchdarkly",
      "description": "The approval service for this request. May be LaunchDarkly or an external approval service, such as ServiceNow or JIRA."
    },
    "creationDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1654104600000",
      "description": "Timestamp of when the approval request was created"
    },
    "instructions": {
      "$ref": "#/components/schemas/Instructions",
      "example": "[{\"kind\": \"turnFlagOn\"}]",
      "description": "List of instructions in semantic patch format to be applied to the feature flag"
    },
    "reviewStatus": {
      "enum": [
        "approved",
        "declined",
        "pending"
      ],
      "type": "string",
      "example": "pending",
      "description": "Current status of the review of this approval request"
    },
    "executionDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1654104600000",
      "description": "Timestamp for when instructions will be executed"
    },
    "operatingOnId": {
      "type": "string",
      "example": "12ab3c45de678910abc12345",
      "description": "ID of scheduled change to edit or delete"
    },
    "notifyMemberIds": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "1234a56b7c89d012345e678f"
      ],
      "description": "An array of member IDs. These members are notified to review the approval request."
    },
    "approvalSettings": {
      "$ref": "#/components/schemas/ApprovalSettings",
      "description": "The settings for this approval"
    },
    "appliedByMemberId": {
      "type": "string",
      "example": "1234a56b7c89d012345e678f",
      "description": "The member ID of the member who applied the approval request"
    },
    "integrationMetadata": {
      "$ref": "#/components/schemas/IntegrationMetadata",
      "description": "Details about the object in an external service corresponding to this approval request, such as a ServiceNow change request or a JIRA ticket, if an external approval service is being used"
    },
    "customWorkflowMetadata": {
      "$ref": "#/components/schemas/CustomWorkflowMeta",
      "description": "Details about the custom workflow, if this approval request is part of a custom workflow"
    },
    "appliedByServiceTokenId": {
      "type": "string",
      "example": "1234a56b7c89d012345e678f",
      "description": "The service token ID of the service token which applied the approval request"
    }
  }
}
string ApprovalRequestServiceKind
{
  "type": "string"
}
object ApprovalSettings
{
  "type": "object",
  "required": [
    "required",
    "bypassApprovalsForPendingChanges",
    "minNumApprovals",
    "canReviewOwnRequest",
    "canApplyDeclinedChanges",
    "serviceKind",
    "serviceConfig",
    "requiredApprovalTags"
  ],
  "properties": {
    "required": {
      "type": "boolean",
      "example": true,
      "description": "If approvals are required for this environment"
    },
    "serviceKind": {
      "type": "string",
      "example": "launchdarkly",
      "description": "Which service to use for managing approvals"
    },
    "serviceConfig": {
      "type": "object",
      "example": {},
      "additionalProperties": {}
    },
    "minNumApprovals": {
      "type": "integer",
      "example": 1,
      "description": "Sets the amount of approvals required before a member can apply a change. The minimum is one and the maximum is five."
    },
    "canReviewOwnRequest": {
      "type": "boolean",
      "example": false,
      "description": "Allow someone who makes an approval request to apply their own change"
    },
    "requiredApprovalTags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "require-approval"
      ],
      "description": "Require approval only on flags with the provided tags. Otherwise all flags will require approval."
    },
    "canApplyDeclinedChanges": {
      "type": "boolean",
      "example": true,
      "description": "Allow applying the change as long as at least one person has approved"
    },
    "bypassApprovalsForPendingChanges": {
      "type": "boolean",
      "example": false,
      "description": "Whether to skip approvals for pending changes"
    }
  }
}
object Audience
{
  "type": "object",
  "required": [
    "environment",
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "example": "Phase 1 - Testing",
      "description": "The release phase name"
    },
    "environment": {
      "$ref": "#/components/schemas/EnvironmentSummary",
      "description": "Details about the environment"
    }
  }
}
object AudiencePost
{
  "type": "object",
  "required": [
    "environmentKey",
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "The audience name"
    },
    "environmentKey": {
      "type": "string",
      "description": "A project-unique key for the environment."
    }
  }
}
array Audiences
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/Audience"
  }
}
object AuditLogEntryListingRep
{
  "type": "object",
  "required": [
    "_links",
    "_id",
    "_accountId",
    "date",
    "accesses",
    "kind",
    "name",
    "description",
    "shortDescription"
  ],
  "properties": {
    "_id": {
      "type": "string",
      "example": "1234a56b7c89d012345e678f",
      "description": "The ID of the audit log entry"
    },
    "app": {
      "$ref": "#/components/schemas/AuthorizedAppDataRep",
      "description": "Details of the authorized application that initiated the action described in the audit log entry"
    },
    "date": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1654104600000",
      "description": "Timestamp of the audit log entry"
    },
    "kind": {
      "$ref": "#/components/schemas/ResourceKind",
      "example": "flag",
      "description": "The type of resource this audit log entry refers to"
    },
    "name": {
      "type": "string",
      "example": "Example feature flag",
      "description": "The name of the resource this audit log entry refers to"
    },
    "title": {
      "type": "string",
      "description": "A description of what occurred, in the format <code>member</code> <code>titleVerb</code> <code>target</code>"
    },
    "token": {
      "$ref": "#/components/schemas/TokenSummary",
      "description": "Details of the access token that initiated the action described in the audit log entry"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "member": {
      "$ref": "#/components/schemas/MemberDataRep",
      "description": "Details of the member who initiated the action described in the audit log entry"
    },
    "parent": {
      "$ref": "#/components/schemas/ParentResourceRep"
    },
    "target": {
      "$ref": "#/components/schemas/TargetResourceRep",
      "example": "[Ariel Flores](mailto:ariel@acme.com) turned on the flag [example-flag](https://app.launchdarkly.com/example-project/production/features/example-flag) in Production",
      "description": "Details of the resource acted upon in this audit log entry"
    },
    "comment": {
      "type": "string",
      "example": "This is an automated test",
      "description": "Optional comment for the audit log entry"
    },
    "subject": {
      "$ref": "#/components/schemas/SubjectDataRep",
      "description": "Details of the subject who initiated the action described in the audit log entry"
    },
    "accesses": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ResourceAccess"
      },
      "description": "Details on the actions performed and resources acted on in this audit log entry"
    },
    "titleVerb": {
      "type": "string",
      "example": "turned on the flag",
      "description": "The action and resource recorded in this audit log entry"
    },
    "_accountId": {
      "type": "string",
      "example": "1234a56b7c89d012345e678f",
      "description": "The ID of the account to which this audit log entry belongs"
    },
    "description": {
      "type": "string",
      "example": "Example, turning on the flag for testing",
      "description": "Description of the change recorded in the audit log entry"
    },
    "shortDescription": {
      "type": "string",
      "example": "Example, turning on the flag",
      "description": "Shorter version of the change recorded in the audit log entry"
    }
  }
}
object AuditLogEntryListingRepCollection
{
  "type": "object",
  "required": [
    "items",
    "_links"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/AuditLogEntryListingRep"
      },
      "description": "An array of audit log entries"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    }
  }
}
object AuditLogEntryRep
{
  "type": "object",
  "required": [
    "_links",
    "_id",
    "_accountId",
    "date",
    "accesses",
    "kind",
    "name",
    "description",
    "shortDescription"
  ],
  "properties": {
    "_id": {
      "type": "string",
      "example": "1234a56b7c89d012345e678f",
      "description": "The ID of the audit log entry"
    },
    "app": {
      "$ref": "#/components/schemas/AuthorizedAppDataRep",
      "description": "Details of the authorized application that initiated the action described in the audit log entry"
    },
    "date": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1654104600000",
      "description": "Timestamp of the audit log entry"
    },
    "kind": {
      "$ref": "#/components/schemas/ResourceKind",
      "example": "flag",
      "description": "The type of resource this audit log entry refers to"
    },
    "name": {
      "type": "string",
      "example": "Example feature flag",
      "description": "The name of the resource this audit log entry refers to"
    },
    "delta": {
      "description": "If the audit log entry has been updated, this is the JSON patch body that was used in the request to update the entity"
    },
    "merge": {
      "description": "A JSON representation of the merge information for this audit log entry, if any"
    },
    "title": {
      "type": "string",
      "description": "A description of what occurred, in the format <code>member</code> <code>titleVerb</code> <code>target</code>"
    },
    "token": {
      "$ref": "#/components/schemas/TokenSummary",
      "description": "Details of the access token that initiated the action described in the audit log entry"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "member": {
      "$ref": "#/components/schemas/MemberDataRep",
      "description": "Details of the member who initiated the action described in the audit log entry"
    },
    "parent": {
      "$ref": "#/components/schemas/ParentResourceRep"
    },
    "target": {
      "$ref": "#/components/schemas/TargetResourceRep",
      "example": "[Ariel Flores](mailto:ariel@acme.com) turned on the flag [example-flag](https://app.launchdarkly.com/example-project/production/features/example-flag) in Production",
      "description": "Details of the resource acted upon in this audit log entry"
    },
    "comment": {
      "type": "string",
      "example": "This is an automated test",
      "description": "Optional comment for the audit log entry"
    },
    "subject": {
      "$ref": "#/components/schemas/SubjectDataRep",
      "description": "Details of the subject who initiated the action described in the audit log entry"
    },
    "accesses": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ResourceAccess"
      },
      "description": "Details on the actions performed and resources acted on in this audit log entry"
    },
    "titleVerb": {
      "type": "string",
      "example": "turned on the flag",
      "description": "The action and resource recorded in this audit log entry"
    },
    "_accountId": {
      "type": "string",
      "example": "1234a56b7c89d012345e678f",
      "description": "The ID of the account to which this audit log entry belongs"
    },
    "subentries": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/AuditLogEntryListingRep"
      }
    },
    "description": {
      "type": "string",
      "example": "Example, turning on the flag for testing",
      "description": "Description of the change recorded in the audit log entry"
    },
    "triggerBody": {
      "description": "A JSON representation of the external trigger for this audit log entry, if any"
    },
    "currentVersion": {
      "description": "If the audit log entry has been updated, this is a JSON representation of the current version of the entity"
    },
    "previousVersion": {
      "description": "If the audit log entry has been updated, this is a JSON representation of the previous version of the entity"
    },
    "shortDescription": {
      "type": "string",
      "example": "Example, turning on the flag",
      "description": "Shorter version of the change recorded in the audit log entry"
    }
  }
}
object AuthorizedAppDataRep
{
  "type": "object",
  "properties": {
    "_id": {
      "type": "string",
      "description": "The ID of the authorized application"
    },
    "name": {
      "type": "string",
      "description": "The authorized application name"
    },
    "_links": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "isScim": {
      "type": "boolean",
      "description": "Whether the application is authorized through SCIM"
    },
    "maintainerName": {
      "type": "string",
      "description": "The name of the maintainer for this authorized application"
    }
  }
}
object BigSegmentStoreIntegration
{
  "type": "object",
  "required": [
    "_links",
    "_id",
    "integrationKey",
    "projectKey",
    "environmentKey",
    "config",
    "on",
    "tags",
    "name",
    "version",
    "_status"
  ],
  "properties": {
    "on": {
      "type": "boolean",
      "example": true,
      "description": "Whether the configuration is turned on"
    },
    "_id": {
      "type": "string",
      "example": "12ab3c4d5ef1a2345bcde67f",
      "description": "The integration ID"
    },
    "name": {
      "type": "string",
      "example": "Development environment configuration",
      "description": "Name of the configuration"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [],
      "description": "List of tags for this configuration"
    },
    "_links": {
      "$ref": "#/components/schemas/BigSegmentStoreIntegrationLinks",
      "description": "The location and content type of related resources"
    },
    "config": {
      "$ref": "#/components/schemas/FormVariableConfig",
      "description": "The delivery configuration for the given integration provider. Only included when requesting a single integration by ID. Refer to the <code>formVariables</code> field in the corresponding <code>manifest.json</code> for a full list of fields for each integration."
    },
    "_access": {
      "$ref": "#/components/schemas/Access",
      "description": "Details on the allowed and denied actions for this configuration"
    },
    "_status": {
      "$ref": "#/components/schemas/BigSegmentStoreStatus",
      "description": "Details on the connection status of the persistent store integration"
    },
    "version": {
      "type": "integer",
      "example": 1,
      "description": "Version of the current configuration"
    },
    "projectKey": {
      "type": "string",
      "example": "default",
      "description": "The project key"
    },
    "environmentKey": {
      "type": "string",
      "example": "development",
      "description": "The environment key"
    },
    "integrationKey": {
      "enum": [
        "redis",
        "dynamodb"
      ],
      "type": "string",
      "example": "redis",
      "description": "The integration key"
    }
  }
}
object BigSegmentStoreIntegrationCollection
{
  "type": "object",
  "required": [
    "_links",
    "items"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/BigSegmentStoreIntegration"
      },
      "description": "An array of persistent store integration configurations"
    },
    "_links": {
      "$ref": "#/components/schemas/BigSegmentStoreIntegrationCollectionLinks",
      "description": "The location and content type of related resources"
    }
  }
}
object BigSegmentStoreIntegrationCollectionLinks
{
  "type": "object",
  "required": [
    "self"
  ],
  "properties": {
    "self": {
      "$ref": "#/components/schemas/Link"
    },
    "parent": {
      "$ref": "#/components/schemas/Link"
    }
  }
}
object BigSegmentStoreIntegrationLinks
{
  "type": "object",
  "required": [
    "self",
    "parent",
    "project",
    "environment"
  ],
  "properties": {
    "self": {
      "$ref": "#/components/schemas/Link"
    },
    "parent": {
      "$ref": "#/components/schemas/Link"
    },
    "project": {
      "$ref": "#/components/schemas/Link"
    },
    "environment": {
      "$ref": "#/components/schemas/Link"
    }
  }
}
object BigSegmentStoreStatus
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StoreIntegrationError"
      }
    },
    "lastSync": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1717263000000",
      "description": "Timestamp of when the most recent successful sync occurred between the persistent store integration and the LaunchDarkly environment."
    },
    "available": {
      "type": "boolean",
      "example": true,
      "description": "Whether the persistent store integration is fully synchronized with the LaunchDarkly environment, and the <code>lastSync</code> occurred within a few minutes"
    },
    "lastError": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1714584600000",
      "description": "Timestamp of when the most recent synchronization error occurred, if any"
    },
    "potentiallyStale": {
      "type": "boolean",
      "example": false,
      "description": "Whether the persistent store integration may not be fully synchronized with the LaunchDarkly environment. <code>true</code> if the integration could be stale."
    }
  }
}
object BigSegmentTarget
{
  "type": "object",
  "required": [
    "userKey",
    "included",
    "excluded"
  ],
  "properties": {
    "userKey": {
      "type": "string",
      "description": "The target key"
    },
    "excluded": {
      "type": "boolean",
      "description": "Indicates whether the target is excluded.<br />Segment rules bypass excluded targets, so they will never be included based on rules. Excluded targets may still be included explicitly."
    },
    "included": {
      "type": "boolean",
      "description": "Indicates whether the target is included.<br />Included targets are always segment members, regardless of segment rules."
    }
  }
}
object BooleanDefaults
{
  "type": "object",
  "properties": {
    "onVariation": {
      "type": "integer",
      "example": 0,
      "description": "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": {
      "type": "integer",
      "example": 1,
      "description": "The variation index of the flag variation to use for the default targeting behavior when a flag's targeting is off"
    },
    "trueDescription": {
      "type": "string",
      "example": "serve true",
      "description": "The description for the true variation"
    },
    "trueDisplayName": {
      "type": "string",
      "example": "True",
      "description": "The display name for the true variation, displayed in the LaunchDarkly user interface"
    },
    "falseDescription": {
      "type": "string",
      "example": "serve false",
      "description": "The description for the false variation"
    },
    "falseDisplayName": {
      "type": "string",
      "example": "False",
      "description": "The display name for the false variation, displayed in the LaunchDarkly user interface"
    }
  }
}
object BooleanFlagDefaults
{
  "type": "object",
  "required": [
    "trueDisplayName",
    "falseDisplayName",
    "trueDescription",
    "falseDescription",
    "onVariation",
    "offVariation"
  ],
  "properties": {
    "onVariation": {
      "type": "integer",
      "example": 0,
      "description": "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": {
      "type": "integer",
      "example": 1,
      "description": "The variation index of the flag variation to use for the default targeting behavior when a flag's targeting is off"
    },
    "trueDescription": {
      "type": "string",
      "example": "serve true",
      "description": "The description for the true variation"
    },
    "trueDisplayName": {
      "type": "string",
      "example": "True",
      "description": "The display name for the true variation, displayed in the LaunchDarkly user interface"
    },
    "falseDescription": {
      "type": "string",
      "example": "serve false",
      "description": "The description for the false variation"
    },
    "falseDisplayName": {
      "type": "string",
      "example": "False",
      "description": "The display name for the false variation, displayed in the LaunchDarkly user interface"
    }
  }
}
object BranchCollectionRep
{
  "type": "object",
  "required": [
    "_links",
    "items"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/BranchRep"
      },
      "description": "An array of branches"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    }
  }
}
object BranchRep
{
  "type": "object",
  "required": [
    "name",
    "head",
    "syncTime",
    "_links"
  ],
  "properties": {
    "head": {
      "type": "string",
      "example": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3",
      "description": "An ID representing the branch HEAD. For example, a commit SHA."
    },
    "name": {
      "type": "string",
      "example": "main",
      "description": "The branch name"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {}
    },
    "syncTime": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1636558831870",
      "description": "A timestamp indicating when the branch was last synced"
    },
    "references": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ReferenceRep"
      },
      "description": "An array of flag references found on the branch"
    },
    "updateSequenceId": {
      "type": "integer",
      "format": "int64",
      "example": 25,
      "description": "An optional ID used to prevent older data from overwriting newer data"
    }
  }
}
object BulkEditMembersRep
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": {
          "type": "string"
        }
      },
      "example": [
        {
          "507f1f77bcf86cd799439011": "you cannot modify your own role"
        }
      ],
      "description": "A list of member IDs and errors for the members whose updates failed."
    },
    "members": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "1234a56b7c89d012345e678f"
      ],
      "description": "A list of members IDs of the members who were successfully updated."
    }
  }
}
object BulkEditTeamsRep
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": {
          "type": "string"
        }
      },
      "example": [
        {
          "example-team-2": "example failure message"
        }
      ],
      "description": "A list of team keys and errors for the teams whose updates failed."
    },
    "teamKeys": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "example-team-1"
      ],
      "description": "A list of team keys of the teams that were successfully updated."
    },
    "memberIDs": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "1234a56b7c89d012345e678f"
      ],
      "description": "A list of member IDs of the members who were added to the teams."
    }
  }
}
object Clause
{
  "type": "object",
  "required": [
    "attribute",
    "op",
    "values",
    "negate"
  ],
  "properties": {
    "op": {
      "$ref": "#/components/schemas/Operator"
    },
    "_id": {
      "type": "string"
    },
    "negate": {
      "type": "boolean"
    },
    "values": {
      "type": "array",
      "items": {}
    },
    "attribute": {
      "type": "string"
    },
    "contextKind": {
      "type": "string"
    }
  }
}
object Client
{
  "type": "object",
  "required": [
    "_links",
    "name",
    "_accountId",
    "_clientId",
    "redirectUri",
    "_creationDate"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "Client name"
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/oauth/clients/50666563-9144-4125-b822-33f308227e45",
          "type": "application/json"
        },
        "parent": {
          "href": "/api/v2/oauth/clients",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "_clientId": {
      "type": "string",
      "description": "The client's unique ID"
    },
    "_accountId": {
      "type": "string",
      "description": "The account ID the client is registered under"
    },
    "description": {
      "type": "string",
      "description": "Client description"
    },
    "redirectUri": {
      "type": "string",
      "description": "The client's redirect URI"
    },
    "_clientSecret": {
      "type": "string",
      "description": "The client secret. This will only be shown upon creation."
    },
    "_creationDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1494437420312",
      "description": "Timestamp of client creation date"
    }
  }
}
object ClientCollection
{
  "type": "object",
  "required": [
    "_links",
    "items"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Client"
      },
      "description": "List of client objects"
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/oauth/clients",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    }
  }
}
object ClientSideAvailability
{
  "type": "object",
  "properties": {
    "usingMobileKey": {
      "type": "boolean"
    },
    "usingEnvironmentId": {
      "type": "boolean"
    }
  }
}
object ClientSideAvailabilityPost
{
  "type": "object",
  "required": [
    "usingEnvironmentId",
    "usingMobileKey"
  ],
  "properties": {
    "usingMobileKey": {
      "type": "boolean",
      "example": true,
      "description": "Whether to enable availability for mobile SDKs. Defaults to <code>true</code>."
    },
    "usingEnvironmentId": {
      "type": "boolean",
      "example": true,
      "description": "Whether to enable availability for client-side SDKs. Defaults to <code>false</code>."
    }
  }
}
array CodeReferencesAsynchronouslyDeleteBranchesRequest
{
  "type": "array",
  "items": {
    "type": "string"
  }
}
object CompletedBy
{
  "type": "object",
  "properties": {
    "token": {
      "$ref": "#/components/schemas/TokenSummary",
      "description": "The service token used to mark this phase as complete"
    },
    "member": {
      "$ref": "#/components/schemas/MemberSummary",
      "description": "The LaunchDarkly member who marked this phase as complete"
    }
  }
}
object ConditionInput
{
  "type": "object",
  "properties": {
    "kind": {
      "$ref": "#/components/schemas/ConditionKind",
      "example": "schedule",
      "description": "The type of condition to meet before executing this stage of the workflow. Use <code>schedule</code> to schedule a workflow stage. Use <code>ld-approval</code> to add an approval request to a workflow stage."
    },
    "executeNow": {
      "type": "boolean",
      "example": false,
      "description": "Whether the workflow stage should be executed immediately"
    },
    "description": {
      "type": "string",
      "example": "Require example-team approval for final stage",
      "description": "A description of the approval required for this stage"
    },
    "scheduleKind": {
      "$ref": "#/components/schemas/ScheduleKind",
      "enum": [
        "absolute",
        "relative"
      ],
      "example": "relative",
      "description": "Whether the scheduled execution of the workflow stage is relative or absolute. If relative, the <code>waitDuration</code> and <code>waitDurationUnit</code> specify when the execution occurs. If absolute, the <code>executionDate</code> specifies when the execution occurs."
    },
    "waitDuration": {
      "type": "integer",
      "example": 2,
      "description": "For workflow stages whose scheduled execution is relative, how far in the future the stage should start."
    },
    "executionDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1706810400000",
      "description": "For workflow stages whose scheduled execution is absolute, the time, in Unix milliseconds, when the stage should start."
    },
    "notifyTeamKeys": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "example-team"
      ],
      "description": "A list of team keys for the teams to request approval from for this stage"
    },
    "notifyMemberIds": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "507f1f77bcf86cd799439011"
      ],
      "description": "A list of member IDs for the members to request approval from for this stage"
    },
    "waitDurationUnit": {
      "$ref": "#/components/schemas/DurationUnit",
      "enum": [
        "minute",
        "hour",
        "calendarDay",
        "calendarWeek"
      ],
      "example": "calendarDay",
      "description": "For workflow stages whose scheduled execution is relative, the unit of measure for the <code>waitDuration</code>."
    }
  }
}
string ConditionKind
{
  "type": "string"
}
object ConditionOutput
{
  "type": "object",
  "required": [
    "_id",
    "_execution",
    "description",
    "notifyMemberIds",
    "allReviews",
    "reviewStatus"
  ],
  "properties": {
    "_id": {
      "type": "string"
    },
    "kind": {
      "type": "string"
    },
    "_execution": {
      "$ref": "#/components/schemas/ExecutionOutput"
    },
    "allReviews": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ReviewOutput"
      }
    },
    "appliedDate": {
      "$ref": "#/components/schemas/UnixMillis"
    },
    "description": {
      "type": "string"
    },
    "reviewStatus": {
      "type": "string"
    },
    "scheduleKind": {
      "$ref": "#/components/schemas/ScheduleKind"
    },
    "waitDuration": {
      "type": "integer"
    },
    "executionDate": {
      "$ref": "#/components/schemas/UnixMillis"
    },
    "notifyMemberIds": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "waitDurationUnit": {
      "$ref": "#/components/schemas/DurationUnit"
    }
  }
}
object ConfidenceIntervalRep
{
  "type": "object",
  "properties": {
    "lower": {
      "type": "number"
    },
    "upper": {
      "type": "number"
    }
  }
}
object Conflict
{
  "type": "object",
  "properties": {
    "reason": {
      "type": "string",
      "description": "Reason why the conflict exists"
    },
    "instruction": {
      "$ref": "#/components/schemas/Instruction",
      "description": "Instruction in semantic patch format to be applied to the feature flag"
    }
  }
}
object ConflictOutput
{
  "type": "object",
  "required": [
    "stageId",
    "message"
  ],
  "properties": {
    "message": {
      "type": "string",
      "description": "Message about the conflict"
    },
    "stageId": {
      "type": "string",
      "example": "12ab3c4d5ef1a2345bcde67f",
      "description": "The stage ID"
    }
  }
}
object ContextAttributeName
{
  "type": "object",
  "required": [
    "name",
    "weight"
  ],
  "properties": {
    "name": {
      "type": "string",
      "example": "/firstName",
      "description": "A context attribute's name."
    },
    "weight": {
      "type": "integer",
      "example": 2225,
      "description": "A relative estimate of the number of contexts seen recently that have an attribute with the associated name."
    },
    "redacted": {
      "type": "boolean",
      "example": false,
      "description": "Whether or not the attribute has one or more redacted values."
    }
  }
}
object ContextAttributeNames
{
  "type": "object",
  "required": [
    "kind",
    "names"
  ],
  "properties": {
    "kind": {
      "type": "string",
      "example": "user",
      "description": "The kind associated with this collection of context attribute names."
    },
    "names": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ContextAttributeName"
      },
      "description": "A collection of context attribute names."
    }
  }
}
object ContextAttributeNamesCollection
{
  "type": "object",
  "required": [
    "items"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ContextAttributeNames"
      },
      "description": "A collection of context attribute name data grouped by kind."
    }
  }
}
object ContextAttributeValue
{
  "type": "object",
  "required": [
    "name",
    "weight"
  ],
  "properties": {
    "name": {
      "example": "Sandy",
      "description": "A value for a context attribute."
    },
    "weight": {
      "type": "integer",
      "example": 35,
      "description": "A relative estimate of the number of contexts seen recently that have a matching value for a given attribute."
    }
  }
}
object ContextAttributeValues
{
  "type": "object",
  "required": [
    "kind",
    "values"
  ],
  "properties": {
    "kind": {
      "type": "string",
      "example": "user",
      "description": "The kind associated with this collection of context attribute values."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ContextAttributeValue"
      },
      "description": "A collection of context attribute values."
    }
  }
}
object ContextAttributeValuesCollection
{
  "type": "object",
  "required": [
    "items"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ContextAttributeValues"
      },
      "description": "A collection of context attribute value data grouped by kind."
    }
  }
}
object ContextInstance
{
  "type": "object",
  "additionalProperties": {}
}
object ContextInstanceEvaluation
{
  "type": "object",
  "required": [
    "name",
    "key",
    "_value",
    "_links"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "flag-key-123abc",
      "description": "Key of the flag."
    },
    "name": {
      "type": "string",
      "example": "My Flag",
      "description": "Name of the flag."
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/projects/{projectKey}/environments/{environmentKey}/flags/evaluate",
          "type": "application/json"
        },
        "site": {
          "href": "/my-project/my-environment/features/sort.order/targeting",
          "type": "text/html"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "_value": {
      "example": "true",
      "description": "The value of the flag variation that the context receives. If there is no defined default rule, this is null."
    },
    "reason": {
      "$ref": "#/components/schemas/ContextInstanceEvaluationReason",
      "example": "{\"kind\": \"RULE_MATCH\"}",
      "description": "Contains information about why that variation was selected."
    }
  }
}
object ContextInstanceEvaluationReason
{
  "type": "object",
  "required": [
    "kind"
  ],
  "properties": {
    "kind": {
      "type": "string",
      "example": "OFF",
      "description": "Describes the general reason that LaunchDarkly selected this variation."
    },
    "ruleID": {
      "type": "string",
      "example": "1234567890",
      "description": "The unique identifier of the matching rule if the kind is 'RULE_MATCH'."
    },
    "errorKind": {
      "type": "string",
      "example": "tried to use uninitialized Context",
      "description": "The specific error type if the kind is 'ERROR'."
    },
    "ruleIndex": {
      "type": "integer",
      "example": 3,
      "description": "The positional index of the matching rule if the kind is 'RULE_MATCH'. The index is 0-based."
    },
    "inExperiment": {
      "type": "boolean",
      "example": true,
      "description": "Indicates whether the context was evaluated as part of an experiment."
    },
    "prerequisiteKey": {
      "type": "string",
      "example": "someotherflagkey",
      "description": "The key of the flag that failed if the kind is 'PREREQUISITE_FAILED'."
    }
  }
}
object ContextInstanceEvaluations
{
  "type": "object",
  "required": [
    "items",
    "_links"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ContextInstanceEvaluation"
      },
      "example": [
        {
          "key": "sort.order",
          "name": "SortOrder",
          "_links": {
            "self": {
              "href": "/api/v2/projects/{projectKey}/environments/{environmentKey}/flags/evaluate",
              "type": "application/json"
            },
            "site": {
              "href": "/my-project/my-environment/features/sort.order/targeting",
              "type": "text/html"
            }
          },
          "_value": true,
          "reason": {
            "kind": "FALLTHROUGH"
          }
        },
        {
          "key": "alternate.page",
          "name": "AlternatePage",
          "_links": {
            "self": {
              "href": "/api/v2/projects/{projectKey}/environments/{environmentKey}/flags/evaluate",
              "type": "application/json"
            },
            "site": {
              "href": "/my-project/my-environment/features/alternate.page/targeting",
              "type": "text/html"
            }
          },
          "_value": false,
          "reason": {
            "kind": "RULE_MATCH",
            "ruleID": "b2530cdf-14c6-4e16-b660-00239e08f19b",
            "ruleIndex": 1
          }
        }
      ],
      "description": "Details on the flag evaluations for this context instance"
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/projects/{projectKey}/environments/{environmentKey}/flags/evaluate",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "totalCount": {
      "type": "integer",
      "example": 2,
      "description": "The number of flags"
    }
  }
}
object ContextInstanceRecord
{
  "type": "object",
  "required": [
    "id",
    "context"
  ],
  "properties": {
    "id": {
      "type": "string",
      "example": "b3JnOmxhdW5jaGRhcmtseQ",
      "description": "The context instance ID"
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/projects/my-project/environments/my-env/context-instances/organization:launch-darkly:user:henry?filter=applicationId:\"GoSDK/1.2\"",
          "type": "application/json"
        },
        "site": {
          "href": "/my-project/my-environment/context-instances/organization:launch-darkly:user:henry",
          "type": "text/html"
        },
        "parent": {
          "href": "/api/v2/projects/my-project/environments/my-environment",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "_access": {
      "$ref": "#/components/schemas/Access",
      "description": "Details on the allowed and denied actions for this context instance"
    },
    "context": {
      "example": "{\"kind\": \"user\", \"key\": \"context-key-123abc\", \"name\": \"Sandy Smith\", \"email\": \"sandy@example.com\"}",
      "description": "The context, including its kind and attributes"
    },
    "lastSeen": {
      "type": "string",
      "format": "date-time",
      "example": "2022-04-15T15:00:57.526470334Z",
      "description": "Timestamp of the last time an evaluation occurred for this context instance"
    },
    "applicationId": {
      "type": "string",
      "example": "GoSDK/1.2",
      "description": "An identifier representing the application where the LaunchDarkly SDK is running"
    },
    "anonymousKinds": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "device",
        "privateKind"
      ],
      "description": "A list of the context kinds this context was associated with that the SDK removed because they were marked as anonymous at flag evaluation"
    }
  }
}
object ContextInstanceSearch
{
  "type": "object",
  "properties": {
    "sort": {
      "type": "string",
      "example": "-ts",
      "description": "Specifies a field by which to sort. LaunchDarkly supports sorting by timestamp in ascending order by specifying <code>ts</code> for this value, or descending order by specifying <code>-ts</code>."
    },
    "limit": {
      "type": "integer",
      "example": 10,
      "description": "Specifies the maximum number of items in the collection to return (max: 50, default: 20)"
    },
    "filter": {
      "type": "string",
      "example": "{\"filter\": \"kindKeys:{\"contains\": [\"user:Henry\"]},\"sort\": \"-ts\",\"limit\": 50}",
      "description": "A collection of context instance filters"
    },
    "continuationToken": {
      "type": "string",
      "example": "QAGFKH1313KUGI2351",
      "description": "Limits results to context instances with sort values after the value specified. You can use this for pagination, however, we recommend using the <code>next</code> link instead, because this value is an obfuscated string."
    }
  }
}
object ContextInstanceSegmentMembership
{
  "type": "object",
  "required": [
    "name",
    "key",
    "description",
    "unbounded",
    "external",
    "isMember",
    "isIndividuallyTargeted",
    "isRuleTargeted",
    "_links"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "segment-key-123abc",
      "description": "A unique key used to reference the segment"
    },
    "name": {
      "type": "string",
      "example": "Segment Name",
      "description": "A human-friendly name for the segment"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "external": {
      "type": "string",
      "example": "https://amplitude.com/myCohort",
      "description": "If the segment is a synced segment, the name of the external source"
    },
    "isMember": {
      "type": "boolean",
      "example": true,
      "description": "Whether the context is a member of this segment, either by explicit inclusion or by rule matching"
    },
    "unbounded": {
      "type": "boolean",
      "example": false,
      "description": "Whether this is an unbounded segment. Unbounded segments, also called big segments, may be list-based segments with more than 15,000 entries, or synced segments."
    },
    "description": {
      "type": "string",
      "example": "Segment description",
      "description": "A description of the segment's purpose"
    },
    "isRuleTargeted": {
      "type": "boolean",
      "example": false,
      "description": "Whether the context is captured by this segment's rules. The value of this field is undefined if the context is also explicitly included (<code>isIndividuallyTargeted</code> is <code>true</code>)."
    },
    "isIndividuallyTargeted": {
      "type": "boolean",
      "example": true,
      "description": "Whether the context is explicitly included in this segment"
    }
  }
}
object ContextInstanceSegmentMemberships
{
  "type": "object",
  "required": [
    "items",
    "_links"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ContextInstanceSegmentMembership"
      }
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    }
  }
}
object ContextInstances
{
  "type": "object",
  "required": [
    "_environmentId",
    "items"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ContextInstanceRecord"
      },
      "description": "A collection of context instances. Can include multiple versions of context instances that have the same <code>id</code>, but different <code>applicationId</code>s."
    },
    "_links": {
      "type": "object",
      "example": {
        "next": {
          "href": "/api/v2/projects/my-project/environments/my-env/context-instances/organization:launch-darkly:user:henry?limit=2&continuationToken=2022-04-15T15:00:57.526470334Z",
          "type": "application/json"
        },
        "self": {
          "href": "/api/v2/projects/my-proj/environments/my-env/context-instances/organization:launch-darkly:user:henry-jacobs?limit=2",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "totalCount": {
      "type": "integer",
      "example": 100,
      "description": "The number of unique context instances"
    },
    "_environmentId": {
      "type": "string",
      "example": "57be1db38b75bf0772d11384",
      "description": "The environment ID"
    },
    "continuationToken": {
      "type": "string",
      "example": "QAGFKH1313KUGI2351",
      "description": "An obfuscated string that references the last context instance on the previous page of results. You can use this for pagination, however, we recommend using the <code>next</code> link instead."
    }
  }
}
string ContextKindCreatedFrom
{
  "type": "string"
}
object ContextKindRep
{
  "type": "object",
  "required": [
    "key",
    "name",
    "description",
    "version",
    "creationDate",
    "lastModified",
    "createdFrom"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "organization-key-123abc",
      "description": "The context kind key"
    },
    "name": {
      "type": "string",
      "example": "Organization",
      "description": "The context kind name"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "version": {
      "type": "integer",
      "example": 4,
      "description": "The context kind version"
    },
    "archived": {
      "type": "boolean",
      "example": false,
      "description": "Whether the context kind is archived. Archived context kinds are unavailable for targeting."
    },
    "lastSeen": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1671563538193",
      "description": "Timestamp of when a context of this context kind was most recently evaluated"
    },
    "createdFrom": {
      "$ref": "#/components/schemas/ContextKindCreatedFrom",
      "enum": [
        "default",
        "auto-add",
        "manual"
      ],
      "example": "auto-add",
      "description": "How the context kind was created"
    },
    "description": {
      "type": "string",
      "example": "An example context kind, to enable targeting based on organization",
      "description": "The context kind description"
    },
    "creationDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1668530155141",
      "description": "Timestamp of when the context kind was created"
    },
    "lastModified": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1670341705251",
      "description": "Timestamp of when the context kind was most recently changed"
    },
    "hideInTargeting": {
      "type": "boolean",
      "example": false,
      "description": "Alias for archived."
    }
  }
}
object ContextKindsCollectionRep
{
  "type": "object",
  "required": [
    "items",
    "_links"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ContextKindRep"
      },
      "description": "An array of context kinds"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    }
  }
}
object ContextRecord
{
  "type": "object",
  "required": [
    "context"
  ],
  "properties": {
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/projects/my-project/environments/my-env/contexts/organization:launch-darkly:user:henry?filter=applicationId:\"GoSDK/1.2\"",
          "type": "application/json"
        },
        "site": {
          "href": "/my-project/my-environment/context/organization:launch-darkly:user:henry",
          "type": "text/html"
        },
        "parent": {
          "href": "/api/v2/projects/my-project/environments/my-environment",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "_access": {
      "$ref": "#/components/schemas/Access",
      "description": "Details on the allowed and denied actions for this context instance"
    },
    "context": {
      "example": "{\"kind\": \"user\", \"key\": \"context-key-123abc\", \"name\": \"Sandy Smith\", \"email\": \"sandy@example.com\"}",
      "description": "The context, including its kind and attributes"
    },
    "lastSeen": {
      "type": "string",
      "format": "date-time",
      "example": "2022-04-15T15:00:57.526470334Z",
      "description": "Timestamp of the last time an evaluation occurred for this context"
    },
    "applicationId": {
      "type": "string",
      "example": "GoSDK/1.2",
      "description": "An identifier representing the application where the LaunchDarkly SDK is running"
    },
    "associatedContexts": {
      "type": "integer",
      "example": 0,
      "description": "The total number of associated contexts. Associated contexts are contexts that have appeared in the same context instance, that is, they were part of the same flag evaluation."
    }
  }
}
object ContextSearch
{
  "type": "object",
  "properties": {
    "sort": {
      "type": "string",
      "example": "-ts",
      "description": "Specifies a field by which to sort. LaunchDarkly supports sorting by timestamp in ascending order by specifying <code>ts</code> for this value, or descending order by specifying <code>-ts</code>."
    },
    "limit": {
      "type": "integer",
      "example": 10,
      "description": "Specifies the maximum number of items in the collection to return (max: 50, default: 20)"
    },
    "filter": {
      "type": "string",
      "example": "*.name startsWith Jo,kind anyOf [\"user\",\"organization\"]",
      "description": "A collection of context filters"
    },
    "continuationToken": {
      "type": "string",
      "example": "QAGFKH1313KUGI2351",
      "description": "Limits results to contexts with sort values after the value specified. You can use this for pagination, however, we recommend using the <code>next</code> link instead, because this value is an obfuscated string."
    }
  }
}
object Contexts
{
  "type": "object",
  "required": [
    "_environmentId",
    "items"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ContextRecord"
      },
      "description": "A collection of contexts. Can include multiple versions of contexts that have the same <code>kind</code> and <code>key</code>, but different <code>applicationId</code>s."
    },
    "_links": {
      "type": "object",
      "example": {
        "next": {
          "href": "/app.launchdarkly.com/api/v2/projects/my-project/environments/my-environment/contexts?filter=kind:{\"equals\": [\"organization\"]}&limit=2&continuationToken=QAGFKH1313KUGI2351",
          "type": "application/json"
        },
        "self": {
          "href": "/api/v2/projects/my-proj/environments/my-env/contexts?filter=kind:{\"equals\": [\"organization\"]}&limit=2&continuationToken=QAGFKH1313KUGI2351",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "totalCount": {
      "type": "integer",
      "example": 100,
      "description": "The number of contexts"
    },
    "_environmentId": {
      "type": "string",
      "example": "57be1db38b75bf0772d11384",
      "description": "The environment ID where the context was evaluated"
    },
    "continuationToken": {
      "type": "string",
      "example": "QAGFKH1313KUGI2351",
      "description": "An obfuscated string that references the last context instance on the previous page of results. You can use this for pagination, however, we recommend using the <code>next</code> link instead."
    }
  }
}
object CopiedFromEnv
{
  "type": "object",
  "required": [
    "key"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "source-flag-key-123abc",
      "description": "Key of feature flag copied"
    },
    "version": {
      "type": "integer",
      "example": 1,
      "description": "Version of feature flag copied"
    }
  }
}
object CreatePhaseInput
{
  "type": "object",
  "required": [
    "audiences",
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "example": "Phase 1 - Testing",
      "description": "The release phase name"
    },
    "audiences": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/AudiencePost"
      },
      "description": "An ordered list of the audiences for this release phase. Each audience corresponds to a LaunchDarkly environment."
    }
  }
}
object CreateReleasePipelineInput
{
  "type": "object",
  "required": [
    "key",
    "name",
    "phases"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "standard-pipeline",
      "description": "The unique identifier of this release pipeline"
    },
    "name": {
      "type": "string",
      "example": "Standard Pipeline",
      "description": "The name of the release pipeline"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "example-tag"
      ],
      "description": "A list of tags for this release pipeline"
    },
    "phases": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/CreatePhaseInput"
      },
      "description": "A logical grouping of one or more environments that share attributes for rolling out changes"
    },
    "description": {
      "type": "string",
      "example": "Standard pipeline to roll out to production",
      "description": "The release pipeline description"
    }
  }
}
object CreateWorkflowTemplateInput
{
  "type": "object",
  "required": [
    "key"
  ],
  "properties": {
    "key": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "stages": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StageInput"
      }
    },
    "flagKey": {
      "type": "string"
    },
    "projectKey": {
      "type": "string"
    },
    "workflowId": {
      "$ref": "#/components/schemas/FeatureWorkflowId"
    },
    "description": {
      "type": "string"
    },
    "environmentKey": {
      "type": "string"
    }
  }
}
object CredibleIntervalRep
{
  "type": "object",
  "properties": {
    "lower": {
      "type": "number",
      "example": 0.4060771673663068,
      "description": "The lower bound"
    },
    "upper": {
      "type": "number",
      "example": 0.6713222134386467,
      "description": "The upper bound"
    }
  }
}
object CustomProperties
{
  "type": "object",
  "additionalProperties": {
    "$ref": "#/components/schemas/customProperty"
  }
}
object CustomRole
{
  "type": "object",
  "required": [
    "_id",
    "_links",
    "key",
    "name",
    "policy"
  ],
  "properties": {
    "_id": {
      "type": "string",
      "example": "1234a56b7c89d012345e678f",
      "description": "The ID of the custom role"
    },
    "key": {
      "type": "string",
      "example": "example-custom-role",
      "description": "The key of the custom role"
    },
    "name": {
      "type": "string",
      "example": "Example custom role",
      "description": "The name of the custom role"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "policy": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Statement"
      },
      "description": "An array of the policies that comprise this custom role"
    },
    "_access": {
      "$ref": "#/components/schemas/Access",
      "description": "Details on the allowed and denied actions for this custom role"
    },
    "description": {
      "type": "string",
      "example": "This custom role is just an example",
      "description": "The description of the custom role"
    },
    "basePermissions": {
      "$ref": "#/components/schemas/RoleType",
      "example": "reader",
      "description": "Base permissions to use for this role"
    }
  }
}
object CustomRolePost
{
  "type": "object",
  "required": [
    "name",
    "key",
    "policy"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "role-key-123abc",
      "description": "The custom role key"
    },
    "name": {
      "type": "string",
      "example": "Ops team",
      "description": "A human-friendly name for the custom role"
    },
    "policy": {
      "$ref": "#/components/schemas/StatementPostList",
      "description": "Resource statements for custom role"
    },
    "description": {
      "type": "string",
      "example": "An example role for members of the ops team",
      "description": "Description of custom role"
    },
    "basePermissions": {
      "$ref": "#/components/schemas/RoleType",
      "enum": [
        "reader",
        "no_access"
      ],
      "example": "reader",
      "description": "Base permissions to use for this role."
    }
  }
}
object CustomRoles
{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/CustomRole"
      },
      "description": "An array of custom roles"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    }
  }
}
object CustomWorkflowInput
{
  "type": "object",
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "example": "Progressive rollout starting in two days",
      "description": "The workflow name"
    },
    "stages": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StageInput"
      },
      "description": "A list of the workflow stages"
    },
    "description": {
      "type": "string",
      "example": "Turn flag on for 10% of users each day",
      "description": "The workflow description"
    },
    "templateKey": {
      "type": "string",
      "description": "The template key"
    },
    "maintainerId": {
      "$ref": "#/components/schemas/ObjectId",
      "example": "12ab3c45de678910abc12345",
      "description": "The ID of the workflow maintainer. Defaults to the workflow creator."
    }
  }
}
object CustomWorkflowMeta
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "example": "Example workflow name",
      "description": "The name of the workflow stage that required this approval request"
    },
    "stage": {
      "$ref": "#/components/schemas/CustomWorkflowStageMeta",
      "description": "Details on the stage of the workflow where this approval request is required"
    }
  }
}
object CustomWorkflowOutput
{
  "type": "object",
  "required": [
    "_id",
    "_version",
    "_conflicts",
    "_creationDate",
    "_maintainerId",
    "_links",
    "name",
    "_execution"
  ],
  "properties": {
    "_id": {
      "type": "string",
      "example": "12ab3c4d5ef1a2345bcde67f",
      "description": "The ID of the workflow"
    },
    "kind": {
      "type": "string",
      "example": "custom",
      "description": "The kind of workflow"
    },
    "meta": {
      "$ref": "#/components/schemas/WorkflowTemplateMetadata",
      "description": "For workflows being created from a workflow template, this value holds any parameters that could potentially be incompatible with the current project, environment, or flag"
    },
    "name": {
      "type": "string",
      "example": "Progressive rollout starting in two days",
      "description": "The name of the workflow"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "stages": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StageOutput"
      },
      "description": "The stages that make up the workflow. Each stage contains conditions and actions."
    },
    "_version": {
      "type": "integer",
      "example": 1,
      "description": "The version of the workflow"
    },
    "_conflicts": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ConflictOutput"
      },
      "description": "Any conflicts that are present in the workflow stages"
    },
    "_execution": {
      "$ref": "#/components/schemas/ExecutionOutput",
      "example": "{\"status\": \"completed\"}",
      "description": "The current execution status of the workflow"
    },
    "description": {
      "type": "string",
      "example": "Turn flag on for 10% of customers each day",
      "description": "A brief description of the workflow"
    },
    "templateKey": {
      "type": "string",
      "example": "example-workflow-template",
      "description": "For workflows being created from a workflow template, this value is the template's key"
    },
    "_creationDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1654104600000",
      "description": "Timestamp of when the workflow was created"
    },
    "_maintainerId": {
      "type": "string",
      "example": "12ab3c45de678910abc12345",
      "description": "The member ID of the maintainer of the workflow. Defaults to the workflow creator."
    }
  }
}
object CustomWorkflowStageMeta
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "example": "Stage 1",
      "description": "The name of the workflow stage"
    },
    "index": {
      "type": "integer",
      "example": 0,
      "description": "The zero-based index of the workflow stage"
    }
  }
}
object CustomWorkflowsListingOutput
{
  "type": "object",
  "required": [
    "items",
    "totalCount",
    "_links"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/CustomWorkflowOutput"
      },
      "description": "An array of workflows"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "totalCount": {
      "type": "integer",
      "example": 1,
      "description": "Total number of workflows"
    }
  }
}
integer DateVersion
{
  "type": "integer"
}
object DefaultClientSideAvailability
{
  "type": "object",
  "required": [
    "usingMobileKey",
    "usingEnvironmentId"
  ],
  "properties": {
    "usingMobileKey": {
      "type": "boolean",
      "example": true,
      "description": "Whether to enable availability for mobile SDKs"
    },
    "usingEnvironmentId": {
      "type": "boolean",
      "example": true,
      "description": "Whether to enable availability for client-side SDKs"
    }
  }
}
object DefaultClientSideAvailabilityPost
{
  "type": "object",
  "required": [
    "usingEnvironmentId",
    "usingMobileKey"
  ],
  "properties": {
    "usingMobileKey": {
      "type": "boolean",
      "example": true,
      "description": "Whether to enable availability for mobile SDKs."
    },
    "usingEnvironmentId": {
      "type": "boolean",
      "example": true,
      "description": "Whether to enable availability for client-side SDKs."
    }
  }
}
object Defaults
{
  "type": "object",
  "required": [
    "onVariation",
    "offVariation"
  ],
  "properties": {
    "onVariation": {
      "type": "integer",
      "example": 0,
      "description": "The index, from the array of variations for this flag, of the variation to serve by default when targeting is on."
    },
    "offVariation": {
      "type": "integer",
      "example": 1,
      "description": "The index, from the array of variations for this flag, of the variation to serve by default when targeting is off."
    }
  }
}
array DependentExperimentListRep
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/DependentExperimentRep"
  }
}
object DependentExperimentRep
{
  "type": "object",
  "required": [
    "key",
    "name",
    "environmentId",
    "environmentKey",
    "creationDate",
    "_links"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "experiment-key-123abc",
      "description": "The experiment key"
    },
    "name": {
      "type": "string",
      "example": "Example experiment",
      "description": "The experiment name"
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/projects/my-project/environments/my-environment/experiments/example-experiment",
          "type": "application/json"
        },
        "parent": {
          "href": "/api/v2/projects/my-project/environments/my-environment",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "archivedDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1654104600000",
      "description": "Timestamp of when the experiment was archived"
    },
    "creationDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1654104600000",
      "description": "Timestamp of when the experiment was created"
    },
    "environmentId": {
      "type": "string",
      "example": "1234a56b7c89d012345e678f",
      "description": "The environment ID"
    },
    "environmentKey": {
      "type": "string",
      "example": "production",
      "description": "The environment key"
    }
  }
}
object DependentFlag
{
  "type": "object",
  "required": [
    "key",
    "_links",
    "_site"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "dependent-flag-key-123abc",
      "description": "The flag key"
    },
    "name": {
      "type": "string",
      "example": "Example dependent flag",
      "description": "The flag name"
    },
    "_site": {
      "$ref": "#/components/schemas/Link",
      "example": "{ \"href\": \"/example-project/example-environment/features/example-dependent-flag\", \"type\": \"text/html\" }",
      "description": "Details on how to access the dependent flag in the LaunchDarkly UI"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    }
  }
}
object DependentFlagEnvironment
{
  "type": "object",
  "required": [
    "key",
    "_links",
    "_site"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "environment-key-123abc",
      "description": "The environment key"
    },
    "name": {
      "type": "string",
      "example": "Example environment",
      "description": "The environment name"
    },
    "_site": {
      "$ref": "#/components/schemas/Link",
      "example": "{ \"href\": \"/example-project/example-environment/features/example-dependent-flag\", \"type\": \"text/html\" }",
      "description": "Details on how to access the dependent flag in this environment in the LaunchDarkly UI"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    }
  }
}
object DependentFlagsByEnvironment
{
  "type": "object",
  "required": [
    "items",
    "_links",
    "_site"
  ],
  "properties": {
    "_site": {
      "$ref": "#/components/schemas/Link",
      "example": "{ \"href\": \"/example-project/~/features/example-prereq-flag\", \"type\": \"text/html\" }",
      "description": "Details on how to access the prerequisite flag in the LaunchDarkly UI"
    },
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/DependentFlag"
      },
      "description": "A list of dependent flags, which are flags that use the requested flag as a prerequisite"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    }
  }
}
object DependentMetricGroupRep
{
  "type": "object",
  "required": [
    "key",
    "name",
    "kind",
    "_links"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "metric-group-key-123abc",
      "description": "A unique key to reference the metric group"
    },
    "kind": {
      "enum": [
        "funnel"
      ],
      "type": "string",
      "example": "funnel",
      "description": "The type of the metric group"
    },
    "name": {
      "type": "string",
      "example": "My metric group",
      "description": "A human-friendly name for the metric group"
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/projects/my-project/metric-groups/my-metric-group",
          "type": "application/json"
        },
        "parent": {
          "href": "/api/v2/projects/my-project",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    }
  }
}
object DependentMetricGroupRepWithMetrics
{
  "type": "object",
  "required": [
    "key",
    "name",
    "kind",
    "_links"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "metric-group-key-123abc",
      "description": "A unique key to reference the metric group"
    },
    "kind": {
      "enum": [
        "funnel"
      ],
      "type": "string",
      "example": "funnel",
      "description": "The type of the metric group"
    },
    "name": {
      "type": "string",
      "example": "My metric group",
      "description": "A human-friendly name for the metric group"
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/projects/my-project/metric-groups/my-metric-group",
          "type": "application/json"
        },
        "parent": {
          "href": "/api/v2/projects/my-project",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "metrics": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/MetricInGroupRep"
      },
      "description": "The metrics in the metric group"
    }
  }
}
object DependentMetricOrMetricGroupRep
{
  "type": "object",
  "required": [
    "key",
    "_versionId",
    "name",
    "kind",
    "_links",
    "isGroup"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "metric-key-123abc",
      "description": "A unique key to reference the metric or metric group"
    },
    "kind": {
      "enum": [
        "pageview",
        "click",
        "custom",
        "funnel",
        "standard"
      ],
      "type": "string",
      "example": "custom",
      "description": "If this is a metric, then it represents the kind of event the metric tracks. If this is a metric group, then it represents the group type"
    },
    "name": {
      "type": "string",
      "example": "My metric",
      "description": "A human-friendly name for the metric or metric group"
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/metrics/my-project/my-metric",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "isGroup": {
      "type": "boolean",
      "description": "Whether this is a metric group or a metric"
    },
    "metrics": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/MetricInGroupRep"
      },
      "description": "An ordered list of the metrics in this metric group"
    },
    "isNumeric": {
      "type": "boolean",
      "example": true,
      "description": "For custom metrics, whether to track numeric changes in value against a baseline (<code>true</code>) or to track a conversion when an end user takes an action (<code>false</code>)."
    },
    "_versionId": {
      "type": "string",
      "description": "The version ID of the metric or metric group"
    }
  }
}
object DeploymentCollectionRep
{
  "type": "object",
  "required": [
    "totalCount",
    "items"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/DeploymentRep"
      },
      "description": "A list of deployments"
    },
    "_links": {
      "type": "object",
      "example": {
        "next": {
          "href": "/api/v2/engineering-insights/deployments?after=a4290006-1fd1-4ca5-acf7-9f31fac61cf5",
          "type": "application/json"
        },
        "self": {
          "href": "/api/v2/engineering-insights/deployments",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "totalCount": {
      "type": "integer",
      "example": 25,
      "description": "The total number of deployments"
    }
  }
}
string DeploymentKind
{
  "type": "string"
}
object DeploymentRep
{
  "type": "object",
  "required": [
    "id",
    "applicationKey",
    "applicationVersion",
    "startedAt",
    "status",
    "kind",
    "active",
    "archived",
    "environmentKey",
    "numberOfContributors",
    "numberOfPullRequests",
    "linesAdded",
    "linesDeleted",
    "leadTime"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "example": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
      "description": "The deployment ID"
    },
    "kind": {
      "$ref": "#/components/schemas/DeploymentKind",
      "example": "redeployment",
      "description": "The kind of deployment"
    },
    "active": {
      "type": "boolean",
      "example": true,
      "description": "Whether the deployment is active"
    },
    "status": {
      "$ref": "#/components/schemas/DeploymentStatus",
      "example": "finished",
      "description": "The status of the deployment"
    },
    "endedAt": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1706712518000",
      "description": "The time the deployment ended"
    },
    "archived": {
      "type": "boolean",
      "example": false,
      "description": "Whether the deployment is archived"
    },
    "leadTime": {
      "type": "integer",
      "format": "int64",
      "example": 20237000,
      "description": "The total lead time from first commit to deployment end in milliseconds"
    },
    "metadata": {
      "type": "object",
      "example": {
        "buildNumber": "1234"
      },
      "description": "The metadata associated with the deployment",
      "additionalProperties": {}
    },
    "startedAt": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1706701522000",
      "description": "The time the deployment started"
    },
    "durationMs": {
      "type": "integer",
      "format": "int64",
      "example": 10996000,
      "description": "The duration of the deployment in milliseconds"
    },
    "linesAdded": {
      "type": "integer",
      "format": "int64",
      "example": 100,
      "description": "The number of lines added"
    },
    "linesDeleted": {
      "type": "integer",
      "format": "int64",
      "example": 50,
      "description": "The number of lines deleted"
    },
    "pullRequests": {
      "$ref": "#/components/schemas/PullRequestCollectionRep",
      "description": "The pull requests contained in the deployment"
    },
    "applicationKey": {
      "type": "string",
      "example": "billing-service",
      "description": "The application key"
    },
    "environmentKey": {
      "type": "string",
      "example": "production",
      "description": "The environment key"
    },
    "flagReferences": {
      "$ref": "#/components/schemas/FlagReferenceCollectionRep",
      "description": "The flag references contained in the deployment"
    },
    "leadTimeStages": {
      "$ref": "#/components/schemas/LeadTimeStagesRep",
      "description": "The lead time stages for the deployment"
    },
    "applicationVersion": {
      "type": "string",
      "example": "a90a8a2",
      "description": "The application version"
    },
    "numberOfContributors": {
      "type": "integer",
      "example": 1,
      "description": "The number of contributors"
    },
    "numberOfPullRequests": {
      "type": "integer",
      "example": 2,
      "description": "The number of pull requests"
    }
  }
}
string DeploymentStatus
{
  "type": "string"
}
object Destination
{
  "type": "object",
  "properties": {
    "on": {
      "type": "boolean",
      "example": true,
      "description": "Whether the export is on, that is, the status of the integration"
    },
    "_id": {
      "type": "string",
      "example": "610addeadbeefaa86ec9a7d4",
      "description": "The ID of this Data Export destination"
    },
    "kind": {
      "enum": [
        "google-pubsub",
        "kinesis",
        "mparticle",
        "segment",
        "azure-event-hubs"
      ],
      "type": "string",
      "example": "google-pubsub",
      "description": "The type of Data Export destination"
    },
    "name": {
      "type": "string",
      "example": "example-destination",
      "description": "A human-readable name for your Data Export destination"
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/destinations/my-project/my-environment/610addeadbeefaa86ec9a7d4",
          "type": "application/json"
        },
        "parent": {
          "href": "/api/v2/destinations",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "config": {
      "example": "{\"project\":\"test-prod\",\"topic\":\"ld-pubsub-test-192301\"}",
      "description": "An object with the configuration parameters required for the destination type"
    },
    "_access": {
      "$ref": "#/components/schemas/Access",
      "description": "Details on the allowed and denied actions for this Data Export destination"
    },
    "version": {
      "type": "number",
      "example": 1
    }
  }
}
object DestinationPost
{
  "type": "object",
  "properties": {
    "on": {
      "type": "boolean",
      "example": true,
      "description": "Whether the export is on. Displayed as the integration status in the LaunchDarkly UI."
    },
    "kind": {
      "enum": [
        "google-pubsub",
        "kinesis",
        "mparticle",
        "segment",
        "azure-event-hubs"
      ],
      "type": "string",
      "example": "google-pubsub",
      "description": "The type of Data Export destination"
    },
    "name": {
      "type": "string",
      "example": "example-destination",
      "description": "A human-readable name for your Data Export destination"
    },
    "config": {
      "example": "{\"project\":\"test-prod\",\"topic\":\"ld-pubsub-test-192301\"}",
      "description": "An object with the configuration parameters required for the destination type"
    }
  }
}
object Destinations
{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Destination"
      },
      "description": "An array of Data Export destinations"
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/destinations",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    }
  }
}
object Distribution
{
  "type": "object",
  "properties": {
    "kind": {
      "enum": [
        "normal",
        "beta"
      ],
      "type": "string",
      "example": "normal",
      "description": "The type of distribution."
    },
    "parameters": {
      "type": "object",
      "description": "The parameters of the distribution. The parameters are different for each distribution type. When <code>kind</code> is <code>normal</code>, the parameters of the distribution are 'mu' and 'sigma'. When <code>kind</code> is <code>beta</code>, the parameters of the distribution are 'alpha' and 'beta.'",
      "additionalProperties": {}
    }
  }
}
string DurationUnit
{
  "type": "string"
}
object Environment
{
  "type": "object",
  "required": [
    "_links",
    "_id",
    "key",
    "name",
    "apiKey",
    "mobileKey",
    "color",
    "defaultTtl",
    "secureMode",
    "defaultTrackEvents",
    "requireComments",
    "confirmChanges",
    "tags",
    "critical"
  ],
  "properties": {
    "_id": {
      "type": "string",
      "example": "57be1db38b75bf0772d11384",
      "description": "The ID for the environment. Use this as the client-side ID for authorization in some client-side SDKs, and to associate LaunchDarkly environments with CDN integrations in edge SDKs."
    },
    "key": {
      "type": "string",
      "example": "environment-key-123abc",
      "description": "A project-unique key for the new environment"
    },
    "name": {
      "type": "string",
      "example": "My Environment",
      "description": "A human-friendly name for the new environment"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "ops"
      ],
      "description": "A list of tags for this environment"
    },
    "color": {
      "type": "string",
      "example": "F5A623",
      "description": "The color used to indicate this environment in the UI"
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/projects/my-project/environments/my-environment",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "apiKey": {
      "type": "string",
      "example": "sdk-xxx",
      "description": "The SDK key for the environment. Use this for authorization in server-side SDKs."
    },
    "critical": {
      "type": "boolean",
      "example": true,
      "description": "Whether the environment is critical"
    },
    "mobileKey": {
      "type": "string",
      "example": "mob-xxx",
      "description": "The mobile key for the environment. Use this for authorization in mobile SDKs."
    },
    "defaultTtl": {
      "type": "integer",
      "example": 5,
      "description": "The default time (in minutes) that the PHP SDK can cache feature flag rules locally"
    },
    "secureMode": {
      "type": "boolean",
      "example": true,
      "description": "Ensures that one end user of the client-side SDK cannot inspect the variations for another end user"
    },
    "confirmChanges": {
      "type": "boolean",
      "example": true,
      "description": "Whether members who modify flags and segments through the LaunchDarkly user interface are required to confirm those changes"
    },
    "requireComments": {
      "type": "boolean",
      "example": true,
      "description": "Whether members who modify flags and segments through the LaunchDarkly user interface are required to add a comment"
    },
    "approvalSettings": {
      "$ref": "#/components/schemas/ApprovalSettings",
      "description": "Details on the approval settings for this environment"
    },
    "defaultTrackEvents": {
      "type": "boolean",
      "example": false,
      "description": "Enables tracking detailed information for new flags by default"
    }
  }
}
object EnvironmentPost
{
  "type": "object",
  "required": [
    "name",
    "key",
    "color"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "environment-key-123abc",
      "description": "A project-unique key for the new environment"
    },
    "name": {
      "type": "string",
      "example": "My Environment",
      "description": "A human-friendly name for the new environment"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "ops"
      ],
      "description": "Tags to apply to the new environment"
    },
    "color": {
      "type": "string",
      "example": "F5A623",
      "description": "A color to indicate this environment in the UI"
    },
    "source": {
      "$ref": "#/components/schemas/SourceEnv",
      "description": "Indicates that the new environment created will be cloned from the provided source environment"
    },
    "critical": {
      "type": "boolean",
      "example": true,
      "description": "Whether the environment is critical"
    },
    "defaultTtl": {
      "type": "integer",
      "example": 5,
      "description": "The default time (in minutes) that the PHP SDK can cache feature flag rules locally"
    },
    "secureMode": {
      "type": "boolean",
      "example": true,
      "description": "Ensures that one end user of the client-side SDK cannot inspect the variations for another end user"
    },
    "confirmChanges": {
      "type": "boolean",
      "example": false,
      "description": "Requires confirmation for all flag and segment changes via the UI in this environment"
    },
    "requireComments": {
      "type": "boolean",
      "example": false,
      "description": "Requires comments for all flag and segment changes via the UI in this environment"
    },
    "defaultTrackEvents": {
      "type": "boolean",
      "example": false,
      "description": "Enables tracking detailed information for new flags by default"
    }
  }
}
object EnvironmentSummary
{
  "type": "object",
  "required": [
    "_links",
    "key",
    "name",
    "color"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "environment-key-123abc",
      "description": "A project-unique key for the environment"
    },
    "name": {
      "type": "string",
      "example": "My Environment",
      "description": "A human-friendly name for the environment"
    },
    "color": {
      "type": "string",
      "example": "F5A623",
      "description": "The color used to indicate this environment in the UI"
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/projects/my-project/environments/my-environment",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    }
  }
}
object Environments
{
  "type": "object",
  "required": [
    "items"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Environment"
      },
      "description": "An array of environments"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "totalCount": {
      "type": "integer",
      "example": 2,
      "description": "The number of environments returned"
    }
  }
}
object EvaluationReason
{
  "type": "object",
  "required": [
    "kind"
  ],
  "properties": {
    "kind": {
      "type": "string",
      "example": "OFF",
      "description": "Describes the general reason that LaunchDarkly selected this variation."
    },
    "ruleID": {
      "type": "string",
      "example": "1234567890",
      "description": "The unique identifier of the matching rule if the kind is 'RULE_MATCH'."
    },
    "errorKind": {
      "type": "string",
      "example": "USER_NOT_SPECIFIED",
      "description": "The specific error type if the kind is 'ERROR'."
    },
    "ruleIndex": {
      "type": "integer",
      "example": 3,
      "description": "The positional index of the matching rule if the kind is 'RULE_MATCH'. The index is 0-based."
    },
    "inExperiment": {
      "type": "boolean",
      "example": true,
      "description": "Indicates whether the evaluation occurred as part of an experiment."
    },
    "prerequisiteKey": {
      "type": "string",
      "example": "someotherflagkey",
      "description": "The key of the flag that failed if the kind is 'PREREQUISITE_FAILED'."
    }
  }
}
object EvaluationsSummary
{
  "type": "object",
  "properties": {
    "variations": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/VariationEvalSummary"
      },
      "description": "A list of variation evaluations"
    }
  }
}
string EventType
{
  "type": "string"
}
object ExecutionOutput
{
  "type": "object",
  "required": [
    "status"
  ],
  "properties": {
    "status": {
      "type": "string",
      "example": "completed",
      "description": "The status of the execution of this workflow stage"
    },
    "stopDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1718467200000",
      "description": "Timestamp of when the workflow was completed."
    }
  }
}
object ExpandableApprovalRequestResponse
{
  "type": "object",
  "required": [
    "_id",
    "_version",
    "creationDate",
    "serviceKind",
    "reviewStatus",
    "allReviews",
    "notifyMemberIds",
    "status",
    "instructions",
    "conflicts",
    "_links"
  ],
  "properties": {
    "_id": {
      "type": "string",
      "example": "12ab3c45de678910abc12345",
      "description": "The ID of this approval request"
    },
    "flag": {
      "$ref": "#/components/schemas/ExpandedFlagRep",
      "description": "Flag the approval request belongs to"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {}
    },
    "source": {
      "$ref": "#/components/schemas/CopiedFromEnv",
      "description": "Details about the source feature flag, if copied"
    },
    "status": {
      "enum": [
        "pending",
        "completed",
        "failed",
        "scheduled"
      ],
      "type": "string",
      "example": "pending",
      "description": "Current status of the approval request"
    },
    "project": {
      "$ref": "#/components/schemas/Project",
      "description": "Project the approval request belongs to"
    },
    "_version": {
      "type": "integer",
      "example": 1,
      "description": "Version of the approval request"
    },
    "conflicts": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Conflict"
      },
      "description": "Details on any conflicting approval requests"
    },
    "allReviews": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ReviewResponse"
      },
      "description": "An array of individual reviews of this approval request"
    },
    "resourceId": {
      "type": "string",
      "description": "String representation of a resource"
    },
    "appliedDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1654104600000",
      "description": "Timestamp of when the approval request was applied"
    },
    "description": {
      "type": "string",
      "example": "example: request approval from someone",
      "description": "A human-friendly name for the approval request"
    },
    "requestorId": {
      "type": "string",
      "example": "12ab3c45de678910abc12345",
      "description": "The ID of the member who requested the approval"
    },
    "serviceKind": {
      "$ref": "#/components/schemas/ApprovalRequestServiceKind",
      "example": "launchdarkly",
      "description": "The approval service for this request. May be LaunchDarkly or an external approval service, such as ServiceNow or JIRA."
    },
    "creationDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1654104600000",
      "description": "Timestamp of when the approval request was created"
    },
    "environments": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Environment"
      },
      "description": "List of environments the approval impacts"
    },
    "instructions": {
      "$ref": "#/components/schemas/Instructions",
      "example": "[{\"kind\": \"turnFlagOn\"}]",
      "description": "List of instructions in semantic patch format to be applied to the feature flag"
    },
    "reviewStatus": {
      "enum": [
        "approved",
        "declined",
        "pending"
      ],
      "type": "string",
      "example": "pending",
      "description": "Current status of the review of this approval request"
    },
    "executionDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1654104600000",
      "description": "Timestamp for when instructions will be executed"
    },
    "operatingOnId": {
      "type": "string",
      "example": "12ab3c45de678910abc12345",
      "description": "ID of scheduled change to edit or delete"
    },
    "notifyMemberIds": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "1234a56b7c89d012345e678f"
      ],
      "description": "An array of member IDs. These members are notified to review the approval request."
    },
    "approvalSettings": {
      "$ref": "#/components/schemas/ApprovalSettings",
      "description": "The settings for this approval"
    },
    "appliedByMemberId": {
      "type": "string",
      "example": "1234a56b7c89d012345e678f",
      "description": "The member ID of the member who applied the approval request"
    },
    "integrationMetadata": {
      "$ref": "#/components/schemas/IntegrationMetadata",
      "description": "Details about the object in an external service corresponding to this approval request, such as a ServiceNow change request or a JIRA ticket, if an external approval service is being used"
    },
    "customWorkflowMetadata": {
      "$ref": "#/components/schemas/CustomWorkflowMeta",
      "description": "Details about the custom workflow, if this approval request is part of a custom workflow"
    },
    "appliedByServiceTokenId": {
      "type": "string",
      "example": "1234a56b7c89d012345e678f",
      "description": "The service token ID of the service token which applied the approval request"
    }
  }
}
object ExpandableApprovalRequestsResponse
{
  "type": "object",
  "required": [
    "items",
    "totalCount",
    "_links"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ExpandableApprovalRequestResponse"
      },
      "description": "An array of approval requests"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "totalCount": {
      "type": "integer",
      "example": 1,
      "description": "Total number of approval requests"
    }
  }
}
object ExpandedFlagRep
{
  "type": "object",
  "required": [
    "name",
    "kind",
    "key",
    "_version",
    "creationDate",
    "variations",
    "temporary",
    "tags",
    "_links",
    "customProperties",
    "archived"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "flag-key-123abc",
      "description": "A unique key used to reference the flag in your code"
    },
    "kind": {
      "enum": [
        "boolean",
        "multivariate"
      ],
      "type": "string",
      "example": "boolean",
      "description": "Kind of feature flag"
    },
    "name": {
      "type": "string",
      "example": "My Flag",
      "description": "A human-friendly name for the feature flag"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "example-tag"
      ],
      "description": "Tags for the feature flag"
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/flags/my-project/my-flag",
          "type": "application/json"
        },
        "parent": {
          "href": "/api/v2/flags/my-project",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "_version": {
      "type": "integer",
      "example": 1,
      "description": "Version of the feature flag"
    },
    "archived": {
      "type": "boolean",
      "example": false,
      "description": "Boolean indicating if the feature flag is archived"
    },
    "defaults": {
      "$ref": "#/components/schemas/Defaults",
      "example": "{\"onVariation\":0,\"offVariation\":1}",
      "description": "The indices, from the array of variations, for the variations to serve by default when targeting is on and when targeting is off. These variations will be used for this flag in new environments. If omitted, the first and last variation will be used."
    },
    "temporary": {
      "type": "boolean",
      "example": true,
      "description": "Whether the flag is a temporary flag"
    },
    "variations": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Variation"
      },
      "example": [
        {
          "_id": "e432f62b-55f6-49dd-a02f-eb24acf39d05",
          "value": true
        },
        {
          "_id": "a00bf58d-d252-476c-b915-15a74becacb4",
          "value": false
        }
      ],
      "description": "An array of possible variations for the flag"
    },
    "_maintainer": {
      "$ref": "#/components/schemas/MemberSummary",
      "description": "Details on the member who maintains this feature flag"
    },
    "description": {
      "type": "string",
      "example": "This flag controls the example widgets",
      "description": "Description of the feature flag"
    },
    "archivedDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1494437420312",
      "description": "If archived is true, date of archive"
    },
    "creationDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1494437420312",
      "description": "Timestamp of flag creation date"
    },
    "maintainerId": {
      "type": "string",
      "example": "569f183514f4432160000007",
      "description": "The ID of the member who maintains the flag"
    },
    "customProperties": {
      "$ref": "#/components/schemas/CustomProperties",
      "example": "{\"jira.issues\":{\"name\":\"Jira issues\",\"value\":[\"is-123\",\"is-456\"]}}",
      "description": "Metadata attached to the feature flag, in the form of the property key associated with a name and array of values for the metadata to associate with this flag. Typically used to store data related to an integration."
    },
    "includeInSnippet": {
      "type": "boolean",
      "example": true,
      "deprecated": true,
      "description": "Deprecated, use <code>clientSideAvailability</code>. Whether this flag should be made available to the client-side JavaScript SDK"
    },
    "clientSideAvailability": {
      "$ref": "#/components/schemas/ClientSideAvailability",
      "example": "{\"usingMobileKey\":true,\"usingEnvironmentId\":false}",
      "description": "Which type of client-side SDKs the feature flag is available to"
    }
  }
}
object Experiment
{
  "type": "object",
  "required": [
    "key",
    "name",
    "_maintainerId",
    "_creationDate",
    "_links"
  ],
  "properties": {
    "_id": {
      "type": "string",
      "example": "12ab3c45de678910fgh12345",
      "description": "The experiment ID"
    },
    "key": {
      "type": "string",
      "example": "experiment-key-123abc",
      "description": "The experiment key"
    },
    "name": {
      "type": "string",
      "example": "Example experiment",
      "description": "The experiment name"
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/projects/my-project/environments/my-environment/experiments/my-experiment",
          "type": "application/json"
        },
        "parent": {
          "href": "/api/v2/projects/my-project/environments/my-environment",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "description": {
      "type": "string",
      "example": "An example experiment, used in testing",
      "description": "The experiment description"
    },
    "archivedDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1654104600000",
      "description": "Timestamp of when the experiment was archived"
    },
    "_creationDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1654104600000",
      "description": "Timestamp of when the experiment was created"
    },
    "_maintainerId": {
      "type": "string",
      "example": "12ab3c45de678910fgh12345",
      "description": "The ID of the member who maintains this experiment."
    },
    "draftIteration": {
      "$ref": "#/components/schemas/IterationRep",
      "description": "Details on the current iteration. This iteration may be already started, or may still be a draft."
    },
    "environmentKey": {
      "type": "string"
    },
    "currentIteration": {
      "$ref": "#/components/schemas/IterationRep",
      "description": "Details on the current iteration"
    },
    "previousIterations": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/IterationRep"
      },
      "description": "Details on the previous iterations for this experiment."
    }
  }
}
object ExperimentAllocationRep
{
  "type": "object",
  "required": [
    "defaultVariation",
    "canReshuffle"
  ],
  "properties": {
    "canReshuffle": {
      "type": "boolean"
    },
    "defaultVariation": {
      "type": "integer"
    }
  }
}
object ExperimentBayesianResultsRep
{
  "type": "object",
  "properties": {
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SlicedResultsRep"
      },
      "description": "A list of attribute values and their corresponding treatment results"
    },
    "metricSeen": {
      "$ref": "#/components/schemas/MetricSeen"
    },
    "treatmentResults": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/TreatmentResultRep"
      },
      "deprecated": true,
      "description": "Deprecated, use <code>results</code> instead. Only populated when response does not contain results sliced by multiple attributes."
    },
    "probabilityOfMismatch": {
      "type": "number",
      "example": 0.9999999999999738,
      "description": "The probability of a Sample Ratio Mismatch"
    }
  }
}
object ExperimentCollectionRep
{
  "type": "object",
  "required": [
    "items"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Experiment"
      },
      "description": "An array of experiments"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "total_count": {
      "type": "integer",
      "description": "The total number of experiments in this project and environment. Does not include legacy experiments."
    }
  }
}
object ExperimentEnabledPeriodRep
{
  "type": "object",
  "properties": {
    "stopDate": {
      "$ref": "#/components/schemas/UnixMillis"
    },
    "startDate": {
      "$ref": "#/components/schemas/UnixMillis"
    }
  }
}
object ExperimentEnvironmentSettingRep
{
  "type": "object",
  "properties": {
    "stopDate": {
      "$ref": "#/components/schemas/UnixMillis"
    },
    "startDate": {
      "$ref": "#/components/schemas/UnixMillis"
    },
    "enabledPeriods": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ExperimentEnabledPeriodRep"
      }
    }
  }
}
object ExperimentInfoRep
{
  "type": "object",
  "required": [
    "baselineIdx",
    "items"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/LegacyExperimentRep"
      }
    },
    "baselineIdx": {
      "type": "integer"
    }
  }
}
object ExperimentMetadataRep
{
  "type": "object",
  "properties": {
    "key": {}
  }
}
object ExperimentPatchInput
{
  "type": "object",
  "required": [
    "instructions"
  ],
  "properties": {
    "comment": {
      "type": "string",
      "example": "Optional comment",
      "description": "Optional comment describing the update"
    },
    "instructions": {
      "$ref": "#/components/schemas/Instructions",
      "example": "[{\"kind\": \"updateName\", \"value\": \"Updated experiment name\"}]",
      "description": "The instructions to perform when updating. This should be an array with objects that look like <code>{\"kind\": \"update_action\"}</code>. Some instructions also require a <code>value</code> field in the array element."
    }
  }
}
object ExperimentPost
{
  "type": "object",
  "required": [
    "name",
    "key",
    "iteration"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "experiment-key-123abc",
      "description": "The experiment key"
    },
    "name": {
      "type": "string",
      "example": "Example experiment",
      "description": "The experiment name"
    },
    "iteration": {
      "$ref": "#/components/schemas/IterationInput",
      "description": "Details on the construction of the initial iteration"
    },
    "description": {
      "type": "string",
      "example": "An example experiment, used in testing",
      "description": "The experiment description"
    },
    "maintainerId": {
      "type": "string",
      "example": "12ab3c45de678910fgh12345",
      "description": "The ID of the member who maintains this experiment"
    }
  }
}
object ExperimentResults
{
  "type": "object",
  "properties": {
    "stats": {
      "$ref": "#/components/schemas/ExperimentStatsRep"
    },
    "_links": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "series": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ExperimentTimeSeriesSlice"
      }
    },
    "totals": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ExperimentTotalsRep"
      }
    },
    "metadata": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ExperimentMetadataRep"
      }
    },
    "metricSeen": {
      "$ref": "#/components/schemas/MetricSeen"
    },
    "granularity": {
      "type": "string"
    }
  }
}
object ExperimentStatsRep
{
  "type": "object",
  "properties": {
    "chi2": {
      "type": "number"
    },
    "pValue": {
      "type": "number"
    },
    "minSampleSizeMet": {
      "type": "boolean"
    },
    "winningVariationIdx": {
      "type": "integer"
    }
  }
}
object ExperimentTimeSeriesSlice
{
  "type": "object",
  "properties": {
    "Time": {
      "$ref": "#/components/schemas/UnixMillis"
    },
    "VariationData": {
      "$ref": "#/components/schemas/ExperimentTimeSeriesVariationSlices"
    }
  }
}
object ExperimentTimeSeriesVariationSlice
{
  "type": "object",
  "properties": {
    "count": {
      "type": "integer",
      "format": "int64"
    },
    "value": {
      "type": "number"
    },
    "conversionRate": {
      "type": "number"
    },
    "cumulativeCount": {
      "type": "integer",
      "format": "int64"
    },
    "cumulativeValue": {
      "type": "number"
    },
    "confidenceInterval": {
      "$ref": "#/components/schemas/ConfidenceIntervalRep"
    },
    "cumulativeConversionRate": {
      "type": "number"
    },
    "cumulativeConfidenceInterval": {
      "$ref": "#/components/schemas/ConfidenceIntervalRep"
    }
  }
}
array ExperimentTimeSeriesVariationSlices
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/ExperimentTimeSeriesVariationSlice"
  }
}
object ExperimentTotalsRep
{
  "type": "object",
  "properties": {
    "pValue": {
      "type": "number"
    },
    "improvement": {
      "type": "number"
    },
    "minSampleSize": {
      "type": "integer",
      "format": "int64"
    },
    "cumulativeCount": {
      "type": "integer",
      "format": "int64"
    },
    "cumulativeValue": {
      "type": "number"
    },
    "cumulativeConversionRate": {
      "type": "number"
    },
    "cumulativeImpressionCount": {
      "type": "integer",
      "format": "int64"
    },
    "cumulativeConfidenceInterval": {
      "$ref": "#/components/schemas/ConfidenceIntervalRep"
    }
  }
}
object ExpiringTarget
{
  "type": "object",
  "required": [
    "_id",
    "_version",
    "expirationDate",
    "contextKind",
    "contextKey",
    "_resourceId"
  ],
  "properties": {
    "_id": {
      "type": "string",
      "example": "12ab3c45de678910abc12345",
      "description": "The ID of this expiring target"
    },
    "_version": {
      "type": "integer",
      "example": 1,
      "description": "The version of this expiring target"
    },
    "contextKey": {
      "type": "string",
      "example": "context-key-123abc",
      "description": "A unique key used to represent the context to be removed"
    },
    "targetType": {
      "type": "string",
      "example": "included",
      "description": "A segment's target type, <code>included</code> or <code>excluded</code>. Included when expiring targets are updated on a segment."
    },
    "_resourceId": {
      "$ref": "#/components/schemas/ResourceId",
      "description": "Details on the segment or flag this expiring target belongs to, its environment, and its project"
    },
    "contextKind": {
      "type": "string",
      "example": "user",
      "description": "The context kind of the context to be removed"
    },
    "variationId": {
      "type": "string",
      "example": "cc4332e2-bd4d-4fe0-b509-dfd2caf8dd73",
      "description": "A unique ID used to represent the flag variation. Included when expiring targets are updated on a feature flag."
    },
    "expirationDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1672358400000",
      "description": "A timestamp for when the target expires"
    }
  }
}
object ExpiringTargetError
{
  "type": "object",
  "required": [
    "instructionIndex",
    "message"
  ],
  "properties": {
    "message": {
      "type": "string",
      "example": "example error message",
      "description": "The error message related to a failed PATCH instruction"
    },
    "instructionIndex": {
      "type": "integer",
      "example": 1,
      "description": "The index of the PATCH instruction where the error occurred"
    }
  }
}
object ExpiringTargetGetResponse
{
  "type": "object",
  "required": [
    "items"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ExpiringTarget"
      },
      "description": "A list of expiring targets"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    }
  }
}
object ExpiringTargetPatchResponse
{
  "type": "object",
  "required": [
    "items"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ExpiringTarget"
      },
      "description": "A list of the results from each instruction"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "errors": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ExpiringTargetError"
      }
    },
    "totalInstructions": {
      "type": "integer"
    },
    "failedInstructions": {
      "type": "integer"
    },
    "successfulInstructions": {
      "type": "integer"
    }
  }
}
object ExpiringUserTargetGetResponse
{
  "type": "object",
  "required": [
    "items"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ExpiringUserTargetItem"
      },
      "description": "An array of expiring user targets"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    }
  }
}
object ExpiringUserTargetItem
{
  "type": "object",
  "required": [
    "_id",
    "_version",
    "expirationDate",
    "userKey",
    "_resourceId"
  ],
  "properties": {
    "_id": {
      "type": "string",
      "example": "12ab3c45de678910fgh12345",
      "description": "The ID of this expiring user target"
    },
    "userKey": {
      "type": "string",
      "example": "example-user-key",
      "description": "A unique key used to represent the user"
    },
    "_version": {
      "type": "integer",
      "example": 1,
      "description": "The version of this expiring user target"
    },
    "targetType": {
      "type": "string",
      "example": "included",
      "description": "A segment's target type. Included when expiring user targets are updated on a segment."
    },
    "_resourceId": {
      "$ref": "#/components/schemas/ResourceIDResponse",
      "description": "Details on the resource from which the user is expiring"
    },
    "variationId": {
      "type": "string",
      "example": "ce67d625-a8b9-4fb5-a344-ab909d9d4f4d",
      "description": "A unique key used to represent the flag variation. Included when expiring user targets are updated on a feature flag."
    },
    "expirationDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1658192820000",
      "description": "A timestamp for when the user target expires"
    }
  }
}
object ExpiringUserTargetPatchResponse
{
  "type": "object",
  "required": [
    "items"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ExpiringUserTargetItem"
      },
      "description": "An array of expiring user targets"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "errors": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ExpiringTargetError"
      },
      "description": "An array of error messages for the failed instructions"
    },
    "totalInstructions": {
      "type": "integer",
      "example": 1,
      "description": "The total count of instructions sent in the PATCH request"
    },
    "failedInstructions": {
      "type": "integer",
      "example": 0,
      "description": "The total count of the failed instructions sent in the PATCH request"
    },
    "successfulInstructions": {
      "type": "integer",
      "example": 1,
      "description": "The total count of successful instructions sent in the PATCH request"
    }
  }
}
object Export
{
  "type": "object",
  "required": [
    "id",
    "segmentKey",
    "creationTime",
    "status",
    "sizeBytes",
    "size",
    "initiator",
    "_links"
  ],
  "properties": {
    "id": {
      "type": "string",
      "example": "1234a567-bcd8-9123-4567-abcd1234567f",
      "description": "The export ID"
    },
    "size": {
      "type": "string",
      "example": "18 B",
      "description": "The export size, with units"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources, including the location of the exported file",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "status": {
      "type": "string",
      "example": "complete",
      "description": "The export status"
    },
    "initiator": {
      "$ref": "#/components/schemas/InitiatorRep",
      "example": "{\"name\": \"Ariel Flores\", \"email\": \"ariel@acme.com\"}",
      "description": "Details on the member who initiated the export"
    },
    "sizeBytes": {
      "type": "integer",
      "format": "int64",
      "example": 18,
      "description": "The export size, in bytes"
    },
    "segmentKey": {
      "type": "string",
      "example": "example-big-segment",
      "description": "The segment key"
    },
    "creationTime": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1654104600000",
      "description": "Timestamp of when this export was created"
    }
  }
}
object Extinction
{
  "type": "object",
  "required": [
    "revision",
    "message",
    "time",
    "flagKey",
    "projKey"
  ],
  "properties": {
    "time": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1636558831870",
      "description": "Time of extinction"
    },
    "flagKey": {
      "type": "string",
      "example": "enable-feature",
      "description": "The feature flag key"
    },
    "message": {
      "type": "string",
      "example": "Remove flag for launched feature",
      "description": "Description of the extinction. For example, the commit message for the revision."
    },
    "projKey": {
      "type": "string",
      "example": "default",
      "description": "The project key"
    },
    "revision": {
      "type": "string",
      "example": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3",
      "description": "The identifier for the revision where flag became extinct. For example, a commit SHA."
    }
  }
}
object ExtinctionCollectionRep
{
  "type": "object",
  "required": [
    "_links",
    "items"
  ],
  "properties": {
    "items": {
      "type": "object",
      "description": "An array of extinction events",
      "additionalProperties": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/Extinction"
        }
      }
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    }
  }
}
array ExtinctionListPost
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/Extinction"
  }
}
object FailureReasonRep
{
  "type": "object",
  "required": [
    "attribute",
    "reason"
  ],
  "properties": {
    "reason": {
      "type": "string",
      "example": "must be present",
      "description": "The reason the attribute failed validation"
    },
    "attribute": {
      "type": "string",
      "example": "projectKey",
      "description": "The attribute that failed validation"
    }
  }
}
object FeatureFlag
{
  "type": "object",
  "required": [
    "name",
    "kind",
    "key",
    "_version",
    "creationDate",
    "variations",
    "temporary",
    "tags",
    "_links",
    "experiments",
    "customProperties",
    "archived",
    "deprecated",
    "environments"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "flag-key-123abc",
      "description": "A unique key used to reference the flag in your code"
    },
    "kind": {
      "enum": [
        "boolean",
        "multivariate"
      ],
      "type": "string",
      "example": "boolean",
      "description": "Kind of feature flag"
    },
    "name": {
      "type": "string",
      "example": "My Flag",
      "description": "A human-friendly name for the feature flag"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "example-tag"
      ],
      "description": "Tags for the feature flag"
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/flags/my-project/my-flag",
          "type": "application/json"
        },
        "parent": {
          "href": "/api/v2/flags/my-project",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "goalIds": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [],
      "deprecated": true,
      "description": "Deprecated, use <code>experiments</code> instead"
    },
    "_purpose": {
      "type": "string"
    },
    "_version": {
      "type": "integer",
      "example": 1,
      "description": "Version of the feature flag"
    },
    "archived": {
      "type": "boolean",
      "example": false,
      "description": "Boolean indicating if the feature flag is archived"
    },
    "defaults": {
      "$ref": "#/components/schemas/Defaults",
      "example": "{\"onVariation\":0,\"offVariation\":1}",
      "description": "The indices, from the array of variations, for the variations to serve by default when targeting is on and when targeting is off. These variations will be used for this flag in new environments. If omitted, the first and last variation will be used."
    },
    "temporary": {
      "type": "boolean",
      "example": true,
      "description": "Whether the flag is a temporary flag"
    },
    "deprecated": {
      "type": "boolean",
      "example": false,
      "description": "Boolean indicating if the feature flag is deprecated"
    },
    "variations": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Variation"
      },
      "example": [
        {
          "_id": "e432f62b-55f6-49dd-a02f-eb24acf39d05",
          "value": true
        },
        {
          "_id": "a00bf58d-d252-476c-b915-15a74becacb4",
          "value": false
        }
      ],
      "description": "An array of possible variations for the flag"
    },
    "_maintainer": {
      "$ref": "#/components/schemas/MemberSummary",
      "description": "Associated maintainer member info for the feature flag"
    },
    "description": {
      "type": "string",
      "example": "This flag controls the example widgets",
      "description": "Description of the feature flag"
    },
    "experiments": {
      "$ref": "#/components/schemas/ExperimentInfoRep",
      "example": "{\"baselineIdx\": 0,\"items\": []}",
      "description": "Experimentation data for the feature flag"
    },
    "archivedDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1494437420312",
      "description": "If archived is true, date of archive"
    },
    "creationDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1494437420312",
      "description": "Timestamp of flag creation date"
    },
    "environments": {
      "type": "object",
      "example": {
        "my-environment": {
          "on": false,
          "sel": "810edeadbeef4844facecafe438f2999492",
          "salt": "61eddeadbeef4da1facecafe3a60a397",
          "_site": {
            "href": "/default/my-environment/features/client-side-flag",
            "type": "text/html"
          },
          "rules": [],
          "targets": [
            {
              "values": [
                "user-key-123abc"
              ],
              "variation": 0,
              "contextKind": "user"
            }
          ],
          "version": 1,
          "_summary": {
            "variations": {
              "0": {
                "rules": 0,
                "targets": 1,
                "nullRules": 0,
                "isFallthrough": true,
                "contextTargets": 1
              },
              "1": {
                "isOff": true,
                "rules": 0,
                "targets": 0,
                "nullRules": 0
              }
            },
            "prerequisites": 0
          },
          "archived": false,
          "fallthrough": {
            "variation": 0
          },
          "trackEvents": false,
          "lastModified": 1627071171347,
          "offVariation": 1,
          "prerequisites": [],
          "contextTargets": [
            {
              "values": [
                "device-key-123abc"
              ],
              "variation": 0,
              "contextKind": "device"
            }
          ],
          "_environmentName": "My Environment",
          "trackEventsFallthrough": false
        }
      },
      "description": "Details on the environments for this flag. Only returned if the request is filtered by environment, using the <code>filterEnv</code> query parameter.",
      "additionalProperties": {
        "$ref": "#/components/schemas/FeatureFlagConfig"
      }
    },
    "maintainerId": {
      "type": "string",
      "example": "569f183514f4432160000007",
      "description": "Associated maintainerId for the feature flag"
    },
    "deprecatedDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1494437420312",
      "description": "If deprecated is true, date of deprecation"
    },
    "_maintainerTeam": {
      "$ref": "#/components/schemas/MaintainerTeam",
      "description": "Associated maintainer team info for the feature flag"
    },
    "customProperties": {
      "$ref": "#/components/schemas/CustomProperties",
      "example": "{\"jira.issues\":{\"name\":\"Jira issues\",\"value\":[\"is-123\",\"is-456\"]}}",
      "description": "Metadata attached to the feature flag, in the form of the property key associated with a name and array of values for the metadata to associate with this flag. Typically used to store data related to an integration."
    },
    "includeInSnippet": {
      "type": "boolean",
      "example": true,
      "deprecated": true,
      "description": "Deprecated, use <code>clientSideAvailability</code>. Whether this flag should be made available to the client-side JavaScript SDK"
    },
    "maintainerTeamKey": {
      "type": "string",
      "example": "team-1",
      "description": "The key of the associated team that maintains this feature flag"
    },
    "migrationSettings": {
      "$ref": "#/components/schemas/FlagMigrationSettingsRep",
      "description": "Migration-related settings for the flag"
    },
    "clientSideAvailability": {
      "$ref": "#/components/schemas/ClientSideAvailability",
      "example": "{\"usingMobileKey\":true,\"usingEnvironmentId\":false}",
      "description": "Which type of client-side SDKs the feature flag is available to"
    }
  }
}
object FeatureFlagBody
{
  "type": "object",
  "required": [
    "name",
    "key"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "flag-key-123abc",
      "description": "A unique key used to reference the flag in your code"
    },
    "name": {
      "type": "string",
      "example": "My flag",
      "description": "A human-friendly name for the feature flag"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "example-tag"
      ],
      "description": "Tags for the feature flag. Defaults to an empty array."
    },
    "purpose": {
      "enum": [
        "migration"
      ],
      "type": "string",
      "example": "migration",
      "description": "Purpose of the flag"
    },
    "defaults": {
      "$ref": "#/components/schemas/Defaults",
      "example": "{\"onVariation\":0, \"offVariation\":1}",
      "description": "The indices, from the array of variations, for the variations to serve by default when targeting is on and when targeting is off. These variations will be used for this flag in new environments. If omitted, the first and last variation will be used."
    },
    "temporary": {
      "type": "boolean",
      "example": false,
      "description": "Whether the flag is a temporary flag. Defaults to <code>true</code>."
    },
    "variations": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Variation"
      },
      "example": [
        {
          "value": true
        },
        {
          "value": false
        }
      ],
      "description": "An array of possible variations for the flag. The variation values must be unique. If omitted, two boolean variations of <code>true</code> and <code>false</code> will be used."
    },
    "description": {
      "type": "string",
      "example": "This flag controls the example widgets",
      "description": "Description of the feature flag. Defaults to an empty string."
    },
    "maintainerId": {
      "type": "string",
      "example": "12ab3c45de678910fgh12345",
      "description": "The ID of the member who maintains this feature flag"
    },
    "customProperties": {
      "$ref": "#/components/schemas/CustomProperties",
      "example": "{ \"jira.issues\": {\"name\": \"Jira issues\", \"value\": [\"is-123\", \"is-456\"]} }",
      "description": "Metadata attached to the feature flag, in the form of the property key associated with a name and array of values for the metadata to associate with this flag. Typically used to store data related to an integration."
    },
    "includeInSnippet": {
      "type": "boolean",
      "deprecated": true,
      "description": "Deprecated, use <code>clientSideAvailability</code>. Whether this flag should be made available to the client-side JavaScript SDK. Defaults to <code>false</code>."
    },
    "maintainerTeamKey": {
      "type": "string",
      "example": "team-1",
      "description": "The key of the team that maintains this feature flag"
    },
    "migrationSettings": {
      "$ref": "#/components/schemas/MigrationSettingsPost",
      "description": "Settings relevant to flags where <code>purpose</code> is <code>migration</code>"
    },
    "clientSideAvailability": {
      "$ref": "#/components/schemas/ClientSideAvailabilityPost",
      "example": "{\"usingMobileKey\":true,\"usingEnvironmentId\":false}",
      "description": "Which type of client-side SDKs the feature flag is available to"
    }
  }
}
object FeatureFlagConfig
{
  "type": "object",
  "required": [
    "on",
    "archived",
    "salt",
    "sel",
    "lastModified",
    "version",
    "_site",
    "_environmentName",
    "trackEvents",
    "trackEventsFallthrough"
  ],
  "properties": {
    "on": {
      "type": "boolean",
      "description": "Whether the flag is on"
    },
    "sel": {
      "type": "string"
    },
    "salt": {
      "type": "string"
    },
    "_site": {
      "$ref": "#/components/schemas/Link",
      "description": "Details on how to access the flag configuration in the LaunchDarkly UI"
    },
    "rules": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Rule"
      },
      "description": "An array of the rules for how to serve a variation to specific targets based on their attributes"
    },
    "_access": {
      "$ref": "#/components/schemas/Access",
      "description": "Details on the allowed and denied actions for this flag"
    },
    "targets": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Target"
      },
      "description": "An array of the individual targets that will receive a specific variation based on their key. Individual targets with a context kind of 'user' are included here."
    },
    "version": {
      "type": "integer",
      "description": "Version of the feature flag"
    },
    "_summary": {
      "$ref": "#/components/schemas/FlagSummary",
      "description": "A summary of the prerequisites and variations for this flag"
    },
    "archived": {
      "type": "boolean",
      "description": "Boolean indicating if the feature flag is archived"
    },
    "evaluation": {
      "$ref": "#/components/schemas/FlagConfigEvaluation",
      "description": "Evaluation information for the flag"
    },
    "fallthrough": {
      "$ref": "#/components/schemas/VariationOrRolloutRep",
      "description": "Details on the variation or rollout to serve as part of the flag's default rule"
    },
    "trackEvents": {
      "type": "boolean",
      "description": "Whether LaunchDarkly tracks events for the feature flag, for all rules"
    },
    "lastModified": {
      "$ref": "#/components/schemas/UnixMillis",
      "description": "Timestamp of when the flag configuration was most recently modified"
    },
    "offVariation": {
      "type": "integer",
      "description": "The ID of the variation to serve when the flag is off"
    },
    "prerequisites": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Prerequisite"
      },
      "description": "An array of the prerequisite flags and their variations that are required before this flag takes effect"
    },
    "contextTargets": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Target"
      },
      "description": "An array of the individual targets that will receive a specific variation based on their key. Individual targets with context kinds other than 'user' are included here."
    },
    "_environmentName": {
      "type": "string",
      "description": "The environment name"
    },
    "migrationSettings": {
      "$ref": "#/components/schemas/FlagConfigMigrationSettingsRep",
      "description": "Migration-related settings for the flag configuration"
    },
    "_debugEventsUntilDate": {
      "$ref": "#/components/schemas/UnixMillis"
    },
    "trackEventsFallthrough": {
      "type": "boolean",
      "description": "Whether LaunchDarkly tracks events for the feature flag, for the default rule"
    }
  }
}
object FeatureFlagScheduledChange
{
  "type": "object",
  "required": [
    "_id",
    "_creationDate",
    "_maintainerId",
    "_version",
    "executionDate",
    "instructions"
  ],
  "properties": {
    "_id": {
      "$ref": "#/components/schemas/FeatureWorkflowId",
      "example": "12ab3c45de678910abc12345",
      "description": "The ID of this scheduled change"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "_version": {
      "type": "integer",
      "example": 1,
      "description": "Version of the scheduled change"
    },
    "conflicts": {
      "description": "Details on any conflicting scheduled changes"
    },
    "instructions": {
      "$ref": "#/components/schemas/Instructions",
      "example": "[ { \"kind\": \"turnFlagOn\" }]",
      "description": "The actions to perform on the execution date for these scheduled changes"
    },
    "_creationDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1654123897062",
      "description": "Timestamp of when the scheduled change was created"
    },
    "_maintainerId": {
      "type": "string",
      "example": "12ab3c45de678910abc12345",
      "description": "The ID of the scheduled change maintainer"
    },
    "executionDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1636558831870",
      "description": "When the scheduled changes should be executed"
    }
  }
}
object FeatureFlagScheduledChanges
{
  "type": "object",
  "required": [
    "items"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/FeatureFlagScheduledChange"
      },
      "description": "Array of scheduled changes"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    }
  }
}
object FeatureFlagStatus
{
  "type": "object",
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "example": "inactive",
      "description": "Status of the flag"
    },
    "default": {
      "description": "Default value seen from code"
    },
    "lastRequested": {
      "type": "string",
      "format": "date-time",
      "example": "2020-02-05T18:17:01.514Z",
      "description": "Timestamp of last time flag was requested"
    }
  }
}
object FeatureFlagStatusAcrossEnvironments
{
  "type": "object",
  "required": [
    "environments",
    "key",
    "_links"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "flag-key-123abc",
      "description": "feature flag key"
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/flag-status/my-project/my-flag",
          "type": "application/json"
        },
        "parent": {
          "href": "/api/v2/flag-status",
          "type": "application/json"
        }
      },
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "environments": {
      "type": "object",
      "example": {
        "production": {
          "name": "inactive",
          "lastRequested": "2020-02-05T18:17:01.514Z"
        }
      },
      "description": "Flag status for environment.",
      "additionalProperties": {
        "$ref": "#/components/schemas/FeatureFlagStatus"
      }
    }
  }
}
object FeatureFlagStatuses
{
  "type": "object",
  "required": [
    "_links"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/FlagStatusRep"
      }
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/flag-statuses/my-project/my-environment",
          "type": "application/json"
        }
      },
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    }
  }
}
object FeatureFlags
{
  "type": "object",
  "required": [
    "items",
    "_links"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/FeatureFlag"
      },
      "description": "An array of feature flags"
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/flags/default",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "totalCount": {
      "type": "integer",
      "example": 1,
      "description": "The total number of flags"
    },
    "totalCountWithDifferences": {
      "type": "integer",
      "example": 0,
      "description": "The number of flags that have differences between environments. Only shown when query parameter <code>compare</code> is <code>true</code>."
    }
  }
}
array FeatureFlagsBetaGetMigrationSafetyIssuesResponse
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/MigrationSafetyIssueRep"
  }
}
string FeatureWorkflowId
{
  "type": "string"
}
object FileRep
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "example": "complete",
      "description": "The imported file status"
    },
    "filename": {
      "type": "string",
      "example": "bigsegimport.csv",
      "description": "The imported file name, including the extension"
    }
  }
}
object FlagConfigApprovalRequestResponse
{
  "type": "object",
  "required": [
    "_id",
    "_version",
    "creationDate",
    "serviceKind",
    "reviewStatus",
    "allReviews",
    "notifyMemberIds",
    "status",
    "instructions",
    "conflicts",
    "_links"
  ],
  "properties": {
    "_id": {
      "type": "string",
      "example": "12ab3c45de678910abc12345",
      "description": "The ID of this approval request"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {}
    },
    "source": {
      "$ref": "#/components/schemas/CopiedFromEnv",
      "description": "Details about the source feature flag, if copied"
    },
    "status": {
      "enum": [
        "pending",
        "completed",
        "failed",
        "scheduled"
      ],
      "type": "string",
      "example": "pending",
      "description": "Current status of the approval request"
    },
    "_version": {
      "type": "integer",
      "example": 1,
      "description": "Version of the approval request"
    },
    "conflicts": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Conflict"
      },
      "description": "Details on any conflicting approval requests"
    },
    "allReviews": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ReviewResponse"
      },
      "description": "An array of individual reviews of this approval request"
    },
    "appliedDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1654104600000",
      "description": "Timestamp of when the approval request was applied"
    },
    "description": {
      "type": "string",
      "example": "example: request approval from someone",
      "description": "A human-friendly name for the approval request"
    },
    "requestorId": {
      "type": "string",
      "example": "12ab3c45de678910abc12345",
      "description": "The ID of the member who requested the approval"
    },
    "serviceKind": {
      "$ref": "#/components/schemas/ApprovalRequestServiceKind",
      "example": "launchdarkly",
      "description": "The approval service for this request. May be LaunchDarkly or an external approval service, such as ServiceNow or JIRA."
    },
    "creationDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1654104600000",
      "description": "Timestamp of when the approval request was created"
    },
    "instructions": {
      "$ref": "#/components/schemas/Instructions",
      "example": "[{\"kind\": \"turnFlagOn\"}]",
      "description": "List of instructions in semantic patch format to be applied to the feature flag"
    },
    "reviewStatus": {
      "enum": [
        "approved",
        "declined",
        "pending"
      ],
      "type": "string",
      "example": "pending",
      "description": "Current status of the review of this approval request"
    },
    "executionDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1654104600000",
      "description": "Timestamp for when instructions will be executed"
    },
    "operatingOnId": {
      "type": "string",
      "example": "12ab3c45de678910abc12345",
      "description": "ID of scheduled change to edit or delete"
    },
    "notifyMemberIds": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "1234a56b7c89d012345e678f"
      ],
      "description": "An array of member IDs. These members are notified to review the approval request."
    },
    "appliedByMemberId": {
      "type": "string",
      "example": "1234a56b7c89d012345e678f",
      "description": "The member ID of the member who applied the approval request"
    },
    "integrationMetadata": {
      "$ref": "#/components/schemas/IntegrationMetadata",
      "description": "Details about the object in an external service corresponding to this approval request, such as a ServiceNow change request or a JIRA ticket, if an external approval service is being used"
    },
    "customWorkflowMetadata": {
      "$ref": "#/components/schemas/CustomWorkflowMeta",
      "description": "Details about the custom workflow, if this approval request is part of a custom workflow"
    },
    "appliedByServiceTokenId": {
      "type": "string",
      "example": "1234a56b7c89d012345e678f",
      "description": "The service token ID of the service token which applied the approval request"
    }
  }
}
object FlagConfigApprovalRequestsResponse
{
  "type": "object",
  "required": [
    "items",
    "_links"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/FlagConfigApprovalRequestResponse"
      },
      "description": "An array of approval requests"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    }
  }
}
object FlagConfigEvaluation
{
  "type": "object",
  "properties": {
    "contextKinds": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  }
}
object FlagConfigMigrationSettingsRep
{
  "type": "object",
  "properties": {
    "checkRatio": {
      "type": "integer"
    }
  }
}
object FlagCopyConfigEnvironment
{
  "type": "object",
  "required": [
    "key"
  ],
  "properties": {
    "key": {
      "type": "string",
      "description": "The environment key"
    },
    "currentVersion": {
      "type": "integer",
      "description": "Optional flag version. If you include this, the operation only succeeds if the current flag version in the environment matches this version."
    }
  }
}
object FlagCopyConfigPost
{
  "type": "object",
  "required": [
    "source",
    "target"
  ],
  "properties": {
    "source": {
      "$ref": "#/components/schemas/FlagCopyConfigEnvironment",
      "example": "{\"key\": \"source-env-key-123abc\", \"currentVersion\": 1}",
      "description": "The source environment"
    },
    "target": {
      "$ref": "#/components/schemas/FlagCopyConfigEnvironment",
      "example": "{\"key\": \"target-env-key-123abc\", \"currentVersion\": 1}",
      "description": "The target environment"
    },
    "comment": {
      "type": "string",
      "description": "Optional comment"
    },
    "excludedActions": {
      "type": "array",
      "items": {
        "enum": [
          "updateOn",
          "updateRules",
          "updateFallthrough",
          "updateOffVariation",
          "updatePrerequisites",
          "updateTargets",
          "updateFlagConfigMigrationSettings"
        ],
        "type": "string"
      },
      "example": [
        "updateOn"
      ],
      "description": "Optional list of the flag changes NOT to copy from the source environment to the target environment. You may include either  <code>includedActions</code> or <code>excludedActions</code>, but not both. If you include neither, then all flag changes will be copied."
    },
    "includedActions": {
      "type": "array",
      "items": {
        "enum": [
          "updateOn",
          "updateRules",
          "updateFallthrough",
          "updateOffVariation",
          "updatePrerequisites",
          "updateTargets",
          "updateFlagConfigMigrationSettings"
        ],
        "type": "string"
      },
      "example": [
        "updateOn"
      ],
      "description": "Optional list of the flag changes to copy from the source environment to the target environment. You may include either <code>includedActions</code> or <code>excludedActions</code>, but not both. If you include neither, then all flag changes will be copied."
    }
  }
}
object FlagEventCollectionRep
{
  "type": "object",
  "required": [
    "totalCount",
    "items"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/FlagEventRep"
      },
      "description": "A list of flag events"
    },
    "_links": {
      "type": "object",
      "example": {
        "next": {
          "href": "/api/v2/engineering-insights/flag-events?after=a4290006-1fd1-4ca5-acf7-9f31fac61cf5",
          "type": "application/json"
        },
        "self": {
          "href": "/api/v2/engineering-insights/flag-events",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "totalCount": {
      "type": "integer",
      "example": 1200,
      "description": "The total number of flag events"
    }
  }
}
object FlagEventExperiment
{
  "type": "object",
  "required": [
    "key",
    "name",
    "iteration"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "experiment-1",
      "description": "The experiment key"
    },
    "name": {
      "type": "string",
      "example": "Experiment 1",
      "description": "The experiment name"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "iteration": {
      "$ref": "#/components/schemas/FlagEventExperimentIteration",
      "description": "The experiment iteration"
    }
  }
}
object FlagEventExperimentCollection
{
  "type": "object",
  "required": [
    "totalCount",
    "items"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/FlagEventExperiment"
      },
      "description": "A list of experiments"
    },
    "totalCount": {
      "type": "integer",
      "example": 1,
      "description": "The total number of experiments"
    }
  }
}
object FlagEventExperimentIteration
{
  "type": "object",
  "required": [
    "id",
    "status",
    "startedAt"
  ],
  "properties": {
    "id": {
      "type": "string",
      "example": "65baa44ecc4b5bce113bb4f7",
      "description": "The experiment iteration ID"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "status": {
      "$ref": "#/components/schemas/IterationStatus",
      "enum": [
        "running",
        "stopped"
      ],
      "example": "running",
      "description": "The experiment iteration status"
    },
    "endedAt": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1656610200000",
      "description": "Timestamp of when the iteration ended"
    },
    "startedAt": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1655314200000",
      "description": "Timestamp of when the iteration started"
    }
  }
}
object FlagEventImpactRep
{
  "type": "object",
  "properties": {
    "size": {
      "enum": [
        "none",
        "small",
        "medium",
        "large"
      ],
      "type": "string",
      "example": "medium",
      "description": "The size of the flag event impact. Sizes are defined as: none (0%), small (0-20%), medium (20-80%), large (>80%)"
    },
    "reason": {
      "$ref": "#/components/schemas/ImpactReason",
      "enum": [
        "evaluations",
        "global",
        "waiting"
      ],
      "example": "evaluations",
      "description": "The reason for the flag event impact"
    },
    "percentage": {
      "type": "number",
      "example": 50,
      "description": "The percentage of the flag event impact"
    },
    "evaluationsSummary": {
      "$ref": "#/components/schemas/EvaluationsSummary",
      "description": "A summary of the change in variation evaluations after the flag event"
    }
  }
}
object FlagEventMemberRep
{
  "type": "object",
  "required": [
    "id",
    "email",
    "firstName",
    "lastName"
  ],
  "properties": {
    "id": {
      "type": "string",
      "example": "65baa44ecc4b5bce113bb4f7",
      "description": "The member ID"
    },
    "email": {
      "type": "string",
      "example": "test@launchdarkly.com",
      "description": "The member email"
    },
    "lastName": {
      "type": "string",
      "description": "The member last name"
    },
    "firstName": {
      "type": "string",
      "description": "The member first name"
    }
  }
}
object FlagEventRep
{
  "type": "object",
  "required": [
    "id",
    "projectId",
    "projectKey",
    "flagKey",
    "eventType",
    "eventTime",
    "description",
    "impact"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "example": "e3b2b0e0-9e9b-4c9a-8e9a-0e0e0e0e0e0e",
      "description": "The flag event ID"
    },
    "impact": {
      "$ref": "#/components/schemas/FlagEventImpactRep",
      "description": "The flag event evaluation impact"
    },
    "member": {
      "$ref": "#/components/schemas/FlagEventMemberRep",
      "description": "The member data"
    },
    "actions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The resource actions"
    },
    "flagKey": {
      "type": "string",
      "example": "enable-new-payment-method",
      "description": "The flag key"
    },
    "eventTime": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1616425200000",
      "description": "A Unix timestamp in milliseconds"
    },
    "eventType": {
      "$ref": "#/components/schemas/EventType",
      "example": "enabled_targeting",
      "description": "The event type"
    },
    "projectId": {
      "type": "string",
      "example": "65baa44ecc4b5bce113bb4f7",
      "description": "The project ID"
    },
    "projectKey": {
      "type": "string",
      "example": "default",
      "description": "The project key"
    },
    "description": {
      "type": "string",
      "example": "Targeting rule enabled",
      "description": "The event description"
    },
    "experiments": {
      "$ref": "#/components/schemas/FlagEventExperimentCollection",
      "description": "A list of experiment iterations related to the flag event"
    },
    "environmentId": {
      "type": "string",
      "example": "65baa44ecc4b5bce113bb4f7",
      "description": "The environment ID"
    },
    "environmentKey": {
      "type": "string",
      "example": "production",
      "description": "The environment key"
    },
    "auditLogEntryId": {
      "type": "string",
      "example": "e3b2b0e0-9e9b-4c9a-8e9a-0e0e0e0e0e0e",
      "description": "The audit log entry ID"
    }
  }
}
object FlagFollowersByProjEnvGetRep
{
  "type": "object",
  "required": [
    "_links"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/followersPerFlag"
      },
      "description": "An array of flags and their followers"
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/projects/my-project/flags/my-flay/environments/my-environment/followers",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    }
  }
}
object FlagFollowersGetRep
{
  "type": "object",
  "required": [
    "_links",
    "items"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/FollowFlagMember"
      },
      "description": "An array of members who are following this flag"
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/projects/my-project/flags/my-flay/environments/my-environment/followers",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    }
  }
}
object FlagInput
{
  "type": "object",
  "required": [
    "ruleId",
    "flagConfigVersion"
  ],
  "properties": {
    "ruleId": {
      "type": "string",
      "example": "e432f62b-55f6-49dd-a02f-eb24acf39d05",
      "description": "The ID of the variation or rollout of the flag to use. Use \"fallthrough\" for the default targeting behavior when the flag is on."
    },
    "flagConfigVersion": {
      "type": "integer",
      "example": 12,
      "description": "The flag version"
    }
  }
}
object FlagLinkCollectionRep
{
  "type": "object",
  "required": [
    "items",
    "_links"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/FlagLinkRep"
      },
      "description": "An array of flag links"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    }
  }
}
object FlagLinkMember
{
  "type": "object",
  "required": [
    "_links",
    "_id"
  ],
  "properties": {
    "_id": {
      "type": "string"
    },
    "_links": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "lastName": {
      "type": "string"
    },
    "firstName": {
      "type": "string"
    }
  }
}
object FlagLinkRep
{
  "type": "object",
  "required": [
    "_links",
    "_id",
    "_deepLink",
    "_timestamp",
    "_createdAt"
  ],
  "properties": {
    "_id": {
      "type": "string",
      "example": "1234a56b7c89d012345e678f",
      "description": "The ID of this flag link"
    },
    "_key": {
      "type": "string",
      "example": "flag-link-key-123abc",
      "description": "The flag link key"
    },
    "title": {
      "type": "string",
      "example": "Example link title",
      "description": "The title of the flag link"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "_member": {
      "$ref": "#/components/schemas/FlagLinkMember",
      "description": "Details on the member associated with this flag link"
    },
    "_deepLink": {
      "type": "string",
      "example": "https://example.com/archives/123123123",
      "description": "The URL for the external resource the flag is linked to"
    },
    "_metadata": {
      "type": "object",
      "description": "The metadata required by this integration in order to create a flag link, if this is a flag link for an existing integration. Defined in the integration's <code>manifest.json</code> file under <code>flagLink</code>.",
      "additionalProperties": {
        "type": "string"
      }
    },
    "_createdAt": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1654104600000",
      "description": "Timestamp of when the flag link was created"
    },
    "_timestamp": {
      "$ref": "#/components/schemas/TimestampRep",
      "example": "{\"milliseconds\": 1655342199935, \"seconds\": 1655342199, \"rfc3339\": \"2022-06-16T01:16:39Z\", \"simple\": \"2022-06-16 01:16:39\"}",
      "description": "The time to mark this flag link as associated with the external URL. Defaults to the creation time of the flag link, but can be set to another time during creation."
    },
    "description": {
      "type": "string",
      "example": "Example link description",
      "description": "The description of the flag link"
    },
    "_integrationKey": {
      "type": "string",
      "description": "The integration key for an integration whose <code>manifest.json</code> includes the <code>flagLink</code> capability, if this is a flag link for an existing integration"
    }
  }
}
object FlagListingRep
{
  "type": "object",
  "required": [
    "name",
    "key"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "flag-key-123abc",
      "description": "The flag key"
    },
    "name": {
      "type": "string",
      "example": "Example flag",
      "description": "The flag name"
    },
    "_site": {
      "$ref": "#/components/schemas/Link"
    },
    "_links": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    }
  }
}
object FlagMigrationSettingsRep
{
  "type": "object",
  "properties": {
    "stageCount": {
      "type": "integer",
      "example": 6,
      "description": "The number of stages for this migration flag"
    },
    "contextKind": {
      "type": "string",
      "example": "device",
      "description": "The context kind targeted by this migration flag. Only applicable for six-stage migrations."
    }
  }
}
object FlagReferenceCollectionRep
{
  "type": "object",
  "required": [
    "totalCount",
    "items"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/FlagReferenceRep"
      },
      "description": "A list of flag references"
    },
    "totalCount": {
      "type": "integer",
      "example": 25,
      "description": "The total number of flag references"
    }
  }
}
object FlagReferenceRep
{
  "type": "object",
  "required": [
    "projectKey",
    "flagKey",
    "referencesAdded",
    "referencesRemoved"
  ],
  "properties": {
    "flagKey": {
      "type": "string",
      "example": "enable-new-payment-structure",
      "description": "The flag key"
    },
    "projectKey": {
      "type": "string",
      "example": "default",
      "description": "The project key"
    },
    "referencesAdded": {
      "type": "integer",
      "example": 2,
      "description": "The number of references added"
    },
    "referencesRemoved": {
      "type": "integer",
      "example": 5,
      "description": "The number of references removed"
    }
  }
}
object FlagRep
{
  "type": "object",
  "required": [
    "_links"
  ],
  "properties": {
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/flags/my-project/my-flag",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "targetingRule": {
      "type": "string",
      "example": "fallthrough",
      "description": "The targeting rule"
    },
    "flagConfigVersion": {
      "type": "integer",
      "example": 12,
      "description": "The flag version"
    },
    "targetingRuleClauses": {
      "type": "array",
      "items": {},
      "description": "An array of clauses used for individual targeting based on attributes"
    },
    "targetingRuleDescription": {
      "type": "string",
      "example": "Customers who live in Canada",
      "description": "The rule description"
    }
  }
}
object FlagScheduledChangesInput
{
  "type": "object",
  "required": [
    "instructions"
  ],
  "properties": {
    "comment": {
      "type": "string",
      "example": "optional comment",
      "description": "Optional comment describing the update to the scheduled changes"
    },
    "instructions": {
      "$ref": "#/components/schemas/Instructions",
      "example": "[ { \"kind\": \"replaceScheduledChangesInstructions\", \"value\": [ { \"kind\": \"turnFlagOff\" } ] } ]",
      "description": "The instructions to perform when updating. This should be an array with objects that look like <code>{\"kind\": \"update_action\"}</code>. Some instructions also require a <code>value</code> field in the array element."
    }
  }
}
object FlagStatusRep
{
  "type": "object",
  "required": [
    "_links"
  ],
  "properties": {
    "name": {
      "type": "string",
      "example": "inactive",
      "description": "Status of the flag"
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/flag-statuses/my-project/my-flag",
          "type": "application/json"
        },
        "parent": {
          "href": "/api/v2/flags/my-project/my-flag",
          "type": "application/json"
        }
      },
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "default": {
      "description": "Default value seen from code"
    },
    "lastRequested": {
      "type": "string",
      "format": "date-time",
      "example": "2020-02-05T18:17:01.514Z",
      "description": "Timestamp of last time flag was requested"
    }
  }
}
object FlagSummary
{
  "type": "object",
  "required": [
    "variations",
    "prerequisites"
  ],
  "properties": {
    "variations": {
      "$ref": "#/components/schemas/AllVariationsSummary",
      "description": "A summary of the variations for this flag"
    },
    "prerequisites": {
      "type": "integer",
      "description": "The number of prerequisites for this flag"
    }
  }
}
object FlagTriggerInput
{
  "type": "object",
  "properties": {
    "comment": {
      "type": "string",
      "example": "optional comment",
      "description": "Optional comment describing the update"
    },
    "instructions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Instruction"
      },
      "example": [
        {
          "kind": "disableTrigger"
        }
      ],
      "description": "The instructions to perform when updating. This should be an array with objects that look like <code>{\"kind\": \"trigger_action\"}</code>."
    }
  }
}
object FlagsInput
{
  "type": "object",
  "additionalProperties": {
    "$ref": "#/components/schemas/FlagInput"
  }
}
object FollowFlagMember
{
  "type": "object",
  "required": [
    "_links",
    "_id",
    "role",
    "email"
  ],
  "properties": {
    "_id": {
      "type": "string",
      "example": "569f183514f4432160000007",
      "description": "The member's ID"
    },
    "role": {
      "type": "string",
      "example": "admin",
      "description": "The member's built-in role. If the member has no custom roles, this role will be in effect."
    },
    "email": {
      "type": "string",
      "example": "ariel@acme.com",
      "description": "The member's email address"
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/members/569f183514f4432160000007",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "lastName": {
      "type": "string",
      "example": "Flores",
      "description": "The member's last name"
    },
    "firstName": {
      "type": "string",
      "example": "Ariel",
      "description": "The member's first name"
    }
  }
}
object ForbiddenErrorRep
{
  "type": "object",
  "required": [
    "code",
    "message"
  ],
  "properties": {
    "code": {
      "type": "string",
      "example": "forbidden",
      "description": "Specific error code encountered"
    },
    "message": {
      "type": "string",
      "example": "Forbidden. Access to the requested resource was denied.",
      "description": "Description of the error"
    }
  }
}
object FormVariableConfig
{
  "type": "object",
  "additionalProperties": {}
}
object HunkRep
{
  "type": "object",
  "required": [
    "startingLineNumber"
  ],
  "properties": {
    "lines": {
      "type": "string",
      "example": "var enableFeature = 'enable-feature';",
      "description": "Contextual lines of code that include the referenced feature flag"
    },
    "aliases": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "enableFeature",
        "EnableFeature"
      ],
      "description": "An array of flag key aliases"
    },
    "flagKey": {
      "type": "string",
      "example": "enable-feature",
      "description": "The feature flag key"
    },
    "projKey": {
      "type": "string",
      "example": "default",
      "description": "The project key"
    },
    "startingLineNumber": {
      "type": "integer",
      "example": 45,
      "description": "Line number of beginning of code reference hunk"
    }
  }
}
string ImpactReason
{
  "type": "string"
}
object Import
{
  "type": "object",
  "required": [
    "id",
    "segmentKey",
    "creationTime",
    "mode",
    "status",
    "_links"
  ],
  "properties": {
    "id": {
      "type": "string",
      "example": "1234a567-bcd8-9123-4567-abcd1234567f",
      "description": "The import ID"
    },
    "mode": {
      "type": "string",
      "example": "replace",
      "description": "The import mode used, either <code>merge</code> or <code>replace</code>"
    },
    "files": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/FileRep"
      },
      "example": [
        {
          "status": "complete",
          "filename": "bigsegimport.csv"
        }
      ],
      "description": "The imported files and their status"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "status": {
      "type": "string",
      "example": "complete",
      "description": "The import status"
    },
    "segmentKey": {
      "type": "string",
      "example": "example-big-segment",
      "description": "The segment key"
    },
    "creationTime": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1654104600000",
      "description": "Timestamp of when this import was created"
    }
  }
}
object InitiatorRep
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "example": "Bob Loblaw",
      "description": "The name of the member who initiated the export"
    },
    "email": {
      "type": "string",
      "example": "ariel@acme.com",
      "description": "The email address of the member who initiated the export"
    }
  }
}
object InsightGroup
{
  "type": "object",
  "required": [
    "key",
    "name",
    "projectKey",
    "environmentKey",
    "createdAt"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "default-production-all-apps",
      "description": "The insight group key"
    },
    "name": {
      "type": "string",
      "example": "Production - All Apps",
      "description": "The insight group name"
    },
    "scores": {
      "$ref": "#/components/schemas/InsightGroupScores",
      "description": "The scores for the insight group"
    },
    "createdAt": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1706701522000",
      "description": "The time the insight group was created"
    },
    "projectKey": {
      "type": "string",
      "example": "default",
      "description": "The project key"
    },
    "environment": {
      "$ref": "#/components/schemas/Environment",
      "description": "Expanded details about the environment"
    },
    "scoreMetadata": {
      "$ref": "#/components/schemas/InsightGroupCollectionScoreMetadata",
      "description": "Metadata about the insight scores, when expanded"
    },
    "environmentKey": {
      "type": "string",
      "example": "production",
      "description": "The environment key"
    },
    "applicationKeys": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "billing-service",
        "inventory-service"
      ],
      "description": "The application keys"
    }
  }
}
object InsightGroupCollection
{
  "type": "object",
  "required": [
    "totalCount",
    "items"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/InsightGroup"
      },
      "description": "A list of insight groups"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "metadata": {
      "$ref": "#/components/schemas/InsightGroupCollectionMetadata",
      "description": "Metadata about the insight groups"
    },
    "totalCount": {
      "type": "integer",
      "example": 15,
      "description": "The total number of insight groups"
    },
    "scoreMetadata": {
      "$ref": "#/components/schemas/InsightGroupCollectionScoreMetadata",
      "description": "Metadata about the insight scores, when expanded"
    }
  }
}
object InsightGroupCollectionMetadata
{
  "type": "object",
  "required": [
    "countByIndicator"
  ],
  "properties": {
    "countByIndicator": {
      "$ref": "#/components/schemas/InsightGroupsCountByIndicator"
    }
  }
}
object InsightGroupCollectionScoreMetadata
{
  "type": "object",
  "required": [
    "period",
    "lastPeriod"
  ],
  "properties": {
    "period": {
      "$ref": "#/components/schemas/InsightPeriod",
      "description": "The time period for the score calculations"
    },
    "lastPeriod": {
      "$ref": "#/components/schemas/InsightPeriod",
      "description": "The time period for the score calculations in the last period"
    }
  }
}
object InsightGroupScores
{
  "type": "object",
  "required": [
    "overall",
    "deploymentFrequency",
    "deploymentFailureRate",
    "leadTime",
    "impactSize",
    "experimentationCoverage",
    "flagHealth",
    "velocity",
    "risk",
    "efficiency"
  ],
  "properties": {
    "risk": {
      "$ref": "#/components/schemas/InsightsMetricScore",
      "description": "The risk score for the insight group"
    },
    "overall": {
      "$ref": "#/components/schemas/InsightsMetricScore",
      "description": "The overall score for the insight group"
    },
    "leadTime": {
      "$ref": "#/components/schemas/InsightsMetricScore",
      "description": "The lead time score for the insight group"
    },
    "velocity": {
      "$ref": "#/components/schemas/InsightsMetricScore",
      "description": "The velocity score for the insight group"
    },
    "efficiency": {
      "$ref": "#/components/schemas/InsightsMetricScore",
      "description": "The efficiency score for the insight group"
    },
    "flagHealth": {
      "$ref": "#/components/schemas/InsightsMetricScore",
      "description": "The flag health score for the insight group"
    },
    "impactSize": {
      "$ref": "#/components/schemas/InsightsMetricScore",
      "description": "The impact size score for the insight group"
    },
    "creationRatio": {
      "$ref": "#/components/schemas/InsightsMetricScore",
      "description": "The creation ratio score for the insight group"
    },
    "deploymentFrequency": {
      "$ref": "#/components/schemas/InsightsMetricScore",
      "description": "The deployment frequency score for the insight group"
    },
    "deploymentFailureRate": {
      "$ref": "#/components/schemas/InsightsMetricScore",
      "description": "The deployment failure rate score for the insight group"
    },
    "experimentationCoverage": {
      "$ref": "#/components/schemas/InsightsMetricScore",
      "description": "The Experimentation coverage score for the insight group"
    }
  }
}
object InsightGroupsCountByIndicator
{
  "type": "object",
  "required": [
    "excellent",
    "good",
    "fair",
    "needsAttention",
    "notCalculated",
    "unknown",
    "total"
  ],
  "properties": {
    "fair": {
      "type": "integer",
      "example": 1,
      "description": "The number of insight groups with a fair indicator"
    },
    "good": {
      "type": "integer",
      "example": 1,
      "description": "The number of insight groups with a good indicator"
    },
    "total": {
      "type": "integer",
      "example": 6,
      "description": "The total number of insight groups"
    },
    "unknown": {
      "type": "integer",
      "example": 1,
      "description": "The number of insight groups with an unknown indicator"
    },
    "excellent": {
      "type": "integer",
      "example": 1,
      "description": "The number of insight groups with an excellent indicator"
    },
    "notCalculated": {
      "type": "integer",
      "example": 1,
      "description": "The number of insight groups with a not calculated indicator"
    },
    "needsAttention": {
      "type": "integer",
      "example": 1,
      "description": "The number of insight groups with a needs attention indicator"
    }
  }
}
object InsightPeriod
{
  "type": "object",
  "required": [
    "startTime",
    "endTime"
  ],
  "properties": {
    "endTime": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1706701522000",
      "description": "The end time of the period"
    },
    "startTime": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1706701522000",
      "description": "The start time of the period"
    }
  }
}
object InsightScores
{
  "type": "object",
  "required": [
    "period",
    "lastPeriod",
    "scores"
  ],
  "properties": {
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "period": {
      "$ref": "#/components/schemas/InsightPeriod",
      "description": "The time period for the scores"
    },
    "scores": {
      "$ref": "#/components/schemas/InsightGroupScores",
      "description": "The scores for the insight groups"
    },
    "lastPeriod": {
      "$ref": "#/components/schemas/InsightPeriod",
      "description": "The time period for the scores in the last period"
    }
  }
}
object InsightsChart
{
  "type": "object",
  "required": [
    "metadata",
    "series"
  ],
  "properties": {
    "series": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/InsightsChartSeries"
      },
      "description": "Series data for the chart"
    },
    "metadata": {
      "$ref": "#/components/schemas/InsightsChartMetadata",
      "description": "Metadata for the chart"
    }
  }
}
object InsightsChartBounds
{
  "type": "object",
  "required": [
    "name",
    "value"
  ],
  "properties": {
    "name": {
      "type": "string",
      "example": "equal",
      "description": "Name of the bound"
    },
    "value": {
      "type": "integer",
      "format": "int64",
      "example": 100,
      "description": "Value of the bound"
    }
  }
}
object InsightsChartMetadata
{
  "type": "object",
  "required": [
    "summary",
    "xAxis",
    "yAxis"
  ],
  "properties": {
    "name": {
      "type": "string",
      "example": "deploymentFrequency",
      "description": "Name of the chart"
    },
    "xAxis": {
      "$ref": "#/components/schemas/InsightsChartSeriesMetadataAxis",
      "example": "timestamp",
      "description": "X-axis metadata"
    },
    "yAxis": {
      "$ref": "#/components/schemas/InsightsChartSeriesMetadataAxis",
      "example": "count",
      "description": "Y-axis metadata"
    },
    "metrics": {
      "$ref": "#/components/schemas/InsightsChartMetrics",
      "description": "Metrics for the given chart data, included when expanded"
    },
    "summary": {
      "$ref": "#/components/schemas/InsightsChartMetadataCustomValues",
      "description": "Metadata values"
    }
  }
}
object InsightsChartMetadataCustomValues
{
  "type": "object",
  "additionalProperties": {}
}
object InsightsChartMetric
{
  "type": "object",
  "required": [
    "indicator",
    "value",
    "unit",
    "modifier",
    "tiers"
  ],
  "properties": {
    "unit": {
      "type": "string",
      "example": "count",
      "description": "Metric unit"
    },
    "tiers": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/InsightsMetricTierDefinition"
      },
      "description": "Metric indicator tiers"
    },
    "value": {
      "type": "number",
      "example": 5,
      "description": "Metric value"
    },
    "modifier": {
      "type": "string",
      "example": "per day",
      "description": "Metric modifier"
    },
    "indicator": {
      "type": "string",
      "example": "excellent",
      "description": "Metric indicator tier"
    }
  }
}
object InsightsChartMetrics
{
  "type": "object",
  "additionalProperties": {
    "$ref": "#/components/schemas/InsightsChartMetric"
  }
}
object InsightsChartSeries
{
  "type": "object",
  "required": [
    "metadata",
    "data"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/InsightsChartSeriesDataPoint"
      },
      "description": "Data points for the series"
    },
    "metadata": {
      "$ref": "#/components/schemas/InsightsChartSeriesMetadata",
      "description": "Metadata for the series"
    }
  }
}
object InsightsChartSeriesDataPoint
{
  "type": "object",
  "required": [
    "x",
    "y"
  ],
  "properties": {
    "x": {
      "type": "integer",
      "format": "int64",
      "example": 1617225600000,
      "description": "X-axis value"
    },
    "y": {
      "type": "integer",
      "format": "int64",
      "example": 100,
      "description": "Y-axis value"
    },
    "values": {
      "type": "object",
      "description": "Additional values for the data point",
      "additionalProperties": {}
    }
  }
}
object InsightsChartSeriesMetadata
{
  "type": "object",
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "Name of the series"
    },
    "count": {
      "type": "integer",
      "format": "int64",
      "description": "Aggregate count of the series values"
    },
    "bounds": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/InsightsChartBounds"
      },
      "description": "Bounds for the series data"
    }
  }
}
object InsightsChartSeriesMetadataAxis
{
  "type": "object",
  "required": [
    "unit"
  ],
  "properties": {
    "unit": {
      "type": "string",
      "example": "count",
      "description": "Unit of the axis"
    }
  }
}
object InsightsMetricIndicatorRange
{
  "type": "object",
  "required": [
    "min",
    "max"
  ],
  "properties": {
    "max": {
      "type": "integer",
      "example": 100,
      "description": "The maximum value for the indicator range"
    },
    "min": {
      "type": "integer",
      "example": 0,
      "description": "The minimum value for the indicator range"
    }
  }
}
object InsightsMetricScore
{
  "type": "object",
  "required": [
    "score",
    "indicator",
    "indicatorRange"
  ],
  "properties": {
    "score": {
      "type": "integer",
      "example": 100,
      "description": "The score for the metric"
    },
    "indicator": {
      "$ref": "#/components/schemas/InsightsMetricScoreIndicator",
      "enum": [
        "excellent",
        "good",
        "fair",
        "needsAttention",
        "notCalculated",
        "unknown"
      ],
      "example": "excellent",
      "description": "The indicator for the score"
    },
    "lastPeriod": {
      "$ref": "#/components/schemas/InsightsMetricScore",
      "description": "The score for the metric in the last period"
    },
    "aggregateOf": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "deploymentFrequency",
        "leadTime"
      ],
      "description": "The keys of the metrics that were aggregated to calculate this score"
    },
    "indicatorRange": {
      "$ref": "#/components/schemas/InsightsMetricIndicatorRange",
      "description": "The indicator range for the score"
    },
    "diffVsLastPeriod": {
      "type": "integer"
    }
  }
}
string InsightsMetricScoreIndicator
{
  "type": "string"
}
object InsightsMetricTierDefinition
{
  "type": "object",
  "required": [
    "indicator",
    "description"
  ],
  "properties": {
    "indicator": {
      "type": "string",
      "example": "excellent",
      "description": "Metric indicator tier"
    },
    "description": {
      "type": "string",
      "example": "at least 1 per day",
      "description": "Metric indicator description"
    }
  }
}
object InsightsRepository
{
  "type": "object",
  "required": [
    "_id",
    "version",
    "key",
    "type",
    "url",
    "mainBranch"
  ],
  "properties": {
    "_id": {
      "type": "string",
      "format": "uuid",
      "example": "5f9a9b1a-5b9a-4b9a-9a9a-9a9a9a9a9a9a",
      "description": "The repository ID"
    },
    "key": {
      "type": "string",
      "example": "launchdarkly/LaunchDarkly-Docs",
      "description": "The repository key"
    },
    "url": {
      "type": "string",
      "example": "https://github.com/launchdarkly/LaunchDarkly-Docs",
      "description": "The repository URL"
    },
    "type": {
      "type": "string",
      "example": "github",
      "description": "The repository type"
    },
    "version": {
      "type": "integer",
      "example": 1,
      "description": "The repository version"
    },
    "projects": {
      "$ref": "#/components/schemas/ProjectSummaryCollection"
    },
    "mainBranch": {
      "type": "string",
      "example": "main",
      "description": "The repository main branch"
    }
  }
}
object InsightsRepositoryCollection
{
  "type": "object",
  "required": [
    "totalCount",
    "items"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/InsightsRepository"
      },
      "description": "List of repositories"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "totalCount": {
      "type": "integer",
      "example": 1,
      "description": "Total number of repositories"
    }
  }
}
object InsightsRepositoryProject
{
  "type": "object",
  "required": [
    "repositoryKey",
    "projectKey"
  ],
  "properties": {
    "projectKey": {
      "type": "string",
      "example": "default",
      "description": "The project key"
    },
    "repositoryKey": {
      "type": "string",
      "example": "launchdarkly/LaunchDarkly-Docs",
      "description": "The repository key"
    }
  }
}
object InsightsRepositoryProjectCollection
{
  "type": "object",
  "required": [
    "totalCount",
    "items"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/InsightsRepositoryProject"
      },
      "description": "List of repository project associations"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "totalCount": {
      "type": "integer",
      "example": 1,
      "description": "Total number of repository project associations"
    }
  }
}
object InsightsRepositoryProjectMappings
{
  "type": "object",
  "required": [
    "mappings"
  ],
  "properties": {
    "mappings": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/InsightsRepositoryProject"
      }
    }
  }
}
object Instruction
{
  "type": "object",
  "additionalProperties": {}
}
array Instructions
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/Instruction"
  }
}
object Integration
{
  "type": "object",
  "properties": {
    "on": {
      "type": "boolean",
      "example": true,
      "description": "Whether the integration is currently active"
    },
    "_id": {
      "type": "string",
      "example": "1234a56b7c89d012345e678f",
      "description": "The ID for this integration audit log subscription"
    },
    "url": {
      "type": "string",
      "description": "Slack webhook receiver URL. Only used for legacy Slack webhook integrations."
    },
    "kind": {
      "type": "string",
      "example": "datadog",
      "description": "The type of integration"
    },
    "name": {
      "type": "string",
      "example": "Example Datadog integration",
      "description": "A human-friendly name for the integration"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "testing"
      ],
      "description": "An array of tags for this integration"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "apiKey": {
      "type": "string",
      "description": "Datadog API key. Only used for legacy Datadog webhook integrations."
    },
    "config": {
      "type": "object",
      "description": "Details on configuration for an integration of this type. Refer to the <code>formVariables</code> field in the corresponding <code>manifest.json</code> for a full list of fields for each integration.",
      "additionalProperties": {}
    },
    "_access": {
      "$ref": "#/components/schemas/Access",
      "description": "Details on the allowed and denied actions for this subscription"
    },
    "_status": {
      "$ref": "#/components/schemas/IntegrationSubscriptionStatusRep",
      "description": "Details on the most recent successes and errors for this integration"
    },
    "statements": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Statement"
      },
      "description": "Represents a Custom role policy, defining a resource kinds filter the integration audit log subscription responds to."
    }
  }
}
object IntegrationDeliveryConfiguration
{
  "type": "object",
  "required": [
    "_links",
    "_id",
    "integrationKey",
    "projectKey",
    "environmentKey",
    "config",
    "on",
    "tags",
    "name",
    "version"
  ],
  "properties": {
    "on": {
      "type": "boolean",
      "example": true,
      "description": "Whether the configuration is turned on"
    },
    "_id": {
      "type": "string",
      "example": "12ab3c4d5ef1a2345bcde67f",
      "description": "The integration ID"
    },
    "name": {
      "type": "string",
      "example": "Development environment configuration",
      "description": "Name of the configuration"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [],
      "description": "List of tags for this configuration"
    },
    "_links": {
      "$ref": "#/components/schemas/IntegrationDeliveryConfigurationLinks",
      "description": "The location and content type of related resources"
    },
    "config": {
      "$ref": "#/components/schemas/FormVariableConfig",
      "description": "The delivery configuration for the given integration provider. Only included when requesting a single integration by ID. Refer to the <code>formVariables</code> field in the corresponding <code>manifest.json</code> for a full list of fields for each integration."
    },
    "_access": {
      "$ref": "#/components/schemas/Access",
      "description": "Details on the allowed and denied actions for this configuration"
    },
    "version": {
      "type": "integer",
      "example": 1,
      "description": "Version of the current configuration"
    },
    "projectKey": {
      "type": "string",
      "example": "default",
      "description": "The project key"
    },
    "environmentKey": {
      "type": "string",
      "example": "development",
      "description": "The environment key"
    },
    "integrationKey": {
      "type": "string",
      "example": "example-integration-key",
      "description": "The integration key"
    }
  }
}
object IntegrationDeliveryConfigurationCollection
{
  "type": "object",
  "required": [
    "_links",
    "items"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/IntegrationDeliveryConfiguration"
      },
      "description": "An array of integration delivery configurations"
    },
    "_links": {
      "$ref": "#/components/schemas/IntegrationDeliveryConfigurationCollectionLinks",
      "description": "The location and content type of related resources"
    }
  }
}
object IntegrationDeliveryConfigurationCollectionLinks
{
  "type": "object",
  "required": [
    "self"
  ],
  "properties": {
    "self": {
      "$ref": "#/components/schemas/Link"
    },
    "parent": {
      "$ref": "#/components/schemas/Link"
    }
  }
}
object IntegrationDeliveryConfigurationLinks
{
  "type": "object",
  "required": [
    "self",
    "parent",
    "project",
    "environment"
  ],
  "properties": {
    "self": {
      "$ref": "#/components/schemas/Link"
    },
    "parent": {
      "$ref": "#/components/schemas/Link"
    },
    "project": {
      "$ref": "#/components/schemas/Link"
    },
    "environment": {
      "$ref": "#/components/schemas/Link"
    }
  }
}
object IntegrationDeliveryConfigurationPost
{
  "type": "object",
  "required": [
    "config"
  ],
  "properties": {
    "on": {
      "type": "boolean",
      "example": false,
      "description": "Whether the integration configuration is active. Default value is false."
    },
    "name": {
      "type": "string",
      "example": "Sample integration",
      "description": "Name to identify the integration"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "example-tag"
      ],
      "description": "Tags to associate with the integration"
    },
    "config": {
      "$ref": "#/components/schemas/FormVariableConfig",
      "example": "{\"required\": \"example value for required formVariables property for sample-integration\", \"optional\": \"example value for optional formVariables property for sample-integration\"}",
      "description": "The global integration settings, as specified by the <code>formVariables</code> in the <code>manifest.json</code> for this integration."
    }
  }
}
object IntegrationDeliveryConfigurationResponse
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "timestamp": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1654104600000",
      "description": "Timestamp of when the validation was performed"
    },
    "statusCode": {
      "type": "integer",
      "example": 200,
      "description": "The status code returned by the validation"
    },
    "responseBody": {
      "type": "string",
      "description": "JSON response to the validation request"
    }
  }
}
object IntegrationMetadata
{
  "type": "object",
  "required": [
    "externalId",
    "externalStatus",
    "externalUrl",
    "lastChecked"
  ],
  "properties": {
    "externalId": {
      "type": "string"
    },
    "externalUrl": {
      "type": "string"
    },
    "lastChecked": {
      "$ref": "#/components/schemas/UnixMillis"
    },
    "externalStatus": {
      "$ref": "#/components/schemas/IntegrationStatus"
    }
  }
}
object IntegrationStatus
{
  "type": "object",
  "required": [
    "display",
    "value"
  ],
  "properties": {
    "value": {
      "type": "string"
    },
    "display": {
      "type": "string"
    }
  }
}
object IntegrationStatusRep
{
  "type": "object",
  "properties": {
    "timestamp": {
      "$ref": "#/components/schemas/UnixMillis"
    },
    "statusCode": {
      "type": "integer"
    },
    "responseBody": {
      "type": "string"
    }
  }
}
object IntegrationSubscriptionStatusRep
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/IntegrationStatusRep"
      }
    },
    "lastError": {
      "$ref": "#/components/schemas/UnixMillis"
    },
    "errorCount": {
      "type": "integer"
    },
    "lastSuccess": {
      "$ref": "#/components/schemas/UnixMillis"
    },
    "successCount": {
      "type": "integer"
    }
  }
}
object Integrations
{
  "type": "object",
  "properties": {
    "key": {
      "type": "string"
    },
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Integration"
      }
    },
    "_links": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    }
  }
}
object InvalidRequestErrorRep
{
  "type": "object",
  "required": [
    "code",
    "message"
  ],
  "properties": {
    "code": {
      "type": "string",
      "example": "invalid_request",
      "description": "Specific error code encountered"
    },
    "message": {
      "type": "string",
      "example": "Invalid request body",
      "description": "Description of the error"
    }
  }
}
object IterationInput
{
  "type": "object",
  "required": [
    "hypothesis",
    "metrics",
    "treatments",
    "flags"
  ],
  "properties": {
    "flags": {
      "$ref": "#/components/schemas/FlagsInput",
      "description": "Details on the feature flag and targeting rules for this iteration"
    },
    "metrics": {
      "$ref": "#/components/schemas/MetricsInput",
      "description": "Details on the metrics for this experiment"
    },
    "hypothesis": {
      "type": "string",
      "example": "Example hypothesis, the new button placement will increase conversion",
      "description": "The expected outcome of this experiment"
    },
    "treatments": {
      "$ref": "#/components/schemas/TreatmentsInput",
      "description": "Details on the variations you are testing in the experiment. You establish these variations in feature flags, and then reuse them in experiments."
    },
    "primaryFunnelKey": {
      "type": "string",
      "example": "metric-group-key-123abc",
      "description": "The key of the primary funnel group for this experiment. Either <code>primarySingleMetricKey</code> or <code>primaryFunnelKey</code> must be present."
    },
    "randomizationUnit": {
      "type": "string",
      "example": "user",
      "description": "The unit of randomization for this iteration. Defaults to user."
    },
    "canReshuffleTraffic": {
      "type": "boolean",
      "example": true,
      "description": "Whether to allow the experiment to reassign traffic to different variations when you increase or decrease the traffic in your experiment audience (true) or keep all traffic assigned to its initial variation (false). Defaults to true."
    },
    "primarySingleMetricKey": {
      "type": "string",
      "example": "metric-key-123abc",
      "description": "The key of the primary metric for this experiment. Either <code>primarySingleMetricKey</code> or <code>primaryFunnelKey</code> must be present."
    }
  }
}
object IterationRep
{
  "type": "object",
  "required": [
    "hypothesis",
    "status",
    "createdAt"
  ],
  "properties": {
    "_id": {
      "type": "string",
      "example": "12ab3c45de678910fgh12345",
      "description": "The iteration ID"
    },
    "flags": {
      "type": "object",
      "description": "Details on the flag used in this experiment",
      "additionalProperties": {
        "$ref": "#/components/schemas/FlagRep"
      }
    },
    "status": {
      "type": "string",
      "example": "running",
      "description": "The status of the iteration: <code>not_started</code>, <code>running</code>, <code>stopped</code>"
    },
    "endedAt": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1656610200000",
      "description": "Timestamp of when the iteration ended"
    },
    "metrics": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/DependentMetricOrMetricGroupRep"
      },
      "description": "Details on the metrics for this experiment"
    },
    "createdAt": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1654104600000",
      "description": "Timestamp of when the iteration was created"
    },
    "startedAt": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1655314200000",
      "description": "Timestamp of when the iteration started"
    },
    "hypothesis": {
      "type": "string",
      "example": "The new button placement will increase conversion",
      "description": "The expected outcome of this experiment"
    },
    "treatments": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/TreatmentRep"
      },
      "description": "Details on the variations you are testing in the experiment"
    },
    "primaryFunnel": {
      "$ref": "#/components/schemas/DependentMetricGroupRepWithMetrics",
      "description": "Details on the primary funnel group for this experiment"
    },
    "primaryMetric": {
      "$ref": "#/components/schemas/DependentMetricOrMetricGroupRep",
      "deprecated": true,
      "description": "Deprecated, use <code>primarySingleMetric</code> and <code>primaryFunnel</code> instead. Details on the primary metric for this experiment."
    },
    "winningReason": {
      "type": "string",
      "example": "We ran this iteration for two weeks and the winning variation was clear",
      "description": "The reason you stopped the experiment"
    },
    "secondaryMetrics": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/MetricV2Rep"
      },
      "deprecated": true,
      "description": "Deprecated, use <code>metrics</code> instead. Details on the secondary metrics for this experiment."
    },
    "randomizationUnit": {
      "type": "string",
      "example": "user",
      "description": "The unit of randomization for this iteration"
    },
    "winningTreatmentId": {
      "type": "string",
      "example": "122c9f3e-da26-4321-ba68-e0fc02eced58",
      "description": "The ID of the treatment chosen when the experiment stopped"
    },
    "canReshuffleTraffic": {
      "type": "boolean",
      "example": true,
      "description": "Whether the experiment may reassign traffic to different variations when the experiment audience changes (true) or must keep all traffic assigned to its initial variation (false)."
    },
    "primarySingleMetric": {
      "$ref": "#/components/schemas/MetricV2Rep",
      "description": "Details on the primary metric for this experiment"
    }
  }
}
string IterationStatus
{
  "type": "string"
}
array JSONPatch
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/PatchOperation"
  }
}
object LastSeenMetadata
{
  "type": "object",
  "properties": {
    "tokenId": {
      "type": "string",
      "example": "5b52207f8ca8e631d31fdb2b",
      "description": "The ID of the token used in the member's last session"
    }
  }
}
object LeadTimeStagesRep
{
  "type": "object",
  "required": [
    "codingDurationMs"
  ],
  "properties": {
    "waitDurationMs": {
      "type": "integer",
      "format": "int64",
      "example": 100000,
      "description": "The wait duration between merge time and deploy start time in milliseconds"
    },
    "totalLeadTimeMs": {
      "type": "integer",
      "format": "int64",
      "example": 1600000,
      "description": "The total lead time in milliseconds"
    },
    "codingDurationMs": {
      "type": "integer",
      "format": "int64",
      "example": 1000000,
      "description": "The coding duration in milliseconds"
    },
    "deployDurationMs": {
      "type": "integer",
      "format": "int64",
      "example": 100000,
      "description": "The deploy duration in milliseconds"
    },
    "reviewDurationMs": {
      "type": "integer",
      "format": "int64",
      "example": 500000,
      "description": "The review duration in milliseconds"
    }
  }
}
object LegacyExperimentRep
{
  "type": "object",
  "properties": {
    "_metric": {
      "$ref": "#/components/schemas/MetricListingRep"
    },
    "metricKey": {
      "type": "string",
      "example": "my-metric"
    },
    "environments": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "production",
        "test",
        "my-environment"
      ]
    },
    "_environmentSettings": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/components/schemas/ExperimentEnvironmentSettingRep"
      }
    }
  }
}
object Link
{
  "type": "object",
  "properties": {
    "href": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  }
}
object MaintainerRep
{
  "type": "object",
  "properties": {
    "team": {
      "$ref": "#/components/schemas/MemberTeamSummaryRep",
      "description": "Details on the team that maintains this resource"
    },
    "member": {
      "$ref": "#/components/schemas/MemberSummary",
      "description": "Details on the member who maintains this resource"
    }
  }
}
object MaintainerTeam
{
  "type": "object",
  "required": [
    "key",
    "name"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "team-key-123abc",
      "description": "The key of the maintainer team"
    },
    "name": {
      "type": "string",
      "example": "Example team",
      "description": "A human-friendly name for the maintainer team"
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/teams/example-team",
          "type": "application/json"
        },
        "roles": {
          "href": "/api/v2/teams/example-team/roles",
          "type": "application/json"
        },
        "parent": {
          "href": "/api/v2/teams",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    }
  }
}
object Member
{
  "type": "object",
  "required": [
    "_links",
    "_id",
    "role",
    "email",
    "_pendingInvite",
    "_verified",
    "customRoles",
    "mfa",
    "_lastSeen",
    "creationDate"
  ],
  "properties": {
    "_id": {
      "type": "string",
      "example": "507f1f77bcf86cd799439011",
      "description": "The member's ID"
    },
    "mfa": {
      "type": "string",
      "description": "Whether multi-factor authentication is enabled for this member"
    },
    "role": {
      "type": "string",
      "example": "reader",
      "description": "The member's built-in role. If the member has no custom roles, this role will be in effect."
    },
    "email": {
      "type": "string",
      "example": "ariel@acme.com",
      "description": "The member's email address"
    },
    "teams": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/MemberTeamSummaryRep"
      },
      "description": "Details on the teams this member is assigned to"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "lastName": {
      "type": "string",
      "example": "Flores",
      "description": "The member's last name"
    },
    "_lastSeen": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1608260796147",
      "description": "The member's last session date (as Unix milliseconds since epoch)"
    },
    "_verified": {
      "type": "boolean",
      "example": true,
      "description": "Whether the member's email address has been verified"
    },
    "firstName": {
      "type": "string",
      "example": "Ariel",
      "description": "The member's first name"
    },
    "customRoles": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "devOps",
        "backend-devs"
      ],
      "description": "The set of custom roles (as keys) assigned to the member"
    },
    "creationDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1628001602644",
      "description": "Timestamp of when the member was created"
    },
    "_pendingEmail": {
      "type": "string",
      "description": "The member's email address before it has been verified, for accounts where email verification is required"
    },
    "_pendingInvite": {
      "type": "boolean",
      "example": false,
      "description": "Whether the member has a pending invitation"
    },
    "oauthProviders": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/OAuthProviderKind"
      },
      "description": "A list of OAuth providers"
    },
    "permissionGrants": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/MemberPermissionGrantSummaryRep"
      },
      "description": "A list of permission grants. Permission grants allow a member to have access to a specific action, without having to create or update a custom role."
    },
    "_lastSeenMetadata": {
      "$ref": "#/components/schemas/LastSeenMetadata",
      "description": "Additional metadata associated with the member's last session, for example, whether a token was used"
    },
    "excludedDashboards": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Default dashboards that the member has chosen to ignore"
    },
    "_integrationMetadata": {
      "$ref": "#/components/schemas/IntegrationMetadata",
      "description": "Details on the member account in an external source, if this member is provisioned externally"
    }
  }
}
object MemberDataRep
{
  "type": "object",
  "properties": {
    "_id": {
      "type": "string",
      "example": "507f1f77bcf86cd799439011",
      "description": "The member ID"
    },
    "email": {
      "type": "string",
      "example": "ariel@acme.com",
      "description": "The member email"
    },
    "_links": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "lastName": {
      "type": "string",
      "example": "Flores",
      "description": "The member last name"
    },
    "firstName": {
      "type": "string",
      "example": "Ariel",
      "description": "The member first name"
    }
  }
}
object MemberImportItem
{
  "type": "object",
  "required": [
    "status",
    "value"
  ],
  "properties": {
    "value": {
      "type": "string",
      "example": "new-team-member@acme.com",
      "description": "The email address for the member requested to be added to this team. May be blank or an error, such as 'invalid email format', if the email address cannot be found or parsed."
    },
    "status": {
      "type": "string",
      "example": "error",
      "description": "Whether this member can be successfully imported (<code>success</code>) or not (<code>error</code>). Even if the status is <code>success</code>, members are only added to a team on a <code>201</code> response."
    },
    "message": {
      "type": "string",
      "description": "An error message, including CSV line number, if the <code>status</code> is <code>error</code>"
    }
  }
}
object MemberPermissionGrantSummaryRep
{
  "type": "object",
  "required": [
    "resource"
  ],
  "properties": {
    "actions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "maintainTeam"
      ],
      "description": "A list of actions to allow. A permission grant may have either an <code>actionSet</code> or a list of <code>actions</code> but not both at the same time."
    },
    "resource": {
      "type": "string",
      "example": "team/qa-team",
      "description": "The resource for which the actions are allowed"
    },
    "actionSet": {
      "type": "string",
      "description": "The name of the group of related actions to allow. A permission grant may have either an <code>actionSet</code> or a list of <code>actions</code> but not both at the same time."
    }
  }
}
object MemberSummary
{
  "type": "object",
  "required": [
    "_links",
    "_id",
    "role",
    "email"
  ],
  "properties": {
    "_id": {
      "type": "string",
      "example": "569f183514f4432160000007",
      "description": "The member's ID"
    },
    "role": {
      "type": "string",
      "example": "admin",
      "description": "The member's built-in role. If the member has no custom roles, this role will be in effect."
    },
    "email": {
      "type": "string",
      "example": "ariel@acme.com",
      "description": "The member's email address"
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/members/569f183514f4432160000007",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "lastName": {
      "type": "string",
      "example": "Flores",
      "description": "The member's last name"
    },
    "firstName": {
      "type": "string",
      "example": "Ariel",
      "description": "The member's first name"
    }
  }
}
object MemberTeamSummaryRep
{
  "type": "object",
  "required": [
    "customRoleKeys",
    "key",
    "name"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "team-key-123abc",
      "description": "The team key"
    },
    "name": {
      "type": "string",
      "example": "QA Team",
      "description": "The team name"
    },
    "_links": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "customRoleKeys": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "access-to-test-projects"
      ],
      "description": "A list of keys of the custom roles this team has access to"
    }
  }
}
object MemberTeamsPostInput
{
  "type": "object",
  "required": [
    "teamKeys"
  ],
  "properties": {
    "teamKeys": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "team1",
        "team2"
      ],
      "description": "List of team keys"
    }
  }
}
object Members
{
  "type": "object",
  "required": [
    "items",
    "_links"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Member"
      },
      "description": "An array of members"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "totalCount": {
      "type": "integer",
      "description": "The number of members returned"
    }
  }
}
object MethodNotAllowedErrorRep
{
  "type": "object",
  "required": [
    "code",
    "message"
  ],
  "properties": {
    "code": {
      "type": "string",
      "example": "method_not_allowed",
      "description": "Specific error code encountered"
    },
    "message": {
      "type": "string",
      "example": "Method not allowed",
      "description": "Description of the error"
    }
  }
}
object MetricCollectionRep
{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/MetricListingRep"
      },
      "description": "An array of metrics"
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/metrics/my-project?limit=20",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    }
  }
}
object MetricEventDefaultRep
{
  "type": "object",
  "properties": {
    "value": {
      "type": "number",
      "description": "The default value applied to missing unit events. Only available when <code>disabled</code> is false. Defaults to 0"
    },
    "disabled": {
      "type": "boolean",
      "description": "Whether to disable defaulting missing unit events when calculating results. Defaults to false"
    }
  }
}
object MetricGroupCollectionRep
{
  "type": "object",
  "required": [
    "items"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/MetricGroupRep"
      },
      "description": "An array of metric groups"
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/projects/my-project/metric-groups",
          "type": "application/json"
        },
        "parent": {
          "href": "/api/v2/projects/my-project",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    }
  }
}
object MetricGroupPost
{
  "type": "object",
  "required": [
    "key",
    "name",
    "kind",
    "maintainerId",
    "tags",
    "metrics"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "metric-group-key-123abc",
      "description": "A unique key to reference the metric group"
    },
    "kind": {
      "enum": [
        "funnel"
      ],
      "type": "string",
      "example": "funnel",
      "description": "The type of the metric group"
    },
    "name": {
      "type": "string",
      "example": "My metric group",
      "description": "A human-friendly name for the metric group"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "ops"
      ],
      "description": "Tags for the metric group"
    },
    "metrics": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/MetricInMetricGroupInput"
      },
      "description": "An ordered list of the metrics in this metric group"
    },
    "description": {
      "type": "string",
      "example": "Description of the metric group",
      "description": "Description of the metric group"
    },
    "maintainerId": {
      "type": "string",
      "example": "569fdeadbeef1644facecafe",
      "description": "The ID of the member who maintains this metric group"
    }
  }
}
object MetricGroupRep
{
  "type": "object",
  "required": [
    "_id",
    "key",
    "name",
    "kind",
    "_links",
    "tags",
    "_creationDate",
    "_lastModified",
    "maintainer",
    "metrics",
    "_version"
  ],
  "properties": {
    "_id": {
      "type": "string",
      "example": "bc3e5be1-02d2-40c7-9926-26d0aacd7aab",
      "description": "The ID of this metric group"
    },
    "key": {
      "type": "string",
      "example": "metric-group-key-123abc",
      "description": "A unique key to reference the metric group"
    },
    "kind": {
      "enum": [
        "funnel",
        "standard"
      ],
      "type": "string",
      "example": "funnel",
      "description": "The type of the metric group"
    },
    "name": {
      "type": "string",
      "example": "My metric group",
      "description": "A human-friendly name for the metric group"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "ops"
      ],
      "description": "Tags for the metric group"
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/projects/my-project/metric-groups/my-metric-group",
          "type": "application/json"
        },
        "parent": {
          "href": "/api/v2/projects/my-project",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "_access": {
      "$ref": "#/components/schemas/Access",
      "description": "Details on the allowed and denied actions for this metric group"
    },
    "metrics": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/MetricInGroupRep"
      },
      "description": "An ordered list of the metrics in this metric group"
    },
    "_version": {
      "type": "integer",
      "example": 1,
      "description": "The version of this metric group"
    },
    "maintainer": {
      "$ref": "#/components/schemas/MaintainerRep",
      "description": "The maintainer of this metric"
    },
    "description": {
      "type": "string",
      "example": "Description of the metric group",
      "description": "Description of the metric group"
    },
    "experiments": {
      "$ref": "#/components/schemas/DependentExperimentListRep",
      "description": "Experiments that use this metric group. Only included if specified in the <code>expand</code> query parameter in a <code>getMetricGroup</code> request."
    },
    "_creationDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1628192791148",
      "description": "Timestamp of when the metric group was created"
    },
    "_lastModified": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1628192791148",
      "description": "Timestamp of when the metric group was last modified"
    },
    "experimentCount": {
      "type": "integer",
      "example": 0,
      "description": "The number of experiments using this metric group"
    }
  }
}
object MetricGroupResultsRep
{
  "type": "object",
  "required": [
    "_links",
    "metrics"
  ],
  "properties": {
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "metrics": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/MetricInGroupResultsRep"
      },
      "description": "An ordered list of the metrics in this metric group, and each of their results"
    }
  }
}
object MetricInGroupRep
{
  "type": "object",
  "required": [
    "key",
    "name",
    "kind",
    "_links"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "metric-key-123abc",
      "description": "The metric key"
    },
    "kind": {
      "enum": [
        "pageview",
        "click",
        "custom"
      ],
      "type": "string",
      "example": "custom",
      "description": "The kind of event the metric tracks"
    },
    "name": {
      "type": "string",
      "example": "Example metric",
      "description": "The metric name"
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/metrics/my-project/my-metric",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "isNumeric": {
      "type": "boolean",
      "example": true,
      "description": "For custom metrics, whether to track numeric changes in value against a baseline (<code>true</code>) or to track a conversion when an end user takes an action (<code>false</code>)."
    },
    "_versionId": {
      "type": "string",
      "example": "version-id-123abc",
      "description": "The version ID of the metric"
    },
    "nameInGroup": {
      "type": "string",
      "example": "Step 1",
      "description": "Name of the metric when used within the associated metric group. Can be different from the original name of the metric. Required if and only if the metric group is a <code>funnel</code>."
    },
    "randomizationUnits": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "user"
      ],
      "description": "The randomization units for the metric"
    }
  }
}
object MetricInGroupResultsRep
{
  "type": "object",
  "required": [
    "metric",
    "results"
  ],
  "properties": {
    "metric": {
      "$ref": "#/components/schemas/MetricInGroupRep",
      "description": "Metric metadata"
    },
    "results": {
      "$ref": "#/components/schemas/ExperimentBayesianResultsRep",
      "description": "The results of this metric"
    }
  }
}
object MetricInMetricGroupInput
{
  "type": "object",
  "required": [
    "key",
    "nameInGroup"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "metric-key-123abc",
      "description": "The metric key"
    },
    "nameInGroup": {
      "type": "string",
      "example": "Step 1",
      "description": "Name of the metric when used within the associated metric group. Can be different from the original name of the metric"
    }
  }
}
object MetricInput
{
  "type": "object",
  "required": [
    "key"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "metric-key-123abc",
      "description": "The metric key"
    },
    "isGroup": {
      "type": "boolean",
      "example": true,
      "description": "Whether this is a metric group (true) or a metric (false). Defaults to false"
    },
    "primary": {
      "type": "boolean",
      "example": true,
      "deprecated": true,
      "description": "Deprecated, use <code>primarySingleMetricKey</code> and <code>primaryFunnelKey</code>. Whether this is a primary metric (true) or a secondary metric (false)"
    }
  }
}
object MetricListingRep
{
  "type": "object",
  "required": [
    "_id",
    "_versionId",
    "key",
    "name",
    "kind",
    "_links",
    "tags",
    "_creationDate"
  ],
  "properties": {
    "_id": {
      "type": "string",
      "example": "5902deadbeef667524a01290",
      "description": "The ID of this metric"
    },
    "key": {
      "type": "string",
      "example": "metric-key-123abc",
      "description": "A unique key to reference the metric"
    },
    "kind": {
      "enum": [
        "pageview",
        "click",
        "custom"
      ],
      "type": "string",
      "example": "custom",
      "description": "The kind of event the metric tracks"
    },
    "name": {
      "type": "string",
      "example": "My metric",
      "description": "A human-friendly name for the metric"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [],
      "description": "Tags for the metric"
    },
    "unit": {
      "type": "string",
      "description": "For numeric custom metrics, the unit of measure"
    },
    "_site": {
      "$ref": "#/components/schemas/Link",
      "example": "{\"href\":\"/experiments/metrics/my-metric/edit\",\"type\":\"text/html\"}",
      "description": "Details on how to access the metric in the LaunchDarkly UI"
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/metrics/my-project/my-metric",
          "type": "application/json"
        },
        "parent": {
          "href": "/api/v2/metrics/my-project",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "_access": {
      "$ref": "#/components/schemas/Access",
      "description": "Details on the allowed and denied actions for this metric"
    },
    "eventKey": {
      "type": "string",
      "description": "For custom metrics, the event key to use in your code"
    },
    "isNumeric": {
      "type": "boolean",
      "example": true,
      "description": "For custom metrics, whether to track numeric changes in value against a baseline (<code>true</code>) or to track a conversion when an end user takes an action (<code>false</code>)."
    },
    "_versionId": {
      "type": "string",
      "example": "version-id-123abc",
      "description": "The version ID of the metric"
    },
    "_maintainer": {
      "$ref": "#/components/schemas/MemberSummary",
      "example": "{\"_links\":{\"self\":{\"href\":\"/api/v2/members/569fdeadbeef1644facecafe\",\"type\":\"application/json\"}},\"_id\":\"569fdeadbeef1644facecafe\",\"firstName\":\"Ariel\",\"lastName\":\"Flores\",\"role\":\"owner\",\"email\":\"ariel@acme.com\"}",
      "description": "Details on the member who maintains this metric"
    },
    "description": {
      "type": "string",
      "description": "Description of the metric"
    },
    "analysisType": {
      "enum": [
        "mean",
        "percentile"
      ],
      "type": "string",
      "example": "mean",
      "description": "The method for analyzing metric events"
    },
    "eventDefault": {
      "$ref": "#/components/schemas/MetricEventDefaultRep"
    },
    "lastModified": {
      "$ref": "#/components/schemas/Modification"
    },
    "maintainerId": {
      "type": "string",
      "example": "569fdeadbeef1644facecafe",
      "description": "The ID of the member who maintains this metric"
    },
    "_creationDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1628192791148",
      "description": "Timestamp of when the metric was created"
    },
    "experimentCount": {
      "type": "integer",
      "example": 0,
      "description": "The number of experiments using this metric"
    },
    "percentileValue": {
      "type": "integer",
      "example": 95,
      "description": "The percentile for the analysis method. An integer denoting the target percentile between 0 and 100. Required when <code>analysisType</code> is <code>percentile</code>."
    },
    "successCriteria": {
      "enum": [
        "HigherThanBaseline",
        "LowerThanBaseline"
      ],
      "type": "string",
      "description": "For custom metrics, the success criteria"
    },
    "metricGroupCount": {
      "type": "integer",
      "example": 0,
      "description": "The number of metric groups using this metric"
    },
    "_attachedFlagCount": {
      "type": "integer",
      "example": 0,
      "description": "The number of feature flags currently attached to this metric"
    },
    "randomizationUnits": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "user"
      ],
      "description": "An array of randomization units allowed for this metric"
    },
    "unitAggregationType": {
      "enum": [
        "average",
        "sum"
      ],
      "type": "string",
      "example": "average",
      "description": "The method by which multiple unit event values are aggregated"
    }
  }
}
object MetricPost
{
  "type": "object",
  "required": [
    "key",
    "kind"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "metric-key-123abc",
      "description": "A unique key to reference the metric"
    },
    "kind": {
      "enum": [
        "pageview",
        "click",
        "custom"
      ],
      "type": "string",
      "example": "custom",
      "description": "The kind of event your metric will track"
    },
    "name": {
      "type": "string",
      "example": "Example metric",
      "description": "A human-friendly name for the metric"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "example-tag"
      ],
      "description": "Tags for the metric"
    },
    "unit": {
      "type": "string",
      "example": "orders",
      "description": "The unit of measure. Applicable for numeric custom metrics only."
    },
    "urls": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/UrlPost"
      },
      "example": "invalid example",
      "description": "One or more target URLs. Required for click and pageview metrics only."
    },
    "eventKey": {
      "type": "string",
      "example": "sales generated",
      "description": "The event key to use in your code. Required for custom conversion/binary and custom numeric metrics only."
    },
    "isActive": {
      "type": "boolean",
      "example": true,
      "description": "Whether the metric is active. Set to <code>true</code> to record click or pageview metrics. Not applicable for custom metrics."
    },
    "selector": {
      "type": "string",
      "example": ".dropdown-toggle",
      "description": "One or more CSS selectors. Required for click metrics only."
    },
    "isNumeric": {
      "type": "boolean",
      "example": false,
      "description": "Whether to track numeric changes in value against a baseline (<code>true</code>) or to track a conversion when an end user takes an action (<code>false</code>). Required for custom metrics only."
    },
    "description": {
      "type": "string",
      "example": "optional description",
      "description": "Description of the metric"
    },
    "analysisType": {
      "type": "string",
      "example": "mean",
      "description": "The method for analyzing metric events"
    },
    "eventDefault": {
      "$ref": "#/components/schemas/MetricEventDefaultRep"
    },
    "percentileValue": {
      "type": "integer",
      "example": 95,
      "description": "The percentile for the analysis method. An integer denoting the target percentile between 0 and 100. Required when <code>analysisType</code> is <code>percentile</code>."
    },
    "successCriteria": {
      "enum": [
        "HigherThanBaseline",
        "LowerThanBaseline"
      ],
      "type": "string",
      "example": "HigherThanBaseline",
      "description": "Success criteria. Required for custom numeric metrics, optional for custom conversion metrics."
    },
    "randomizationUnits": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "user"
      ],
      "description": "An array of randomization units allowed for this metric"
    },
    "unitAggregationType": {
      "enum": [
        "average",
        "sum"
      ],
      "type": "string",
      "example": "average",
      "description": "The method by which multiple unit event values are aggregated"
    }
  }
}
object MetricRep
{
  "type": "object",
  "required": [
    "_id",
    "_versionId",
    "key",
    "name",
    "kind",
    "_links",
    "tags",
    "_creationDate"
  ],
  "properties": {
    "_id": {
      "type": "string",
      "example": "5902deadbeef667524a01290",
      "description": "The ID of this metric"
    },
    "key": {
      "type": "string",
      "example": "metric-key-123abc",
      "description": "A unique key to reference the metric"
    },
    "kind": {
      "enum": [
        "pageview",
        "click",
        "custom"
      ],
      "type": "string",
      "example": "custom",
      "description": "The kind of event the metric tracks"
    },
    "name": {
      "type": "string",
      "example": "My metric",
      "description": "A human-friendly name for the metric"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [],
      "description": "Tags for the metric"
    },
    "unit": {
      "type": "string",
      "description": "For numeric custom metrics, the unit of measure"
    },
    "urls": {
      "$ref": "#/components/schemas/UrlMatchers",
      "description": "For click and pageview metrics, the target URLs"
    },
    "_site": {
      "$ref": "#/components/schemas/Link",
      "example": "{\"href\":\"/experiments/metrics/my-metric/edit\",\"type\":\"text/html\"}",
      "description": "Details on how to access the metric in the LaunchDarkly UI"
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/metrics/my-project/my-metric",
          "type": "application/json"
        },
        "parent": {
          "href": "/api/v2/metrics/my-project",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "_access": {
      "$ref": "#/components/schemas/Access",
      "description": "Details on the allowed and denied actions for this metric"
    },
    "_version": {
      "type": "integer",
      "example": 1,
      "description": "Version of the metric"
    },
    "eventKey": {
      "type": "string",
      "description": "For custom metrics, the event key to use in your code"
    },
    "isActive": {
      "type": "boolean",
      "example": true,
      "description": "Whether the metric is active"
    },
    "selector": {
      "type": "string",
      "description": "For click metrics, the CSS selectors"
    },
    "isNumeric": {
      "type": "boolean",
      "example": true,
      "description": "For custom metrics, whether to track numeric changes in value against a baseline (<code>true</code>) or to track a conversion when an end user takes an action (<code>false</code>)."
    },
    "_versionId": {
      "type": "string",
      "example": "version-id-123abc",
      "description": "The version ID of the metric"
    },
    "_maintainer": {
      "$ref": "#/components/schemas/MemberSummary",
      "example": "{\"_links\":{\"self\":{\"href\":\"/api/v2/members/569fdeadbeef1644facecafe\",\"type\":\"application/json\"}},\"_id\":\"569fdeadbeef1644facecafe\",\"firstName\":\"Ariel\",\"lastName\":\"Flores\",\"role\":\"owner\",\"email\":\"ariel@acme.com\"}",
      "description": "Details on the member who maintains this metric"
    },
    "description": {
      "type": "string",
      "description": "Description of the metric"
    },
    "experiments": {
      "$ref": "#/components/schemas/DependentExperimentListRep",
      "description": "Experiments that use this metric, including those using a metric group that contains this metric"
    },
    "analysisType": {
      "enum": [
        "mean",
        "percentile"
      ],
      "type": "string",
      "example": "mean",
      "description": "The method for analyzing metric events"
    },
    "eventDefault": {
      "$ref": "#/components/schemas/MetricEventDefaultRep"
    },
    "lastModified": {
      "$ref": "#/components/schemas/Modification"
    },
    "maintainerId": {
      "type": "string",
      "example": "569fdeadbeef1644facecafe",
      "description": "The ID of the member who maintains this metric"
    },
    "metricGroups": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/DependentMetricGroupRep"
      },
      "description": "Metric groups that use this metric"
    },
    "_creationDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1628192791148",
      "description": "Timestamp of when the metric was created"
    },
    "experimentCount": {
      "type": "integer",
      "example": 0,
      "description": "The number of experiments using this metric"
    },
    "percentileValue": {
      "type": "integer",
      "example": 95,
      "description": "The percentile for the analysis method. An integer denoting the target percentile between 0 and 100. Required when <code>analysisType</code> is <code>percentile</code>."
    },
    "successCriteria": {
      "enum": [
        "HigherThanBaseline",
        "LowerThanBaseline"
      ],
      "type": "string",
      "description": "For custom metrics, the success criteria"
    },
    "metricGroupCount": {
      "type": "integer",
      "example": 0,
      "description": "The number of metric groups using this metric"
    },
    "_attachedFeatures": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/FlagListingRep"
      },
      "description": "Details on the flags attached to this metric"
    },
    "_attachedFlagCount": {
      "type": "integer",
      "example": 0,
      "description": "The number of feature flags currently attached to this metric"
    },
    "randomizationUnits": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "user"
      ],
      "description": "An array of randomization units allowed for this metric"
    },
    "unitAggregationType": {
      "enum": [
        "average",
        "sum"
      ],
      "type": "string",
      "example": "average",
      "description": "The method by which multiple unit event values are aggregated"
    }
  }
}
object MetricSeen
{
  "type": "object",
  "properties": {
    "ever": {
      "type": "boolean",
      "example": true,
      "description": "Whether the metric has received an event for this iteration"
    },
    "timestamp": {
      "type": "integer",
      "format": "int64",
      "example": 1657129307,
      "description": "Timestamp of when the metric most recently received an event for this iteration"
    }
  }
}
object MetricV2Rep
{
  "type": "object",
  "required": [
    "key",
    "name",
    "kind",
    "_links"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "metric-key-123abc",
      "description": "The metric key"
    },
    "kind": {
      "enum": [
        "pageview",
        "click",
        "custom"
      ],
      "type": "string",
      "example": "custom",
      "description": "The kind of event the metric tracks"
    },
    "name": {
      "type": "string",
      "example": "Example metric",
      "description": "The metric name"
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/metrics/my-project/my-metric",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "isNumeric": {
      "type": "boolean",
      "example": true,
      "description": "For custom metrics, whether to track numeric changes in value against a baseline (<code>true</code>) or to track a conversion when an end user takes an action (<code>false</code>)."
    },
    "_versionId": {
      "type": "string",
      "example": "version-id-123abc",
      "description": "The version ID of the metric"
    }
  }
}
array MetricsInput
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/MetricInput"
  }
}
integer MigrationFlagStageCount
{
  "type": "integer"
}
object MigrationSafetyIssueRep
{
  "type": "object",
  "properties": {
    "issue": {
      "type": "string",
      "description": "A description of the issue that <code>causingRuleId</code> has caused for <code>affectedRuleIds</code>."
    },
    "causingRuleId": {
      "type": "string",
      "description": "The ID of the rule which caused this issue"
    },
    "affectedRuleIds": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "A list of the IDs of the rules which are affected by this issue. <code>fallthrough</code> is a sentinel value for the default rule."
    },
    "oldSystemAffected": {
      "type": "boolean",
      "description": "Whether the changes caused by <code>causingRuleId</code> bring inconsistency to the old system"
    }
  }
}
object MigrationSettingsPost
{
  "type": "object",
  "required": [
    "stageCount"
  ],
  "properties": {
    "stageCount": {
      "$ref": "#/components/schemas/MigrationFlagStageCount",
      "enum": [
        "2",
        "4",
        "6"
      ]
    },
    "contextKind": {
      "type": "string",
      "description": "Context kind for a migration with 6 stages, where data is being moved"
    }
  }
}
object Modification
{
  "type": "object",
  "properties": {
    "date": {
      "type": "string",
      "format": "date-time",
      "example": "2021-08-05T19:46:31.148082Z"
    }
  }
}
object MultiEnvironmentDependentFlag
{
  "type": "object",
  "required": [
    "key",
    "environments"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "dependent-flag-key-123abc",
      "description": "The flag key"
    },
    "name": {
      "type": "string",
      "example": "Example dependent flag",
      "description": "The flag name"
    },
    "environments": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/DependentFlagEnvironment"
      },
      "description": "A list of environments in which the dependent flag appears"
    }
  }
}
object MultiEnvironmentDependentFlags
{
  "type": "object",
  "required": [
    "items",
    "_links",
    "_site"
  ],
  "properties": {
    "_site": {
      "$ref": "#/components/schemas/Link",
      "example": "{ \"href\": \"/example-project/~/features/example-prereq-flag\", \"type\": \"text/html\" }",
      "description": "Details on how to access the prerequisite flag in the LaunchDarkly UI"
    },
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/MultiEnvironmentDependentFlag"
      },
      "description": "An array of dependent flags with their environment information"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    }
  }
}
object NewMemberForm
{
  "type": "object",
  "required": [
    "email"
  ],
  "properties": {
    "role": {
      "enum": [
        "reader",
        "writer",
        "admin",
        "no_access"
      ],
      "type": "string",
      "example": "reader",
      "description": "The member's built-in role"
    },
    "email": {
      "type": "string",
      "example": "sandy@acme.com",
      "description": "The member's email"
    },
    "lastName": {
      "type": "string",
      "example": "Flores",
      "description": "The member's last name"
    },
    "password": {
      "type": "string",
      "example": "***",
      "description": "The member's password"
    },
    "teamKeys": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "team-1",
        "team-2"
      ],
      "description": "An array of the member's teams"
    },
    "firstName": {
      "type": "string",
      "example": "Ariel",
      "description": "The member's first name"
    },
    "customRoles": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "customRole1",
        "customRole2"
      ],
      "description": "An array of the member's custom roles"
    }
  }
}
array NewMemberFormListPost
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/NewMemberForm"
  }
}
object NotFoundErrorRep
{
  "type": "object",
  "required": [
    "code",
    "message"
  ],
  "properties": {
    "code": {
      "type": "string",
      "example": "not_found",
      "description": "Specific error code encountered"
    },
    "message": {
      "type": "string",
      "example": "Invalid resource identifier",
      "description": "Description of the error"
    }
  }
}
string OAuthProviderKind
{
  "type": "string"
}
string ObjectId
{
  "type": "string"
}
string Operator
{
  "type": "string"
}
object ParameterDefault
{
  "type": "object",
  "properties": {
    "value": {
      "description": "The default value for the given parameter"
    },
    "ruleClause": {
      "$ref": "#/components/schemas/RuleClause",
      "description": "Metadata related to add rule instructions"
    },
    "booleanVariationValue": {
      "type": "boolean",
      "description": "Variation value for boolean flags. Not applicable for non-boolean flags."
    }
  }
}
object ParameterRep
{
  "type": "object",
  "properties": {
    "flagKey": {
      "type": "string"
    },
    "variationId": {
      "type": "string"
    }
  }
}
object ParentResourceRep
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the parent resource"
    },
    "_links": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "resource": {
      "type": "string",
      "description": "The parent's resource specifier"
    }
  }
}
object PatchFailedErrorRep
{
  "type": "object",
  "required": [
    "code",
    "message"
  ],
  "properties": {
    "code": {
      "type": "string",
      "example": "patch_failed",
      "description": "Specific error code encountered"
    },
    "message": {
      "type": "string",
      "example": "Unprocessable entity. Could not apply patch.",
      "description": "Description of the error"
    }
  }
}
object PatchOperation
{
  "type": "object",
  "required": [
    "op",
    "path",
    "value"
  ],
  "properties": {
    "op": {
      "type": "string",
      "example": "replace",
      "description": "The type of operation to perform"
    },
    "path": {
      "type": "string",
      "example": "/exampleField",
      "description": "A JSON Pointer string specifying the part of the document to operate on"
    },
    "value": {
      "example": "new example value",
      "description": "A JSON value used in \"add\", \"replace\", and \"test\" operations"
    }
  }
}
object PatchWithComment
{
  "type": "object",
  "required": [
    "patch"
  ],
  "properties": {
    "patch": {
      "$ref": "#/components/schemas/JSONPatch",
      "description": "A JSON patch representation of the change to make"
    },
    "comment": {
      "type": "string",
      "description": "Optional comment"
    }
  }
}
object Phase
{
  "type": "object",
  "required": [
    "id",
    "audiences",
    "name"
  ],
  "properties": {
    "id": {
      "type": "string",
      "example": "1234a56b7c89d012345e678f",
      "description": "The phase ID"
    },
    "name": {
      "type": "string",
      "example": "Phase 1 - Testing",
      "description": "The release phase name"
    },
    "audiences": {
      "$ref": "#/components/schemas/Audiences",
      "description": "An ordered list of the audiences for this release phase. Each audience corresponds to a LaunchDarkly environment."
    }
  }
}
object PostDeploymentEventInput
{
  "type": "object",
  "required": [
    "projectKey",
    "environmentKey",
    "applicationKey",
    "version",
    "eventType"
  ],
  "properties": {
    "version": {
      "type": "string",
      "example": "a90a8a2",
      "description": "The application version. You can set the application version to any string that includes only letters, numbers, periods (<code>.</code>), hyphens (<code>-</code>), or underscores (<code>_</code>).<br/><br/>We recommend setting the application version to at least the first seven characters of the SHA or to the tag of the GitHub commit for this deployment."
    },
    "eventTime": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1706701522000",
      "description": "The time, in Unix milliseconds, when the event occurred. If not included, the time will default to when the event is processed and stored in LaunchDarkly."
    },
    "eventType": {
      "enum": [
        "started",
        "failed",
        "finished",
        "custom"
      ],
      "type": "string",
      "example": "started",
      "description": "The event type"
    },
    "projectKey": {
      "type": "string",
      "example": "default",
      "description": "The project key"
    },
    "versionName": {
      "type": "string",
      "example": "v1.0.0",
      "description": "The version name. This defines how the version is displayed"
    },
    "eventMetadata": {
      "type": "object",
      "example": {
        "buildSystemVersion": "v1.2.3"
      },
      "description": "A JSON object containing metadata about the event",
      "additionalProperties": {}
    },
    "applicationKey": {
      "type": "string",
      "example": "billing-service",
      "description": "The application key. This defines the granularity at which you want to view your insights metrics. Typically it is the name of one of the GitHub repositories that you use in this project.<br/><br/>LaunchDarkly automatically creates a new application each time you send a unique application key."
    },
    "environmentKey": {
      "type": "string",
      "example": "production",
      "description": "The environment key"
    },
    "applicationKind": {
      "enum": [
        "server",
        "browser",
        "mobile"
      ],
      "type": "string",
      "example": "server",
      "description": "The kind of application. Default: <code>server</code>"
    },
    "applicationName": {
      "type": "string",
      "example": "Billing Service",
      "description": "The application name. This defines how the application is displayed"
    },
    "deploymentMetadata": {
      "type": "object",
      "example": {
        "buildNumber": "1234"
      },
      "description": "A JSON object containing metadata about the deployment",
      "additionalProperties": {}
    }
  }
}
object PostFlagScheduledChangesInput
{
  "type": "object",
  "required": [
    "executionDate",
    "instructions"
  ],
  "properties": {
    "comment": {
      "type": "string",
      "example": "optional comment",
      "description": "Optional comment describing the scheduled changes"
    },
    "instructions": {
      "$ref": "#/components/schemas/Instructions",
      "example": "[ { \"kind\": \"turnFlagOn\" }]",
      "description": "The actions to perform on the execution date for these scheduled changes. This should be an array with a single object that looks like <code>{\"kind\": \"scheduled_action\"}</code>. Supported scheduled actions are <code>turnFlagOn</code> and <code>turnFlagOff</code>."
    },
    "executionDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1636558831870",
      "description": "When the scheduled changes should be executed"
    }
  }
}
object PostInsightGroupParams
{
  "type": "object",
  "required": [
    "name",
    "key",
    "projectKey",
    "environmentKey"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "default-production-all-apps",
      "description": "The key of the insight group"
    },
    "name": {
      "type": "string",
      "example": "Production - All Apps",
      "description": "The name of the insight group"
    },
    "projectKey": {
      "type": "string",
      "example": "default",
      "description": "The projectKey to be associated with the insight group"
    },
    "environmentKey": {
      "type": "string",
      "example": "production",
      "description": "The environmentKey to be associated with the insight group"
    },
    "applicationKeys": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "billing-service",
        "inventory-service"
      ],
      "description": "The application keys to associate with the insight group. If not provided, the insight group will include data from all applications."
    }
  }
}
object Prerequisite
{
  "type": "object",
  "required": [
    "key",
    "variation"
  ],
  "properties": {
    "key": {
      "type": "string"
    },
    "variation": {
      "type": "integer"
    }
  }
}
object Project
{
  "type": "object",
  "required": [
    "_links",
    "_id",
    "key",
    "includeInSnippetByDefault",
    "name",
    "tags"
  ],
  "properties": {
    "_id": {
      "type": "string",
      "example": "57be1db38b75bf0772d11383",
      "description": "The ID of this project"
    },
    "key": {
      "type": "string",
      "example": "project-key-123abc",
      "description": "The key of this project"
    },
    "name": {
      "type": "string",
      "example": "My Project",
      "description": "A human-friendly name for the project"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "ops"
      ],
      "description": "A list of tags for the project"
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/projects/my-project",
          "type": "application/json"
        },
        "environments": {
          "href": "/api/v2/projects/my-project/environments",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "_access": {
      "$ref": "#/components/schemas/Access",
      "description": "Details on the allowed and denied actions for this project"
    },
    "environments": {
      "$ref": "#/components/schemas/Environments",
      "description": "A paginated list of environments for the project. By default this field is omitted unless expanded by the client."
    },
    "defaultReleasePipelineKey": {
      "type": "string",
      "description": "The key of the default release pipeline for this project"
    },
    "includeInSnippetByDefault": {
      "type": "boolean",
      "example": true,
      "description": "Whether or not flags created in this project are made available to the client-side JavaScript SDK by default"
    },
    "defaultClientSideAvailability": {
      "$ref": "#/components/schemas/ClientSideAvailability",
      "description": "Describes which client-side SDKs can use new flags by default"
    }
  }
}
object ProjectPost
{
  "type": "object",
  "required": [
    "name",
    "key"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "project-key-123abc",
      "description": "A unique key used to reference the project in your code."
    },
    "name": {
      "type": "string",
      "example": "My Project",
      "description": "A human-friendly name for the project."
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "ops"
      ],
      "description": "Tags for the project"
    },
    "environments": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/EnvironmentPost"
      },
      "description": "Creates the provided environments for this project. If omitted default environments will be created instead."
    },
    "includeInSnippetByDefault": {
      "type": "boolean",
      "example": true,
      "description": "Whether or not flags created in this project are made available to the client-side JavaScript SDK by default."
    },
    "defaultClientSideAvailability": {
      "$ref": "#/components/schemas/DefaultClientSideAvailabilityPost",
      "description": "Controls which client-side SDKs can use new flags by default."
    }
  }
}
object ProjectRep
{
  "type": "object",
  "required": [
    "_links",
    "_id",
    "key",
    "includeInSnippetByDefault",
    "name",
    "tags",
    "environments"
  ],
  "properties": {
    "_id": {
      "type": "string",
      "example": "57be1db38b75bf0772d11383",
      "description": "The ID of this project"
    },
    "key": {
      "type": "string",
      "example": "project-key-123abc",
      "description": "The key of this project"
    },
    "name": {
      "type": "string",
      "example": "My Project",
      "description": "A human-friendly name for the project"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "ops"
      ],
      "description": "A list of tags for the project"
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/projects/my-project",
          "type": "application/json"
        },
        "environments": {
          "href": "/api/v2/projects/my-project/environments",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "_access": {
      "$ref": "#/components/schemas/Access",
      "description": "Details on the allowed and denied actions for this project"
    },
    "environments": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Environment"
      },
      "description": "A list of environments for the project"
    },
    "defaultReleasePipelineKey": {
      "type": "string",
      "description": "The key of the default release pipeline for this project"
    },
    "includeInSnippetByDefault": {
      "type": "boolean",
      "example": true,
      "description": "Whether or not flags created in this project are made available to the client-side JavaScript SDK by default"
    },
    "defaultClientSideAvailability": {
      "$ref": "#/components/schemas/ClientSideAvailability",
      "description": "Describes which client-side SDKs can use new flags by default"
    }
  }
}
object ProjectSummary
{
  "type": "object",
  "required": [
    "_id",
    "_links",
    "key",
    "name"
  ],
  "properties": {
    "_id": {
      "type": "string",
      "example": "57be1db38b75bf0772d11383",
      "description": "The ID of this project"
    },
    "key": {
      "type": "string",
      "example": "project-key-123abc",
      "description": "The project key"
    },
    "name": {
      "type": "string",
      "example": "Example project",
      "description": "The project name"
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/projects/example-project",
          "type": "application/json"
        },
        "environments": {
          "href": "/api/v2/projects/example-project/environments",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    }
  }
}
object ProjectSummaryCollection
{
  "type": "object",
  "required": [
    "totalCount",
    "items"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ProjectSummary"
      }
    },
    "_links": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "totalCount": {
      "type": "integer"
    }
  }
}
object Projects
{
  "type": "object",
  "required": [
    "_links",
    "items"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Project"
      },
      "description": "List of projects."
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/projects",
          "type": "application/json"
        }
      },
      "description": "A link to this resource.",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "totalCount": {
      "type": "integer"
    }
  }
}
object PullRequestCollectionRep
{
  "type": "object",
  "required": [
    "totalCount",
    "items"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/PullRequestRep"
      },
      "description": "A list of pull requests"
    },
    "_links": {
      "type": "object",
      "example": {
        "next": {
          "href": "/api/v2/engineering-insights/pull-requests?after=a4290006-1fd1-4ca5-acf7-9f31fac61cf5",
          "type": "application/json"
        },
        "self": {
          "href": "/api/v2/engineering-insights/pull-requests",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "totalCount": {
      "type": "integer",
      "example": 25,
      "description": "The total number of pull requests"
    }
  }
}
object PullRequestLeadTimeRep
{
  "type": "object",
  "required": [
    "codingDurationMs"
  ],
  "properties": {
    "codingDurationMs": {
      "type": "integer",
      "format": "int64",
      "example": 1000000,
      "description": "The coding duration in milliseconds"
    },
    "reviewDurationMs": {
      "type": "integer",
      "format": "int64",
      "example": 500000,
      "description": "The review duration in milliseconds"
    },
    "avgWaitDurationMs": {
      "type": "integer",
      "format": "int64",
      "example": 100000,
      "description": "The average wait duration between merge time and deploy start time in milliseconds"
    },
    "maxWaitDurationMs": {
      "type": "integer",
      "format": "int64",
      "example": 100000,
      "description": "The max wait duration between merge time and deploy start time in milliseconds"
    },
    "avgTotalLeadTimeMs": {
      "type": "integer",
      "format": "int64",
      "example": 1600000,
      "description": "The average total lead time in milliseconds"
    },
    "maxTotalLeadTimeMs": {
      "type": "integer",
      "format": "int64",
      "example": 1600000,
      "description": "The max total lead time in milliseconds"
    },
    "avgDeployDurationMs": {
      "type": "integer",
      "format": "int64",
      "example": 100000,
      "description": "The average deploy duration in milliseconds"
    },
    "maxDeployDurationMs": {
      "type": "integer",
      "format": "int64",
      "example": 100000,
      "description": "The max deploy duration in milliseconds"
    }
  }
}
object PullRequestRep
{
  "type": "object",
  "required": [
    "id",
    "externalId",
    "title",
    "status",
    "author",
    "createTime",
    "baseCommitKey",
    "headCommitKey",
    "filesChanged",
    "linesAdded",
    "linesDeleted",
    "url"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "example": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
      "description": "The pull request internal ID"
    },
    "url": {
      "type": "string",
      "example": "https://github.com/launchdarkly/LaunchDarkly-Docs/pull/406",
      "description": "The pull request URL"
    },
    "title": {
      "type": "string",
      "example": "Enable new payment structure",
      "description": "The pull request title"
    },
    "author": {
      "type": "string",
      "example": "jane.doe",
      "description": "The pull request author"
    },
    "status": {
      "type": "string",
      "example": "merged",
      "description": "The pull request status"
    },
    "leadTime": {
      "$ref": "#/components/schemas/PullRequestLeadTimeRep",
      "description": "The lead time for the pull request in a given environment"
    },
    "mergeTime": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1706712518000",
      "description": "The pull request merge time"
    },
    "createTime": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1706701522000",
      "description": "The pull request create time"
    },
    "externalId": {
      "type": "string",
      "example": "1234",
      "description": "The pull request number"
    },
    "linesAdded": {
      "type": "integer",
      "example": 100,
      "description": "The number of lines added"
    },
    "deployments": {
      "$ref": "#/components/schemas/DeploymentCollectionRep",
      "description": "A list of deployments associated with the pull request"
    },
    "filesChanged": {
      "type": "integer",
      "example": 2,
      "description": "The number of files changed"
    },
    "linesDeleted": {
      "type": "integer",
      "example": 50,
      "description": "The number of lines deleted"
    },
    "baseCommitKey": {
      "type": "string",
      "example": "a90a8a2",
      "description": "The pull request base commit key"
    },
    "headCommitKey": {
      "type": "string",
      "example": "a90a8a2",
      "description": "The pull request head commit key"
    },
    "flagReferences": {
      "$ref": "#/components/schemas/FlagReferenceCollectionRep",
      "description": "A list of flag references associated with the pull request"
    },
    "mergeCommitKey": {
      "type": "string",
      "example": "a90a8a2",
      "description": "The pull request merge commit key"
    }
  }
}
object RandomizationSettingsPut
{
  "type": "object",
  "required": [
    "randomizationUnits"
  ],
  "properties": {
    "randomizationUnits": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/RandomizationUnitInput"
      },
      "description": "An array of randomization units allowed for this project."
    }
  }
}
object RandomizationSettingsRep
{
  "type": "object",
  "properties": {
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "_projectId": {
      "type": "string",
      "example": "12345abcde67890fghij",
      "description": "The project ID"
    },
    "_projectKey": {
      "type": "string",
      "example": "project-key-123abc",
      "description": "The project key"
    },
    "_creationDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1654104600000",
      "description": "Timestamp of when the experiment was created"
    },
    "randomizationUnits": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/RandomizationUnitRep"
      },
      "description": "An array of the randomization units in this project"
    }
  }
}
object RandomizationUnitInput
{
  "type": "object",
  "required": [
    "randomizationUnit",
    "default",
    "standardRandomizationUnit"
  ],
  "properties": {
    "default": {
      "type": "boolean",
      "example": true,
      "description": "If true, any experiment iterations created within this project will default to using this randomization unit. A project can only have one default randomization unit."
    },
    "randomizationUnit": {
      "type": "string",
      "example": "user",
      "description": "The unit of randomization. Must match the key of an existing context kind in this project."
    },
    "standardRandomizationUnit": {
      "enum": [
        "guest",
        "guestTime",
        "organization",
        "request",
        "user",
        "userTime"
      ],
      "type": "string",
      "description": "One of LaunchDarkly's fixed set of standard randomization units."
    }
  }
}
object RandomizationUnitRep
{
  "type": "object",
  "properties": {
    "_hidden": {
      "type": "boolean"
    },
    "default": {
      "type": "boolean",
      "example": true,
      "description": "Whether this randomization unit is the default for experiments"
    },
    "_displayName": {
      "type": "string",
      "example": "User",
      "description": "The display name for the randomization unit, displayed in the LaunchDarkly user interface."
    },
    "randomizationUnit": {
      "type": "string",
      "example": "user",
      "description": "The unit of randomization. Defaults to user."
    },
    "standardRandomizationUnit": {
      "type": "string",
      "example": "user",
      "description": "One of LaunchDarkly's fixed set of standard randomization units."
    }
  }
}
object RateLimitedErrorRep
{
  "type": "object",
  "required": [
    "code",
    "message"
  ],
  "properties": {
    "code": {
      "type": "string",
      "example": "rate_limited",
      "description": "Specific error code encountered"
    },
    "message": {
      "type": "string",
      "example": "You've exceeded the API rate limit. Try again later.",
      "description": "Description of the error"
    }
  }
}
object RecentTriggerBody
{
  "type": "object",
  "properties": {
    "jsonBody": {
      "type": "object",
      "description": "The marshalled JSON request body for the incoming trigger webhook. If this is empty or contains invalid JSON, the timestamp is recorded but this field will be empty.",
      "additionalProperties": {}
    },
    "timestamp": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1654104600000",
      "description": "Timestamp of the incoming trigger webhook"
    }
  }
}
object ReferenceRep
{
  "type": "object",
  "required": [
    "path",
    "hunks"
  ],
  "properties": {
    "hint": {
      "type": "string",
      "example": "javascript",
      "description": "Programming language used in the file"
    },
    "path": {
      "type": "string",
      "example": "/main/index.js",
      "description": "File path of the reference"
    },
    "hunks": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/HunkRep"
      }
    }
  }
}
object RelativeDifferenceRep
{
  "type": "object",
  "properties": {
    "lower": {
      "type": "number",
      "example": -0.13708601934659803,
      "description": "A lower bound of the relative difference between the treatment and the <code>fromTreatmentId</code>"
    },
    "upper": {
      "type": "number",
      "example": 0.42655970355712425,
      "description": "An upper bound of the relative difference between the treatment and the <code>fromTreatmentId</code>"
    },
    "fromTreatmentId": {
      "type": "string",
      "example": "92b8354e-360e-4d67-8f13-fa6a46ca8077",
      "description": "The treatment ID of the treatment against which the relative difference is calculated"
    }
  }
}
object RelayAutoConfigCollectionRep
{
  "type": "object",
  "required": [
    "items"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/RelayAutoConfigRep"
      },
      "description": "An array of Relay Proxy configurations"
    }
  }
}
object RelayAutoConfigPost
{
  "type": "object",
  "required": [
    "name",
    "policy"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "A human-friendly name for the Relay Proxy configuration"
    },
    "policy": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Statement"
      },
      "description": "A description of what environments and projects the Relay Proxy should include or exclude. To learn more, read [Writing an inline policy](https://docs.launchdarkly.com/home/relay-proxy/automatic-configuration#writing-an-inline-policy)."
    }
  }
}
object RelayAutoConfigRep
{
  "type": "object",
  "required": [
    "_id",
    "name",
    "policy",
    "fullKey",
    "displayKey",
    "creationDate",
    "lastModified"
  ],
  "properties": {
    "_id": {
      "$ref": "#/components/schemas/ObjectId",
      "example": "12ab3c45de678910abc12345",
      "description": "The ID of the Relay Proxy configuration"
    },
    "name": {
      "type": "string",
      "example": "Relay Proxy Demo Config",
      "description": "A human-friendly name for the Relay Proxy configuration"
    },
    "policy": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Statement"
      },
      "description": "A description of what environments and projects the Relay Proxy should include or exclude"
    },
    "_access": {
      "$ref": "#/components/schemas/Access",
      "description": "Details on the allowed and denied actions for this Relay Proxy configuration"
    },
    "fullKey": {
      "type": "string",
      "description": "The Relay Proxy configuration key"
    },
    "_creator": {
      "$ref": "#/components/schemas/MemberSummary",
      "description": "Details on the member who created this Relay Proxy configuration"
    },
    "displayKey": {
      "type": "string",
      "example": "7f30",
      "description": "The last few characters of the Relay Proxy configuration key, displayed in the LaunchDarkly UI"
    },
    "creationDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1628001602644",
      "description": "Timestamp of when the Relay Proxy configuration was created"
    },
    "lastModified": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1628001602644",
      "description": "Timestamp of when the Relay Proxy configuration was most recently modified"
    }
  }
}
object Release
{
  "type": "object",
  "required": [
    "name",
    "releasePipelineKey",
    "releasePipelineDescription",
    "phases",
    "_version"
  ],
  "properties": {
    "name": {
      "type": "string",
      "example": "Example release pipeline",
      "description": "The release pipeline name"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "phases": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ReleasePhase"
      },
      "description": "An ordered list of the release pipeline phases"
    },
    "_version": {
      "type": "integer",
      "example": 1,
      "description": "The release version"
    },
    "releasePipelineKey": {
      "type": "string",
      "example": "example-release-pipeline",
      "description": "The release pipeline key"
    },
    "releasePipelineDescription": {
      "type": "string",
      "example": "Our release pipeline for typical testing and deployment",
      "description": "The release pipeline description"
    }
  }
}
object ReleaseAudience
{
  "type": "object",
  "required": [
    "environment",
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "example": "Phase 1 - Testing",
      "description": "The release phase name"
    },
    "environment": {
      "$ref": "#/components/schemas/EnvironmentSummary",
      "description": "Details about the environment"
    }
  }
}
object ReleasePhase
{
  "type": "object",
  "required": [
    "_id",
    "_name",
    "complete",
    "_creationDate",
    "_audiences"
  ],
  "properties": {
    "_id": {
      "type": "string",
      "example": "1234a56b7c89d012345e678f",
      "description": "The phase ID"
    },
    "_name": {
      "type": "string",
      "example": "Phase 1 - Testing",
      "description": "The release phase name"
    },
    "complete": {
      "type": "boolean",
      "example": true,
      "description": "Whether this phase is complete"
    },
    "_audiences": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ReleaseAudience"
      },
      "description": "A logical grouping of one or more environments that share attributes for rolling out changes"
    },
    "_completedBy": {
      "$ref": "#/components/schemas/CompletedBy",
      "description": "Details about how this phase was marked as complete"
    },
    "_creationDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1684262711507",
      "description": "Timestamp of when the release phase was created"
    },
    "_completionDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1684262711509",
      "description": "Timestamp of when the release phase was completed"
    }
  }
}
object ReleasePipeline
{
  "type": "object",
  "required": [
    "createdAt",
    "key",
    "name",
    "phases"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "standard-pipeline",
      "description": "The release pipeline key"
    },
    "name": {
      "type": "string",
      "example": "Standard Pipeline",
      "description": "The release pipeline name"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "example-tag"
      ],
      "description": "A list of the release pipeline's tags"
    },
    "phases": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Phase"
      },
      "description": "An ordered list of the release pipeline phases. Each phase is a logical grouping of one or more environments that share attributes for rolling out changes."
    },
    "_access": {
      "$ref": "#/components/schemas/Access",
      "description": "Details on the allowed and denied actions for this release pipeline"
    },
    "_version": {
      "type": "integer",
      "example": 1,
      "description": "The release pipeline version"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "example": "1684262711507",
      "description": "Timestamp of when the release pipeline was created"
    },
    "description": {
      "type": "string",
      "example": "Standard pipeline to roll out to production",
      "description": "The release pipeline description"
    }
  }
}
object ReleasePipelineCollection
{
  "type": "object",
  "required": [
    "items",
    "totalCount"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ReleasePipeline"
      },
      "description": "An array of release pipelines"
    },
    "totalCount": {
      "type": "integer",
      "example": 1,
      "description": "Total number of release pipelines"
    }
  }
}
object RepositoryCollectionRep
{
  "type": "object",
  "required": [
    "_links",
    "items"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/RepositoryRep"
      },
      "description": "An array of repositories"
    },
    "_links": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    }
  }
}
object RepositoryRep
{
  "type": "object",
  "required": [
    "name",
    "type",
    "defaultBranch",
    "enabled",
    "version",
    "_links"
  ],
  "properties": {
    "name": {
      "type": "string",
      "example": "LaunchDarkly-Docs",
      "description": "The repository name"
    },
    "type": {
      "enum": [
        "bitbucket",
        "custom",
        "github",
        "gitlab"
      ],
      "type": "string",
      "example": "github",
      "description": "The type of repository"
    },
    "_links": {
      "type": "object",
      "additionalProperties": {}
    },
    "_access": {
      "$ref": "#/components/schemas/Access"
    },
    "enabled": {
      "type": "boolean",
      "example": true,
      "description": "Whether or not a repository is enabled for code reference scanning"
    },
    "version": {
      "type": "integer",
      "example": 3,
      "description": "The version of the repository's saved information"
    },
    "branches": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/BranchRep"
      },
      "description": "An array of the repository's branches that have been scanned for code references"
    },
    "sourceLink": {
      "type": "string",
      "example": "https://github.com/launchdarkly/LaunchDarkly-Docs",
      "description": "A URL to access the repository"
    },
    "defaultBranch": {
      "type": "string",
      "example": "main",
      "description": "The repository's default branch"
    },
    "hunkUrlTemplate": {
      "type": "string",
      "example": "https://github.com/launchdarkly/LaunchDarkly-Docs/blob/${sha}/${filePath}#L${lineNumber}",
      "description": "A template for constructing a valid URL to view the hunk"
    },
    "commitUrlTemplate": {
      "type": "string",
      "example": "https://github.com/launchdarkly/LaunchDarkly-Docs/commit/${sha}",
      "description": "A template for constructing a valid URL to view the commit"
    }
  }
}
object ResourceAccess
{
  "type": "object",
  "properties": {
    "action": {
      "$ref": "#/components/schemas/ActionIdentifier"
    },
    "resource": {
      "type": "string"
    }
  }
}
object ResourceIDResponse
{
  "type": "object",
  "properties": {
    "key": {
      "type": "string"
    },
    "kind": {
      "type": "string"
    },
    "flagKey": {
      "type": "string"
    },
    "projectKey": {
      "type": "string"
    },
    "environmentKey": {
      "type": "string"
    }
  }
}
object ResourceId
{
  "type": "object",
  "properties": {
    "key": {
      "type": "string",
      "example": "segment-key-123abc",
      "description": "The key of the flag or segment"
    },
    "kind": {
      "$ref": "#/components/schemas/ResourceKind",
      "example": "segment",
      "description": "The type of resource, <code>flag</code> or <code>segment</code>"
    },
    "flagKey": {
      "type": "string",
      "deprecated": true,
      "description": "Deprecated, use <code>key</code> instead"
    },
    "projectKey": {
      "type": "string",
      "example": "project-key-123abc",
      "description": "The project key"
    },
    "environmentKey": {
      "type": "string",
      "example": "environment-key-123abc",
      "description": "The environment key"
    }
  }
}
string ResourceKind
{
  "type": "string"
}
object ReviewOutput
{
  "type": "object",
  "required": [
    "_id",
    "kind"
  ],
  "properties": {
    "_id": {
      "type": "string"
    },
    "kind": {
      "type": "string"
    },
    "comment": {
      "type": "string"
    },
    "memberId": {
      "type": "string"
    },
    "creationDate": {
      "$ref": "#/components/schemas/UnixMillis"
    },
    "serviceTokenId": {
      "type": "string"
    }
  }
}
object ReviewResponse
{
  "type": "object",
  "required": [
    "_id",
    "kind"
  ],
  "properties": {
    "_id": {
      "type": "string",
      "example": "12ab3c45de678910abc12345",
      "description": "The approval request ID"
    },
    "kind": {
      "enum": [
        "approve",
        "decline",
        "comment"
      ],
      "type": "string",
      "example": "approve",
      "description": "The type of review action to take"
    },
    "comment": {
      "type": "string",
      "example": "Approved!",
      "description": "A comment describing the approval response"
    },
    "memberId": {
      "type": "string",
      "example": "12ab3c45de678910abc12345",
      "description": "ID of account member that reviewed request"
    },
    "creationDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1653606981113",
      "description": "Timestamp of when the request was created"
    },
    "serviceTokenId": {
      "type": "string",
      "example": "12ab3c45de678910abc12345",
      "description": "ID of account service token that reviewed request"
    }
  }
}
string RoleType
{
  "type": "string"
}
object Rollout
{
  "type": "object",
  "required": [
    "variations"
  ],
  "properties": {
    "seed": {
      "type": "integer"
    },
    "bucketBy": {
      "type": "string"
    },
    "variations": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/WeightedVariation"
      }
    },
    "contextKind": {
      "type": "string"
    },
    "experimentAllocation": {
      "$ref": "#/components/schemas/ExperimentAllocationRep"
    }
  }
}
object RootResponse
{
  "type": "object",
  "required": [
    "links"
  ],
  "properties": {
    "links": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    }
  }
}
object Rule
{
  "type": "object",
  "required": [
    "clauses",
    "trackEvents"
  ],
  "properties": {
    "_id": {
      "type": "string",
      "description": "The flag rule ID"
    },
    "ref": {
      "type": "string"
    },
    "clauses": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Clause"
      },
      "description": "An array of clauses used for individual targeting based on attributes"
    },
    "rollout": {
      "$ref": "#/components/schemas/Rollout",
      "description": "Details on the percentage rollout, if it exists"
    },
    "variation": {
      "type": "integer",
      "description": "The index of the variation, from the array of variations for this flag"
    },
    "description": {
      "type": "string",
      "description": "The rule description"
    },
    "trackEvents": {
      "type": "boolean",
      "description": "Whether LaunchDarkly tracks events for this rule"
    }
  }
}
object RuleClause
{
  "type": "object",
  "properties": {
    "op": {
      "enum": [
        "in",
        "endsWith",
        "startsWith",
        "matches",
        "contains",
        "lessThan",
        "lessThanOrEqual",
        "greaterThan",
        "greaterThanOrEqual",
        "before",
        "after",
        "segmentMatch",
        "semVerEqual",
        "semVerLessThan",
        "semVerGreaterThan"
      ],
      "type": "string",
      "description": "The operator to apply to the given attribute"
    },
    "negate": {
      "type": "boolean",
      "description": "Whether the operator should be negated"
    },
    "attribute": {
      "type": "string",
      "description": "The attribute the rule applies to, for example, last name or email address"
    }
  }
}
string ScheduleKind
{
  "type": "string"
}
object SdkListRep
{
  "type": "object",
  "required": [
    "_links",
    "sdks"
  ],
  "properties": {
    "sdks": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "Android",
        "Java",
        "Node.js"
      ],
      "description": "The list of SDK names"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {}
    }
  }
}
object SdkVersionListRep
{
  "type": "object",
  "required": [
    "_links",
    "sdkVersions"
  ],
  "properties": {
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {}
    },
    "sdkVersions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SdkVersionRep"
      },
      "example": [
        {
          "sdk": "Android",
          "version": "3.1.2"
        },
        {
          "sdk": "Android",
          "version": "3.1.5"
        },
        {
          "sdk": "C",
          "version": "2.4.6"
        }
      ],
      "description": "The list of SDK names and versions"
    }
  }
}
object SdkVersionRep
{
  "type": "object",
  "required": [
    "sdk",
    "version"
  ],
  "properties": {
    "sdk": {
      "type": "string",
      "description": "The SDK name, or \"Unknown\""
    },
    "version": {
      "type": "string",
      "description": "The version number, or \"Unknown\""
    }
  }
}
object SegmentBody
{
  "type": "object",
  "required": [
    "name",
    "key"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "segment-key-123abc",
      "description": "A unique key used to reference the segment"
    },
    "name": {
      "type": "string",
      "example": "Example segment",
      "description": "A human-friendly name for the segment"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "testing"
      ],
      "description": "Tags for the segment"
    },
    "unbounded": {
      "type": "boolean",
      "example": false,
      "description": "Whether to create a standard segment (<code>false</code>) or a big segment (<code>true</code>). Standard segments include rule-based and smaller list-based segments. Big segments include larger list-based segments and synced segments. Only use a big segment if you need to add more than 15,000 individual targets."
    },
    "description": {
      "type": "string",
      "example": "Bundle our sample customers together",
      "description": "A description of the segment's purpose"
    },
    "unboundedContextKind": {
      "type": "string",
      "example": "device",
      "description": "For big segments, the targeted context kind."
    }
  }
}
string SegmentId
{
  "type": "string"
}
object SegmentMetadata
{
  "type": "object",
  "properties": {
    "envId": {
      "type": "string"
    },
    "deleted": {
      "type": "boolean"
    },
    "version": {
      "type": "integer"
    },
    "segmentId": {
      "$ref": "#/components/schemas/SegmentId"
    },
    "lastModified": {
      "$ref": "#/components/schemas/UnixMillis"
    },
    "excludedCount": {
      "type": "integer"
    },
    "includedCount": {
      "type": "integer"
    }
  }
}
object SegmentTarget
{
  "type": "object",
  "properties": {
    "values": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "contextKind": {
      "type": "string"
    }
  }
}
object SegmentUserList
{
  "type": "object",
  "properties": {
    "add": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "remove": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  }
}
object SegmentUserState
{
  "type": "object",
  "properties": {
    "excluded": {
      "$ref": "#/components/schemas/SegmentUserList"
    },
    "included": {
      "$ref": "#/components/schemas/SegmentUserList"
    }
  }
}
object SegmentsBetaStartBigSegmentImportRequest
{
  "type": "object",
  "properties": {
    "file": {
      "type": "string",
      "format": "binary",
      "description": "CSV file containing keys"
    },
    "mode": {
      "type": "string",
      "format": "string",
      "description": "Import mode. Use either `merge` or `replace`"
    }
  }
}
object Series
{
  "type": "object",
  "required": [
    "time",
    "value"
  ],
  "properties": {
    "time": {
      "type": "integer",
      "format": "int64",
      "example": 1676332800000,
      "description": "The timestamp"
    },
    "value": {
      "type": "number",
      "example": 92,
      "description": "The value for the given timestamp"
    }
  }
}
object SeriesIntervalsRep
{
  "type": "object",
  "required": [
    "series",
    "_links"
  ],
  "properties": {
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {}
    },
    "series": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Series"
      },
      "description": "An array of timestamps and values for a given meter"
    }
  }
}
object SeriesListRep
{
  "type": "object",
  "required": [
    "_links",
    "metadata",
    "series"
  ],
  "properties": {
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {}
    },
    "series": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SeriesTimeSliceRep"
      },
      "example": [
        {
          "0": 11,
          "1": 15,
          "time": 1677888000000
        }
      ],
      "description": "An array of data points with timestamps. Each element of the array is an object with a 'time' field, whose value is the timestamp, and one or more key fields. If there are multiple key fields, they are labeled '0', '1', and so on, and are explained in the <code>metadata</code>."
    },
    "metadata": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SeriesMetadataRep"
      },
      "description": "Metadata about each series"
    }
  }
}
object SeriesMetadataRep
{
  "type": "object",
  "additionalProperties": {}
}
object SeriesTimeSliceRep
{
  "type": "object",
  "additionalProperties": {
    "type": "integer"
  }
}
object SlicedResultsRep
{
  "type": "object",
  "properties": {
    "attribute": {
      "type": "string",
      "example": "country",
      "description": "An attribute that results are sliced by"
    },
    "attributeValue": {
      "type": "string",
      "example": "Canada",
      "description": "Attribute Value for 'attribute'"
    },
    "treatmentResults": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/TreatmentResultRep"
      },
      "description": "A list of the results for each treatment"
    }
  }
}
object SourceEnv
{
  "type": "object",
  "properties": {
    "key": {
      "type": "string",
      "description": "The key of the source environment to clone from"
    },
    "version": {
      "type": "integer",
      "description": "(Optional) The version number of the source environment to clone from. Used for optimistic locking"
    }
  }
}
object StageInput
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "example": "10% rollout on day 1",
      "description": "The stage name"
    },
    "action": {
      "$ref": "#/components/schemas/ActionInput",
      "example": "{\"instructions\": [{ \"kind\": \"turnFlagOn\"}]}",
      "description": "An <code>instructions</code> field containing an array of instructions for the stage. Each object in the array uses the semantic patch format for updating a feature flag."
    },
    "conditions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ConditionInput"
      },
      "example": [
        {
          "kind": "schedule",
          "scheduleKind": "relative",
          "waitDuration": 2,
          "waitDurationUnit": "calendarDay"
        }
      ],
      "description": "An array of conditions for the stage"
    },
    "executeConditionsInSequence": {
      "type": "boolean",
      "example": true,
      "description": "Whether to execute the conditions in sequence for the given stage"
    }
  }
}
object StageOutput
{
  "type": "object",
  "required": [
    "_id",
    "conditions",
    "action",
    "_execution"
  ],
  "properties": {
    "_id": {
      "type": "string",
      "example": "12ab3c45de678910abc12345",
      "description": "The ID of this stage"
    },
    "name": {
      "type": "string",
      "example": "10% rollout on day 1",
      "description": "The stage name"
    },
    "action": {
      "$ref": "#/components/schemas/ActionOutput",
      "example": "{ \"kind\": \"patch\", \"instructions\": [{ \"kind\": \"turnFlagOn\"}] }",
      "description": "The type of instruction, and an array of instructions for the stage. Each object in the array uses the semantic patch format for updating a feature flag."
    },
    "_execution": {
      "$ref": "#/components/schemas/ExecutionOutput",
      "example": "{ \"status\": \"completed\" }",
      "description": "Details on the execution of this stage"
    },
    "conditions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ConditionOutput"
      },
      "example": [
        {
          "id": "12ab3c45de678910abc12345",
          "kind": "schedule",
          "_execution": {
            "status": "completed"
          },
          "scheduleKind": "relative",
          "waitDuration": 2,
          "waitDurationUnit": "calendarDay"
        }
      ],
      "description": "An array of conditions for the stage"
    }
  }
}
object Statement
{
  "type": "object",
  "required": [
    "effect"
  ],
  "properties": {
    "effect": {
      "enum": [
        "allow",
        "deny"
      ],
      "type": "string",
      "example": "allow",
      "description": "Whether this statement should allow or deny actions on the resources."
    },
    "actions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ActionSpecifier"
      },
      "example": [
        "*"
      ],
      "description": "Actions to perform on a resource"
    },
    "resources": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "proj/*:env/*;qa_*:/flag/*"
      ],
      "description": "Resource specifier strings"
    },
    "notActions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ActionSpecifier"
      },
      "description": "Targeted actions are the actions NOT in this list. The <code>actions</code> and <code>notResources</code> fields must be empty to use this field."
    },
    "notResources": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Targeted resources are the resources NOT in this list. The <code>resources</code> and <code>notActions</code> fields must be empty to use this field."
    }
  }
}
object StatementPost
{
  "type": "object",
  "required": [
    "effect"
  ],
  "properties": {
    "effect": {
      "enum": [
        "allow",
        "deny"
      ],
      "type": "string",
      "example": "allow",
      "description": "Whether this statement should allow or deny actions on the resources."
    },
    "actions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ActionSpecifier"
      },
      "example": [
        "*"
      ],
      "description": "Actions to perform on a resource"
    },
    "resources": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "proj/*:env/*:flag/*;testing-tag"
      ],
      "description": "Resource specifier strings"
    },
    "notActions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ActionSpecifier"
      },
      "description": "Targeted actions are the actions NOT in this list. The <code>actions</code> field must be empty to use this field."
    },
    "notResources": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Targeted resources are the resources NOT in this list. The <code>resources</code> field must be empty to use this field."
    }
  }
}
array StatementPostList
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/StatementPost"
  }
}
object StatisticCollectionRep
{
  "type": "object",
  "required": [
    "flags",
    "_links"
  ],
  "properties": {
    "flags": {
      "type": "object",
      "description": "A map of flag keys to a list of code reference statistics for each code repository in which the flag key appears",
      "additionalProperties": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/StatisticRep"
        }
      }
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    }
  }
}
object StatisticRep
{
  "type": "object",
  "required": [
    "name",
    "type",
    "sourceLink",
    "defaultBranch",
    "enabled",
    "version",
    "hunkCount",
    "fileCount",
    "_links"
  ],
  "properties": {
    "name": {
      "type": "string",
      "example": "LaunchDarkly-Docs",
      "description": "The repository name"
    },
    "type": {
      "enum": [
        "bitbucket",
        "custom",
        "github",
        "gitlab"
      ],
      "type": "string",
      "example": "github",
      "description": "The type of repository"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "enabled": {
      "type": "boolean",
      "example": true,
      "description": "Whether or not a repository is enabled for code reference scanning"
    },
    "version": {
      "type": "integer",
      "example": 3,
      "description": "The version of the repository's saved information"
    },
    "fileCount": {
      "type": "integer",
      "description": "The number of files in which the flag appears in this repository"
    },
    "hunkCount": {
      "type": "integer",
      "description": "The number of code reference hunks in which the flag appears in this repository"
    },
    "sourceLink": {
      "type": "string",
      "example": "https://github.com/launchdarkly/LaunchDarkly-Docs",
      "description": "A URL to access the repository"
    },
    "defaultBranch": {
      "type": "string",
      "example": "main",
      "description": "The repository's default branch"
    }
  }
}
object StatisticsRoot
{
  "type": "object",
  "properties": {
    "self": {
      "$ref": "#/components/schemas/Link",
      "example": "{\"href\": \"/api/v2/code-refs/statistics\", \"type\": \"application/json\"}",
      "description": "The location and content type for accessing this resource"
    },
    "projects": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Link"
      },
      "example": [
        {
          "href": "/api/v2/code-refs/statistics/example-project-with-code-refs",
          "type": "application/json"
        }
      ],
      "description": "The location and content type of all projects that have code references"
    }
  }
}
object StatusConflictErrorRep
{
  "type": "object",
  "required": [
    "code",
    "message"
  ],
  "properties": {
    "code": {
      "type": "string",
      "example": "optimistic_locking_error",
      "description": "Specific error code encountered"
    },
    "message": {
      "type": "string",
      "example": "Conflict. Optimistic lock error. Try again later.",
      "description": "Description of the error"
    }
  }
}
object StatusServiceUnavailable
{
  "type": "object",
  "required": [
    "code",
    "message"
  ],
  "properties": {
    "code": {
      "type": "string",
      "example": "service_unavailable",
      "description": "Specific error code encountered"
    },
    "message": {
      "type": "string",
      "example": "Requested service unavailable",
      "description": "Description of the error"
    }
  }
}
object StoreIntegrationError
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    },
    "timestamp": {
      "$ref": "#/components/schemas/UnixMillis"
    },
    "statusCode": {
      "type": "integer"
    }
  }
}
object SubjectDataRep
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The subject's name"
    },
    "_links": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "avatarUrl": {
      "type": "string",
      "description": "The subject's avatar"
    }
  }
}
object TagCollection
{
  "type": "object",
  "required": [
    "items",
    "_links"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "ops",
        "pro"
      ],
      "description": "List of tags"
    },
    "_links": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "totalCount": {
      "type": "integer",
      "example": 103,
      "description": "The total number of tags"
    }
  }
}
object Target
{
  "type": "object",
  "required": [
    "values",
    "variation"
  ],
  "properties": {
    "values": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "A list of the keys for targets that will receive this variation because of individual targeting"
    },
    "variation": {
      "type": "integer",
      "description": "The index, from the array of variations for this flag, of the variation to serve this list of targets"
    },
    "contextKind": {
      "type": "string",
      "description": "The context kind of the individual target"
    }
  }
}
object TargetResourceRep
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "example": "Example flag name",
      "description": "The name of the resource"
    },
    "_links": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "resources": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "proj/example-project:env/production:flag/example-flag"
      ],
      "description": "The resource specifier"
    }
  }
}
object Team
{
  "type": "object",
  "properties": {
    "key": {
      "type": "string",
      "example": "team-key-123abc",
      "description": "The team key"
    },
    "name": {
      "type": "string",
      "example": "Example team",
      "description": "A human-friendly name for the team"
    },
    "roles": {
      "$ref": "#/components/schemas/TeamCustomRoles",
      "description": "Paginated list of the custom roles assigned to this team. Only included if specified in the <code>expand</code> query parameter."
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/teams/example-team",
          "type": "application/json"
        },
        "roles": {
          "href": "/api/v2/teams/example-team/roles",
          "type": "application/json"
        },
        "parent": {
          "href": "/api/v2/teams",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "_access": {
      "$ref": "#/components/schemas/Access",
      "description": "Details on the allowed and denied actions for this team"
    },
    "members": {
      "$ref": "#/components/schemas/TeamMembers",
      "description": "Details on the total count of members that belong to the team. Only included if specified in the <code>expand</code> query parameter."
    },
    "_version": {
      "type": "integer",
      "example": 3,
      "description": "The team version"
    },
    "projects": {
      "$ref": "#/components/schemas/TeamProjects",
      "description": "Paginated list of the projects that the team has any write access to. Only included if specified in the <code>expand</code> query parameter."
    },
    "_idpSynced": {
      "type": "boolean",
      "example": true,
      "description": "Whether the team has been synced with an external identity provider (IdP). Team sync is available to customers on an Enterprise plan."
    },
    "description": {
      "type": "string",
      "example": "Description for this team.",
      "description": "A description of the team"
    },
    "maintainers": {
      "$ref": "#/components/schemas/TeamMaintainers",
      "description": "Paginated list of the maintainers assigned to this team. Only included if specified in the <code>expand</code> query parameter."
    },
    "_creationDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1648671956143",
      "description": "Timestamp of when the team was created"
    },
    "_lastModified": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1648672446072",
      "description": "Timestamp of when the team was most recently updated"
    }
  }
}
object TeamCustomRole
{
  "type": "object",
  "properties": {
    "key": {
      "type": "string",
      "example": "role-key-123abc",
      "description": "The key of the custom role"
    },
    "name": {
      "type": "string",
      "example": "Example role",
      "description": "The name of the custom role"
    },
    "projects": {
      "$ref": "#/components/schemas/TeamProjects",
      "description": "Details on the projects where team members have write privileges on at least one resource type (e.g. flags)"
    },
    "appliedOn": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1648672018410",
      "description": "Timestamp of when the custom role was assigned to this team"
    }
  }
}
object TeamCustomRoles
{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/TeamCustomRole"
      },
      "description": "An array of the custom roles that have been assigned to this team"
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/teams/example-team/roles?limit=25",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "totalCount": {
      "type": "integer",
      "example": 1,
      "description": "The number of custom roles assigned to this team"
    }
  }
}
object TeamImportsRep
{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/MemberImportItem"
      },
      "description": "An array of details about the members requested to be added to this team"
    }
  }
}
object TeamMaintainers
{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/MemberSummary"
      },
      "example": [
        {
          "_id": "569f183514f4432160000007",
          "role": "reader",
          "email": "ariel@acme.com",
          "_links": {
            "self": {
              "href": "/api/v2/members/569f183514f4432160000007",
              "type": "application/json"
            }
          },
          "lastName": "Flores",
          "firstName": "Ariel"
        }
      ],
      "description": "Details on the members that have been assigned as maintainers of the team"
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/teams/example-team/maintainers?limit=5",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "totalCount": {
      "type": "integer",
      "example": 1,
      "description": "The number of maintainers of the team"
    }
  }
}
object TeamMembers
{
  "type": "object",
  "properties": {
    "totalCount": {
      "type": "integer",
      "example": 15,
      "description": "The total count of members that belong to the team"
    }
  }
}
object TeamProjects
{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ProjectSummary"
      },
      "example": [
        {
          "key": "project-key-123abc",
          "name": "Example project",
          "_links": {
            "self": {
              "href": "/api/v2/projects/example-project",
              "type": "application/json"
            },
            "environments": {
              "href": "/api/v2/projects/example-project/environments",
              "type": "application/json"
            }
          }
        }
      ],
      "description": "Details on each project where team members have write privileges on at least one resource type (e.g. flags)"
    },
    "totalCount": {
      "type": "integer",
      "example": 1
    }
  }
}
object Teams
{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Team"
      },
      "description": "An array of teams"
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/teams?expand=maintainers%2Cmembers%2Croles%2Cprojects&limit=20",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "totalCount": {
      "type": "integer",
      "example": 1,
      "description": "The number of teams"
    }
  }
}
object TeamsAddMultipleMembersToTeamRequest
{
  "type": "object",
  "properties": {
    "file": {
      "type": "string",
      "format": "binary",
      "description": "CSV file containing email addresses"
    }
  }
}
object TimestampRep
{
  "type": "object",
  "properties": {
    "simple": {
      "type": "string"
    },
    "rfc3339": {
      "type": "string"
    },
    "seconds": {
      "type": "integer",
      "format": "int64"
    },
    "milliseconds": {
      "$ref": "#/components/schemas/UnixMillis"
    }
  }
}
object Token
{
  "type": "object",
  "required": [
    "_id",
    "ownerId",
    "memberId",
    "creationDate",
    "lastModified",
    "_links"
  ],
  "properties": {
    "_id": {
      "$ref": "#/components/schemas/ObjectId",
      "example": "61095542756dba551110ae21",
      "description": "The ID of the access token"
    },
    "name": {
      "type": "string",
      "example": "Example reader token",
      "description": "A human-friendly name for the access token"
    },
    "role": {
      "type": "string",
      "example": "reader",
      "description": "Built-in role for the token"
    },
    "token": {
      "type": "string",
      "example": "1234",
      "description": "The token value. When creating or resetting, contains the entire token value. Otherwise, contains the last four characters."
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/tokens/61095542756dba551110ae21",
          "type": "application/json"
        },
        "parent": {
          "href": "/api/v2/tokens",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "_member": {
      "$ref": "#/components/schemas/MemberSummary",
      "description": "Details on the member who created the access token"
    },
    "ownerId": {
      "$ref": "#/components/schemas/ObjectId",
      "example": "569f514156e003339cfd3917",
      "description": "The ID of the owner of the account for the access token"
    },
    "lastUsed": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "0",
      "description": "Timestamp of when the access token was last used"
    },
    "memberId": {
      "$ref": "#/components/schemas/ObjectId",
      "example": "569f514183f2164430000002",
      "description": "The ID of the member who created the access token"
    },
    "inlineRole": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Statement"
      },
      "example": [],
      "description": "An array of policy statements, with three attributes: effect, resources, actions. May be used in place of a built-in or custom role."
    },
    "description": {
      "type": "string",
      "example": "A reader token used in testing and examples",
      "description": "A description for the access token"
    },
    "creationDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1628001602644",
      "description": "Timestamp of when the access token was created"
    },
    "lastModified": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1628001602644",
      "description": "Timestamp of the last modification of the access token"
    },
    "serviceToken": {
      "type": "boolean",
      "example": false,
      "description": "Whether this is a service token or a personal token"
    },
    "customRoleIds": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ObjectId"
      },
      "example": [],
      "description": "A list of custom role IDs to use as access limits for the access token"
    },
    "defaultApiVersion": {
      "type": "integer",
      "example": 20220603,
      "description": "The default API version for this token"
    }
  }
}
object TokenSummary
{
  "type": "object",
  "properties": {
    "_id": {
      "type": "string"
    },
    "name": {
      "type": "string",
      "example": "DevOps token",
      "description": "The name of the token"
    },
    "_links": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "ending": {
      "type": "string",
      "example": "2345",
      "description": "The last few characters of the token"
    },
    "serviceToken": {
      "type": "boolean",
      "example": false,
      "description": "Whether this is a service token"
    }
  }
}
object Tokens
{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Token"
      },
      "description": "An array of access tokens"
    },
    "_links": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "totalCount": {
      "type": "integer",
      "description": "The number of access tokens returned"
    }
  }
}
object TreatmentInput
{
  "type": "object",
  "required": [
    "name",
    "baseline",
    "allocationPercent",
    "parameters"
  ],
  "properties": {
    "name": {
      "type": "string",
      "example": "Treatment 1",
      "description": "The treatment name"
    },
    "baseline": {
      "type": "boolean",
      "example": true,
      "description": "Whether this treatment is the baseline to compare other treatments against"
    },
    "parameters": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/TreatmentParameterInput"
      },
      "description": "Details on the flag and variation to use for this treatment"
    },
    "allocationPercent": {
      "type": "string",
      "example": "10",
      "description": "The percentage of traffic allocated to this treatment during the iteration"
    }
  }
}
object TreatmentParameterInput
{
  "type": "object",
  "required": [
    "flagKey",
    "variationId"
  ],
  "properties": {
    "flagKey": {
      "type": "string",
      "example": "example-flag-for-experiment",
      "description": "The flag key"
    },
    "variationId": {
      "type": "string",
      "example": "e432f62b-55f6-49dd-a02f-eb24acf39d05",
      "description": "The ID of the flag variation"
    }
  }
}
object TreatmentRep
{
  "type": "object",
  "required": [
    "name",
    "allocationPercent"
  ],
  "properties": {
    "_id": {
      "type": "string",
      "example": "122c9f3e-da26-4321-ba68-e0fc02eced58",
      "description": "The treatment ID. This is the variation ID from the flag."
    },
    "name": {
      "type": "string",
      "example": "Treatment 1",
      "description": "The treatment name. This is the variation name from the flag."
    },
    "baseline": {
      "type": "boolean",
      "example": true,
      "description": "Whether this treatment is the baseline to compare other treatments against"
    },
    "parameters": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ParameterRep"
      },
      "description": "Details on the flag and variation used for this treatment"
    },
    "allocationPercent": {
      "type": "string",
      "example": "10",
      "description": "The percentage of traffic allocated to this treatment during the iteration"
    }
  }
}
object TreatmentResultRep
{
  "type": "object",
  "properties": {
    "mean": {
      "type": "number",
      "example": 0.5432525951557093,
      "description": "The average value of the variation in this sample. It doesn’t capture the uncertainty in the measurement, so it should not be the only measurement you use to make decisions."
    },
    "pBest": {
      "type": "number",
      "example": 0.6083,
      "description": "The likelihood that this variation has the biggest effect on the primary metric. The variation with the highest probability is likely the best of the variations you're testing"
    },
    "units": {
      "type": "integer",
      "format": "int64",
      "example": 76,
      "description": "The number of units exposed to this treatment that have event values, including those that are configured to default to 0"
    },
    "traffic": {
      "type": "integer",
      "format": "int64",
      "example": 332,
      "description": "The number of units exposed to this treatment."
    },
    "treatmentId": {
      "type": "string",
      "example": "92b8354e-360e-4d67-8f13-fa6a46ca8077",
      "description": "The ID of the treatment"
    },
    "distribution": {
      "$ref": "#/components/schemas/Distribution",
      "description": "The posterior distribution of the mean of the metric in this variation."
    },
    "treatmentName": {
      "type": "string",
      "example": "variation 25% off",
      "description": "The name of the treatment"
    },
    "credibleInterval": {
      "$ref": "#/components/schemas/CredibleIntervalRep",
      "example": "{\"lower\": 0.4060771673663068, \"upper\": 0.6713222134386467}",
      "description": "The range of the metric's values that you should have 90% confidence in."
    },
    "relativeDifferences": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/RelativeDifferenceRep"
      },
      "example": [
        {
          "lower": -0.13708601934659803,
          "upper": 0.42655970355712425,
          "fromTreatmentId": "92b8354e-360e-4d67-8f13-fa6a46ca8077"
        }
      ],
      "description": "Estimates of the relative difference between this treatment's mean and the mean of each other treatment"
    }
  }
}
array TreatmentsInput
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/TreatmentInput"
  }
}
object TriggerWorkflowCollectionRep
{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/TriggerWorkflowRep"
      },
      "description": "An array of flag triggers"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    }
  }
}
object TriggerWorkflowRep
{
  "type": "object",
  "properties": {
    "_id": {
      "$ref": "#/components/schemas/FeatureWorkflowId",
      "example": "12ab3c45de678910abc12345",
      "description": "The ID of this flag trigger"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "enabled": {
      "type": "boolean",
      "example": true,
      "description": "Whether the flag trigger is currently enabled"
    },
    "_version": {
      "type": "integer",
      "example": 1,
      "description": "The flag trigger version"
    },
    "triggerURL": {
      "type": "string",
      "description": "The unguessable URL for this flag trigger"
    },
    "_maintainer": {
      "$ref": "#/components/schemas/MemberSummary",
      "description": "Details on the member who maintains this flag trigger"
    },
    "instructions": {
      "$ref": "#/components/schemas/Instructions",
      "example": "[ { \"kind\": \"turnFlagOn\" }]",
      "description": "Details on the action to perform when triggering"
    },
    "_creationDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1654104600000",
      "description": "Timestamp of when the flag trigger was created"
    },
    "_maintainerId": {
      "type": "string",
      "example": "12ab3c45de678910abc12345",
      "description": "The ID of the flag trigger maintainer"
    },
    "_triggerCount": {
      "type": "integer",
      "example": 3,
      "description": "Number of times the trigger has been executed"
    },
    "_integrationKey": {
      "type": "string",
      "example": "generic-trigger",
      "description": "The unique identifier of the integration for your trigger"
    },
    "_lastTriggeredAt": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1654114600000",
      "description": "Timestamp of when the trigger was most recently executed"
    },
    "_recentTriggerBodies": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/RecentTriggerBody"
      },
      "description": "Details on recent flag trigger requests."
    }
  }
}
object UnauthorizedErrorRep
{
  "type": "object",
  "required": [
    "code",
    "message"
  ],
  "properties": {
    "code": {
      "type": "string",
      "example": "unauthorized",
      "description": "Specific error code encountered"
    },
    "message": {
      "type": "string",
      "example": "Invalid access token",
      "description": "Description of the error"
    }
  }
}
integer UnixMillis
{
  "type": "integer",
  "format": "int64"
}
object UpsertContextKindPayload
{
  "type": "object",
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "example": "organization",
      "description": "The context kind name"
    },
    "version": {
      "type": "integer",
      "example": 1,
      "description": "The context kind version. If not specified when the context kind is created, defaults to 1."
    },
    "archived": {
      "type": "boolean",
      "example": false,
      "description": "Whether the context kind is archived. Archived context kinds are unavailable for targeting."
    },
    "description": {
      "type": "string",
      "example": "An example context kind for organizations",
      "description": "The context kind description"
    },
    "hideInTargeting": {
      "type": "boolean",
      "example": false,
      "description": "Alias for archived."
    }
  }
}
object UpsertFlagDefaultsPayload
{
  "type": "object",
  "required": [
    "tags",
    "temporary",
    "booleanDefaults",
    "defaultClientSideAvailability"
  ],
  "properties": {
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "tag-1",
        "tag-2"
      ],
      "description": "A list of default tags for each flag"
    },
    "temporary": {
      "type": "boolean",
      "example": true,
      "description": "Whether the flag should be temporary by default"
    },
    "booleanDefaults": {
      "$ref": "#/components/schemas/BooleanFlagDefaults"
    },
    "defaultClientSideAvailability": {
      "$ref": "#/components/schemas/DefaultClientSideAvailability",
      "description": "Which client-side SDK types can use this flag by default."
    }
  }
}
object UpsertResponseRep
{
  "type": "object",
  "properties": {
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "status": {
      "type": "string",
      "example": "success",
      "description": "The status of the create or update operation"
    }
  }
}
object UrlMatcher
{
  "type": "object",
  "additionalProperties": {}
}
array UrlMatchers
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/UrlMatcher"
  }
}
object UrlPost
{
  "type": "object",
  "properties": {
    "url": {
      "type": "string"
    },
    "kind": {
      "enum": [
        "exact",
        "canonical",
        "substring",
        "regex"
      ],
      "type": "string"
    },
    "pattern": {
      "type": "string"
    },
    "substring": {
      "type": "string"
    }
  }
}
object User
{
  "type": "object",
  "properties": {
    "ip": {
      "type": "string",
      "example": "10.10.10.10",
      "description": "The user's IP address"
    },
    "key": {
      "type": "string",
      "example": "user-key-123abc",
      "description": "The user key. This is the only mandatory user attribute."
    },
    "name": {
      "type": "string",
      "example": "Sandy Smith",
      "description": "The user's full name"
    },
    "email": {
      "type": "string",
      "example": "sandy@example.com",
      "description": "The user's email"
    },
    "avatar": {
      "type": "string",
      "example": "http://example.com/avatar.png",
      "description": "An absolute URL to an avatar image."
    },
    "custom": {
      "type": "object",
      "description": "Any other custom attributes for this user. Custom attributes contain any other user data that you would like to use to conditionally target your users.",
      "additionalProperties": {}
    },
    "country": {
      "type": "string",
      "example": "United States",
      "description": "The user's country"
    },
    "lastName": {
      "type": "string",
      "example": "Smith",
      "description": "The user's last name"
    },
    "anonymous": {
      "type": "boolean",
      "example": false,
      "description": "Whether the user is anonymous. If true, this user does not appear on the Contexts list in the LaunchDarkly user interface."
    },
    "firstName": {
      "type": "string",
      "example": "Sandy",
      "description": "The user's first name"
    },
    "secondary": {
      "type": "string",
      "example": "2398127",
      "description": "If provided, used with the user key to generate a variation in percentage rollouts"
    },
    "privateAttrs": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "A list of attribute names that are marked as private. You can use these attributes in targeting rules and segments. If you are using a server-side SDK, the SDK will not send the private attribute back to LaunchDarkly. If you are using a client-side SDK, the SDK will send the private attribute back to LaunchDarkly for evaluation. However, the SDK won't send the attribute to LaunchDarkly in events data, LaunchDarkly won't store the private attribute, and the private attribute will not appear on the Contexts list."
    }
  }
}
object UserAttributeNamesRep
{
  "type": "object",
  "properties": {
    "custom": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "Age",
        "FavoriteFood",
        "FavoriteColor"
      ],
      "description": "custom attributes"
    },
    "private": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "SSN",
        "credit_card_number"
      ],
      "description": "private attributes"
    },
    "standard": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "key",
        "ip",
        "firstName",
        "lastName",
        "country",
        "anonymous"
      ],
      "description": "standard attributes"
    }
  }
}
object UserFlagSetting
{
  "type": "object",
  "required": [
    "_links",
    "_value",
    "setting"
  ],
  "properties": {
    "_links": {
      "type": "object",
      "example": {
        "sort.order": {
          "href": "/api/v2/users/lacuna/production/Abbie_Braun/flags/sort.order",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources.",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "_value": {
      "example": "true",
      "description": "The value of the flag variation that the user receives. If there is no defined default rule, this is null."
    },
    "reason": {
      "$ref": "#/components/schemas/EvaluationReason",
      "example": "{\"kind\": \"RULE_MATCH\"}",
      "description": "Contains information about why that variation was selected."
    },
    "setting": {
      "example": "null",
      "description": "Whether the user is explicitly targeted to receive a particular variation. The setting is false if you have turned off a feature flag for a user. It is null if you haven't assigned that user to a specific variation."
    }
  }
}
object UserFlagSettings
{
  "type": "object",
  "required": [
    "items",
    "_links"
  ],
  "properties": {
    "items": {
      "type": "object",
      "example": {
        "sort.order": {
          "_links": {
            "self": {
              "href": "/api/v2/users/lacuna/production/Abbie_Braun/flags/sort.order",
              "type": "application/json"
            }
          },
          "_value": true,
          "setting": null
        },
        "alternate.page": {
          "_links": {
            "self": {
              "href": "/api/v2/users/lacuna/production/Abbie_Braun/flags/alternate.page",
              "type": "application/json"
            }
          },
          "_value": false,
          "setting": null
        }
      },
      "description": "An array of flag settings for the user",
      "additionalProperties": {
        "$ref": "#/components/schemas/UserFlagSetting"
      }
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/users/lacuna/production/Abbie_Braun/flags",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    }
  }
}
object UserRecord
{
  "type": "object",
  "properties": {
    "user": {
      "$ref": "#/components/schemas/User",
      "description": "Details on the user"
    },
    "_links": {
      "type": "object",
      "example": {
        "self": {
          "href": "/api/v2/users/my-project/my-environment/my-user",
          "type": "application/json"
        },
        "site": {
          "href": "/my-project/my-environment/users/my-user",
          "type": "text/html"
        },
        "parent": {
          "href": "/api/v2/users/my-project/my-environment",
          "type": "application/json"
        },
        "settings": {
          "href": "/api/v2/users/my-project/my-environment/my-user/flags",
          "type": "text/html"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "_access": {
      "$ref": "#/components/schemas/Access",
      "description": "Details on the allowed and denied actions for this user"
    },
    "ownerId": {
      "$ref": "#/components/schemas/ObjectId",
      "example": "12ab3c45de678910abc12345",
      "description": "The ID of the member who is the owner for this account"
    },
    "lastPing": {
      "type": "string",
      "format": "date-time",
      "example": "2022-06-28T23:21:29.176609596Z",
      "description": "Timestamp of the last time this user was seen"
    },
    "sortValue": {
      "example": "user-key-123abc",
      "description": "If this record is returned as part of a list, the value used to sort the list. This is only included when the <code>sort</code> query parameter is specified. It is a time, in Unix milliseconds, if the sort is by <code>lastSeen</code>. It is a user key if the sort is by <code>userKey</code>."
    },
    "environmentId": {
      "$ref": "#/components/schemas/ObjectId",
      "example": "1234a56b7c89d012345e678f",
      "description": "The environment ID"
    }
  }
}
object UserSegment
{
  "type": "object",
  "required": [
    "name",
    "tags",
    "creationDate",
    "lastModifiedDate",
    "key",
    "_links",
    "rules",
    "version",
    "deleted",
    "generation"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "segment-key-123abc",
      "description": "A unique key used to reference the segment"
    },
    "name": {
      "type": "string",
      "example": "Example segment",
      "description": "A human-friendly name for the segment."
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "testing"
      ],
      "description": "Tags for the segment. Defaults to an empty array."
    },
    "rules": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/UserSegmentRule"
      },
      "example": [
        {
          "_id": "1234a56b7c89d012345e678f",
          "clauses": [
            {
              "op": "endsWith",
              "_id": "12ab3c45de678910fab12345",
              "negate": false,
              "values": [
                ".edu"
              ],
              "attribute": "email"
            }
          ]
        }
      ],
      "description": "An array of the targeting rules for this segment."
    },
    "_flags": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/FlagListingRep"
      },
      "description": "A list of flags targeting this segment. Only included when getting a single segment, using the <code>getSegment</code> endpoint."
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "_access": {
      "$ref": "#/components/schemas/Access"
    },
    "deleted": {
      "type": "boolean",
      "example": false,
      "description": "Whether the segment has been deleted"
    },
    "version": {
      "type": "integer",
      "example": 1,
      "description": "Version of the segment"
    },
    "excluded": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "user-key-123abc"
      ],
      "description": "An array of keys for excluded targets. Segment rules bypass individual excluded targets, so they will never be included based on rules. Excluded targets may still be included explicitly. This value is omitted for list-based segments over 15,000 entries, also called big segments."
    },
    "included": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "user-key-123abc"
      ],
      "description": "An array of keys for included targets. Included individual targets are always segment members, regardless of segment rules. For list-based segments over 15,000 entries, also called big segments, this array is either empty or omitted."
    },
    "_external": {
      "type": "string",
      "example": "amplitude",
      "description": "The external data store backing this segment. Only applies to synced segments."
    },
    "unbounded": {
      "type": "boolean",
      "example": false,
      "description": "Whether this is a standard segment (<code>false</code>) or a big segment (<code>true</code>). Standard segments include rule-based segments and smaller list-based segments. Big segments include larger list-based segments and synced segments. If omitted, the segment is a standard segment."
    },
    "generation": {
      "type": "integer",
      "description": "For big segments, how many times this segment has been created."
    },
    "description": {
      "type": "string",
      "example": "Bundle our sample customers together",
      "description": "A description of the segment's purpose. Defaults to <code>null</code> and is omitted in the response if not provided."
    },
    "creationDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1654104600000",
      "description": "Timestamp of when the segment was created"
    },
    "_externalLink": {
      "type": "string",
      "example": "https://analytics.amplitude.com/org/1234/cohort/123abc",
      "description": "The URL for the external data store backing this segment. Only applies to synced segments."
    },
    "excludedContexts": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SegmentTarget"
      }
    },
    "includedContexts": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SegmentTarget"
      }
    },
    "lastModifiedDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1654104600000",
      "description": "Timestamp of when the segment was last modified"
    },
    "_importInProgress": {
      "type": "boolean",
      "example": false,
      "description": "Whether an import is currently in progress for the specified segment. Only applies to big segments."
    },
    "_unboundedMetadata": {
      "$ref": "#/components/schemas/SegmentMetadata",
      "description": "Details on the external data store backing this segment. Only applies to big segments."
    },
    "unboundedContextKind": {
      "type": "string",
      "description": "For big segments, the targeted context kind."
    }
  }
}
object UserSegmentRule
{
  "type": "object",
  "required": [
    "clauses"
  ],
  "properties": {
    "_id": {
      "type": "string"
    },
    "weight": {
      "type": "integer"
    },
    "clauses": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Clause"
      }
    },
    "bucketBy": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "rolloutContextKind": {
      "type": "string"
    }
  }
}
object UserSegments
{
  "type": "object",
  "required": [
    "items",
    "_links",
    "totalCount"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/UserSegment"
      },
      "description": "An array of segments"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "totalCount": {
      "type": "integer",
      "description": "The total number of segments"
    }
  }
}
object Users
{
  "type": "object",
  "required": [
    "totalCount",
    "items"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/UserRecord"
      },
      "description": "Details on the users"
    },
    "_links": {
      "type": "object",
      "example": {
        "next": {
          "href": "/api/v2/user-search/my-project/my-environment?after=1647993600000&limit=20&searchAfter=my-user&sort=userKey",
          "type": "application/json"
        },
        "self": {
          "href": "/api/v2/user-search/my-project/my-environment?after=1647993600000&limit=20&sort=userKey",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "totalCount": {
      "type": "integer",
      "example": 245,
      "description": "The total number of users in the environment"
    }
  }
}
object UsersRep
{
  "type": "object",
  "required": [
    "totalCount",
    "items"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/UserRecord"
      },
      "description": "Details on the users"
    },
    "_links": {
      "type": "object",
      "example": {
        "next": {
          "href": "/api/v2/users/my-project/my-environment?after=1647993600000&limit=20&searchAfter=my-user",
          "type": "application/json"
        },
        "self": {
          "href": "/api/v2/users/my-project/my-environment?after=1647993600000&limit=20",
          "type": "application/json"
        }
      },
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "totalCount": {
      "type": "integer",
      "example": 245,
      "description": "The total number of users in the environment"
    }
  }
}
object ValidationFailedErrorRep
{
  "type": "object",
  "required": [
    "code",
    "message",
    "errors"
  ],
  "properties": {
    "code": {
      "type": "string",
      "example": "invalid_request",
      "description": "Specific error code encountered"
    },
    "errors": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/FailureReasonRep"
      },
      "description": "List of validation errors"
    },
    "message": {
      "type": "string",
      "example": "validation failed",
      "description": "Description of the error"
    }
  }
}
object ValuePut
{
  "type": "object",
  "properties": {
    "comment": {
      "type": "string",
      "example": "make sure this context experiences a specific variation",
      "description": "Optional comment describing the change"
    },
    "setting": {
      "example": "existing_variation_value_to_use",
      "description": "The variation value to set for the context. Must match the flag's variation type."
    }
  }
}
object Variation
{
  "type": "object",
  "required": [
    "value"
  ],
  "properties": {
    "_id": {
      "type": "string",
      "description": "The ID of the variation. Leave empty when you are creating a flag."
    },
    "name": {
      "type": "string",
      "description": "A human-friendly name for the variation. Defaults to an empty string, but is omitted from the response if not set."
    },
    "value": {
      "description": "The value of the variation. For boolean flags, this must be <code>true</code> or <code>false</code>. For multivariate flags, this may be a string, number, or JSON object."
    },
    "description": {
      "type": "string",
      "description": "Description of the variation. Defaults to an empty string, but is omitted from the response if not set."
    }
  }
}
object VariationEvalSummary
{
  "type": "object",
  "properties": {
    "after": {
      "type": "integer",
      "format": "int64",
      "example": 500,
      "description": "The number of evaluations in the ten minutes after the flag event"
    },
    "value": {
      "example": "true",
      "description": "The variation value"
    },
    "before": {
      "type": "integer",
      "format": "int64",
      "example": 1000,
      "description": "The number of evaluations in the ten minutes before the flag event"
    }
  }
}
object VariationOrRolloutRep
{
  "type": "object",
  "properties": {
    "rollout": {
      "$ref": "#/components/schemas/Rollout",
      "description": "Details on the percentage rollout, if it exists"
    },
    "variation": {
      "type": "integer",
      "description": "The index of the variation, from the array of variations for this flag"
    }
  }
}
object VariationSummary
{
  "type": "object",
  "required": [
    "rules",
    "nullRules",
    "targets",
    "contextTargets"
  ],
  "properties": {
    "isOff": {
      "type": "boolean"
    },
    "rules": {
      "type": "integer"
    },
    "rollout": {
      "type": "integer"
    },
    "targets": {
      "type": "integer"
    },
    "bucketBy": {
      "type": "string"
    },
    "nullRules": {
      "type": "integer"
    },
    "isFallthrough": {
      "type": "boolean"
    },
    "contextTargets": {
      "type": "integer"
    }
  }
}
object VersionsRep
{
  "type": "object",
  "required": [
    "validVersions",
    "latestVersion",
    "currentVersion"
  ],
  "properties": {
    "beta": {
      "type": "boolean",
      "example": false,
      "description": "Whether the version of the API currently is use is a beta version. This is always <code>true</code> if you add the <code>LD-API-Version: beta</code> header to your request."
    },
    "latestVersion": {
      "$ref": "#/components/schemas/DateVersion",
      "example": "20220603",
      "description": "The most recently released version of the API"
    },
    "validVersions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/DateVersion"
      },
      "description": "A list of all valid API versions. To learn more about our versioning, read [Versioning](https://apidocs.launchdarkly.com/#section/Overview/Versioning)."
    },
    "currentVersion": {
      "$ref": "#/components/schemas/DateVersion",
      "example": "20220603",
      "description": "The version of the API currently in use. Typically this is the API version specified for your access token. If you add the <code>LD-API-Version: beta</code> header to your request, this will be equal to the <code>latestVersion</code>."
    }
  }
}
object Webhook
{
  "type": "object",
  "required": [
    "_links",
    "_id",
    "url",
    "on",
    "tags"
  ],
  "properties": {
    "on": {
      "type": "boolean",
      "example": true,
      "description": "Whether or not this webhook is enabled"
    },
    "_id": {
      "type": "string",
      "example": "57be1db38b75bf0772d11384",
      "description": "The ID of this webhook"
    },
    "url": {
      "type": "string",
      "example": "http://www.example.com",
      "description": "The URL to which LaunchDarkly sends an HTTP POST payload for this webhook"
    },
    "name": {
      "type": "string",
      "example": "Example hook",
      "description": "A human-readable name for this webhook"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "examples"
      ],
      "description": "List of tags for this webhook"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "secret": {
      "type": "string",
      "example": "frobozz",
      "description": "The secret for this webhook"
    },
    "_access": {
      "$ref": "#/components/schemas/Access",
      "description": "Details on the allowed and denied actions for this webhook"
    },
    "statements": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Statement"
      },
      "description": "Represents a Custom role policy, defining a resource kinds filter the webhook responds to."
    }
  }
}
object Webhooks
{
  "type": "object",
  "required": [
    "_links",
    "items"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Webhook"
      },
      "description": "An array of webhooks"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    }
  }
}
object WeightedVariation
{
  "type": "object",
  "required": [
    "variation",
    "weight"
  ],
  "properties": {
    "weight": {
      "type": "integer"
    },
    "variation": {
      "type": "integer"
    },
    "_untracked": {
      "type": "boolean"
    }
  }
}
object WorkflowTemplateMetadata
{
  "type": "object",
  "properties": {
    "parameters": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/WorkflowTemplateParameter"
      }
    }
  }
}
object WorkflowTemplateOutput
{
  "type": "object",
  "required": [
    "_id",
    "_key",
    "_creationDate",
    "_ownerId",
    "_maintainerId",
    "_links"
  ],
  "properties": {
    "_id": {
      "type": "string"
    },
    "_key": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "_links": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "stages": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StageOutput"
      }
    },
    "_ownerId": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "_creationDate": {
      "$ref": "#/components/schemas/UnixMillis"
    },
    "_maintainerId": {
      "type": "string"
    }
  }
}
object WorkflowTemplateParameter
{
  "type": "object",
  "properties": {
    "_id": {
      "$ref": "#/components/schemas/ObjectId",
      "description": "The ID of the condition or instruction referenced by this parameter"
    },
    "path": {
      "type": "string",
      "description": "The path of the property to parameterize, relative to its parent condition or instruction"
    },
    "valid": {
      "type": "boolean",
      "description": "Whether the default value is valid for the target flag and environment"
    },
    "default": {
      "$ref": "#/components/schemas/ParameterDefault",
      "description": "The default value of the parameter and other relevant metadata"
    }
  }
}
object WorkflowTemplatesListingOutputRep
{
  "type": "object",
  "required": [
    "items"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/WorkflowTemplateOutput"
      }
    }
  }
}
object createApprovalRequestRequest
{
  "type": "object",
  "required": [
    "resourceId",
    "description",
    "instructions"
  ],
  "properties": {
    "comment": {
      "type": "string",
      "example": "optional comment",
      "description": "Optional comment describing the approval request"
    },
    "resourceId": {
      "type": "string",
      "description": "String representation of a resource"
    },
    "description": {
      "type": "string",
      "example": "Requesting to update targeting",
      "description": "A brief description of the changes you're requesting"
    },
    "instructions": {
      "$ref": "#/components/schemas/Instructions",
      "example": "[{\"kind\": \"addUserTargets\", \"values\": [ \"user-key-123abc\"], \"variationId\": \"ce67d625-a8b9-4fb5-a344-ab909d9d4f4d\" }]",
      "description": "List of instructions in semantic patch format to be applied to the feature flag. Review the [Update feature flag](https://apidocs.launchdarkly.com) documentation for details on available instructions."
    },
    "notifyTeamKeys": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "example-reviewer-team"
      ],
      "description": "An array of team keys. The members of these teams are notified to review the approval request."
    },
    "notifyMemberIds": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "1234a56b7c89d012345e678f"
      ],
      "description": "An array of member IDs. These members are notified to review the approval request."
    },
    "integrationConfig": {
      "$ref": "#/components/schemas/FormVariableConfig",
      "description": "Additional approval request fields for third-party integration approval systems. If you are using a third-party integration to manage approval requests, these additional fields will be described in the <code>manifest.json</code> for that integration, at https://github.com/launchdarkly/integration-framework."
    }
  }
}
object createCopyFlagConfigApprovalRequestRequest
{
  "type": "object",
  "required": [
    "description",
    "source"
  ],
  "properties": {
    "source": {
      "$ref": "#/components/schemas/sourceFlag",
      "description": "The flag to copy"
    },
    "comment": {
      "type": "string",
      "example": "optional comment",
      "description": "Optional comment describing the approval request"
    },
    "description": {
      "type": "string",
      "example": "copy flag settings to another environment",
      "description": "A brief description of your changes"
    },
    "notifyTeamKeys": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "example-reviewer-team"
      ],
      "description": "An array of team keys. The members of these teams are notified to review the approval request."
    },
    "excludedActions": {
      "type": "array",
      "items": {
        "enum": [
          "updateOn",
          "updateFallthrough",
          "updateOffVariation",
          "updateRules",
          "updateTargets",
          "updatePrerequisites"
        ],
        "type": "string"
      },
      "example": [
        "updateOn"
      ],
      "description": "Optional list of the flag changes NOT to copy from the source environment to the target environment. You may include either <code>includedActions</code> or <code>excludedActions</code>, but not both. If neither are included, then all flag changes will be copied."
    },
    "includedActions": {
      "type": "array",
      "items": {
        "enum": [
          "updateOn",
          "updateFallthrough",
          "updateOffVariation",
          "updateRules",
          "updateTargets",
          "updatePrerequisites"
        ],
        "type": "string"
      },
      "example": [
        "updateOn"
      ],
      "description": "Optional list of the flag changes to copy from the source environment to the target environment. You may include either <code>includedActions</code> or <code>excludedActions</code>, but not both. If neither are included, then all flag changes will be copied."
    },
    "notifyMemberIds": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "1234a56b7c89d012345e678f"
      ],
      "description": "An array of member IDs. These members are notified to review the approval request."
    }
  }
}
object createFlagConfigApprovalRequestRequest
{
  "type": "object",
  "required": [
    "description",
    "instructions"
  ],
  "properties": {
    "comment": {
      "type": "string",
      "example": "optional comment",
      "description": "Optional comment describing the approval request"
    },
    "description": {
      "type": "string",
      "example": "Requesting to update targeting",
      "description": "A brief description of the changes you're requesting"
    },
    "instructions": {
      "$ref": "#/components/schemas/Instructions",
      "example": "[{\"kind\": \"addTargets\", \"values\": [ \"context-key-123abc\"], \"variationId\": \"ce67d625-a8b9-4fb5-a344-ab909d9d4f4d\" }]",
      "description": "List of instructions in semantic patch format to be applied to the feature flag. Review the [Update feature flag](https://apidocs.launchdarkly.com) documentation for details on available instructions."
    },
    "executionDate": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1653926400000",
      "description": "Timestamp for when instructions will be executed"
    },
    "operatingOnId": {
      "type": "string",
      "example": "6297ed79dee7dc14e1f9a80c",
      "description": "The ID of a scheduled change. Include this if your <code>instructions</code> include editing or deleting a scheduled change."
    },
    "notifyTeamKeys": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "example-reviewer-team"
      ],
      "description": "An array of team keys. The members of these teams are notified to review the approval request."
    },
    "notifyMemberIds": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "1234a56b7c89d012345e678f"
      ],
      "description": "An array of member IDs. These members are notified to review the approval request."
    },
    "integrationConfig": {
      "$ref": "#/components/schemas/FormVariableConfig",
      "description": "Additional approval request fields for third-party integration approval systems. If you are using a third-party integration to manage approval requests, these additional fields will be described in the <code>manifest.json</code> for that integration, at https://github.com/launchdarkly/integration-framework."
    }
  }
}
object customProperty
{
  "type": "object",
  "required": [
    "name",
    "value"
  ],
  "properties": {
    "name": {
      "type": "string",
      "example": "Jira issues",
      "description": "The name of the custom property of this type."
    },
    "value": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "is-123",
        "is-456"
      ],
      "description": "An array of values for the custom property data to associate with this flag."
    }
  }
}
object flagDefaultsRep
{
  "type": "object",
  "properties": {
    "key": {
      "type": "string",
      "description": "A unique key for the flag default"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "tag-1",
        "tag-2"
      ],
      "description": "A list of default tags for each flag"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "temporary": {
      "type": "boolean",
      "example": true,
      "description": "Whether the flag should be temporary by default"
    },
    "booleanDefaults": {
      "$ref": "#/components/schemas/BooleanDefaults",
      "description": "Defaults for boolean flags within this project"
    },
    "defaultClientSideAvailability": {
      "$ref": "#/components/schemas/ClientSideAvailability",
      "example": "{\"usingMobileKey\": true, \"usingEnvironmentId\": false}",
      "description": "Which client-side SDK types can use this flag by default. Set <code>usingMobileKey</code> to make the flag available for mobile SDKs. Set <code>usingEnvironmentId</code> to make the flag available for client-side SDKs."
    }
  }
}
object flagLinkPost
{
  "type": "object",
  "properties": {
    "key": {
      "type": "string",
      "example": "flag-link-key-123abc",
      "description": "The flag link key"
    },
    "title": {
      "type": "string",
      "example": "Example link title",
      "description": "The title of the flag link"
    },
    "deepLink": {
      "type": "string",
      "example": "https://example.com/archives/123123123",
      "description": "The URL for the external resource you are linking the flag to"
    },
    "metadata": {
      "type": "object",
      "description": "The metadata required by this integration in order to create a flag link, if this is a flag link for an existing integration. Defined in the integration's <code>manifest.json</code> file under <code>flagLink</code>.",
      "additionalProperties": {
        "type": "string"
      }
    },
    "timestamp": {
      "$ref": "#/components/schemas/UnixMillis",
      "description": "The time, in Unix milliseconds, to mark this flag link as associated with the external URL. If omitted, defaults to the creation time of this flag link."
    },
    "description": {
      "type": "string",
      "example": "Example link description",
      "description": "The description of the flag link"
    },
    "integrationKey": {
      "type": "string",
      "description": "The integration key for an integration whose <code>manifest.json</code> includes the <code>flagLink</code> capability, if this is a flag link for an existing integration. Do not include for URL flag links."
    }
  }
}
object flagSempatch
{
  "type": "object",
  "required": [
    "instructions"
  ],
  "properties": {
    "comment": {
      "type": "string"
    },
    "instructions": {
      "$ref": "#/components/schemas/Instructions",
      "description": "Semantic patch instructions. The same ones that are valid for flags are valid here."
    }
  }
}
object followersPerFlag
{
  "type": "object",
  "properties": {
    "flagKey": {
      "type": "string",
      "example": "example-flag-key",
      "description": "The flag key"
    },
    "followers": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/FollowFlagMember"
      },
      "description": "A list of members who are following this flag"
    }
  }
}
object instructionUserRequest
{
  "type": "object",
  "required": [
    "kind",
    "flagKey",
    "variationId"
  ],
  "properties": {
    "kind": {
      "enum": [
        "addExpireUserTargetDate",
        "updateExpireUserTargetDate",
        "removeExpireUserTargetDate"
      ],
      "type": "string",
      "example": "addExpireUserTargetDate",
      "description": "The type of change to make to the removal date for this user from individual targeting for this flag."
    },
    "value": {
      "type": "integer",
      "example": 1653469200000,
      "description": "The time, in Unix milliseconds, when LaunchDarkly should remove the user from individual targeting for this flag. Required if <code>kind</code> is <code>addExpireUserTargetDate</code> or <code>updateExpireUserTargetDate</code>."
    },
    "flagKey": {
      "type": "string",
      "example": "sample-flag-key",
      "description": "The flag key"
    },
    "version": {
      "type": "integer",
      "example": 1,
      "description": "The version of the expiring user target to update. Optional and only used if <code>kind</code> is <code>updateExpireUserTargetDate</code>. If included, update will fail if version doesn't match current version of the expiring user target."
    },
    "variationId": {
      "type": "string",
      "example": "ce12d345-a1b2-4fb5-a123-ab123d4d5f5d",
      "description": "ID of a variation on the flag"
    }
  }
}
object ipList
{
  "type": "object",
  "required": [
    "addresses",
    "outboundAddresses"
  ],
  "properties": {
    "addresses": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "104.156.80.0/20",
        "151.101.0.0/16"
      ],
      "description": "A list of the IP addresses LaunchDarkly's service uses"
    },
    "outboundAddresses": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "52.21.152.96/32"
      ],
      "description": "A list of the IP addresses outgoing webhook notifications use"
    }
  }
}
object membersPatchInput
{
  "type": "object",
  "required": [
    "instructions"
  ],
  "properties": {
    "comment": {
      "type": "string",
      "example": "Optional comment about the update",
      "description": "Optional comment describing the update"
    },
    "instructions": {
      "$ref": "#/components/schemas/Instructions",
      "example": "[ { \"kind\": \"replaceMemberRoles\", \"value\": \"reader\" } ]",
      "description": "The instructions to perform when updating. This should be an array with objects that look like <code>{\"kind\": \"update_action\"}</code>. Some instructions also require additional parameters as part of this object."
    }
  }
}
object oauthClientPost
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of your new LaunchDarkly OAuth 2.0 client."
    },
    "description": {
      "type": "string",
      "description": "Description of your OAuth 2.0 client."
    },
    "redirectUri": {
      "type": "string",
      "description": "The redirect URI for your new OAuth 2.0 application. This should be an absolute URL conforming with the standard HTTPS protocol."
    }
  }
}
object patchFlagsRequest
{
  "type": "object",
  "required": [
    "instructions"
  ],
  "properties": {
    "comment": {
      "type": "string",
      "example": "optional comment",
      "description": "Optional comment describing the change"
    },
    "instructions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Instruction"
      },
      "example": [
        {
          "kind": "addExpireUserTargetDate",
          "value": 1686412800000,
          "userKey": "sandy",
          "variationId": "ce12d345-a1b2-4fb5-a123-ab123d4d5f5d"
        }
      ],
      "description": "The instructions to perform when updating"
    }
  }
}
object patchSegmentExpiringTargetInputRep
{
  "type": "object",
  "required": [
    "instructions"
  ],
  "properties": {
    "comment": {
      "type": "string",
      "example": "optional comment",
      "description": "Optional description of changes"
    },
    "instructions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/patchSegmentExpiringTargetInstruction"
      },
      "example": [
        {
          "kind": "updateExpiringTarget",
          "value": 1587582000000,
          "version": 0,
          "contextKey": "user@email.com",
          "targetType": "included",
          "contextKind": "user"
        }
      ],
      "description": "Semantic patch instructions for the desired changes to the resource"
    }
  }
}
object patchSegmentExpiringTargetInstruction
{
  "type": "object",
  "required": [
    "kind",
    "contextKey",
    "contextKind",
    "targetType"
  ],
  "properties": {
    "kind": {
      "enum": [
        "addExpiringTarget",
        "updateExpiringTarget",
        "removeExpiringTarget"
      ],
      "type": "string",
      "example": "addExpiringTarget",
      "description": "The type of change to make to the context's removal date from this segment"
    },
    "value": {
      "type": "integer",
      "example": 1653469200000,
      "description": "The time, in Unix milliseconds, when the context should be removed from this segment. Required if <code>kind</code> is <code>addExpiringTarget</code> or <code>updateExpiringTarget</code>."
    },
    "version": {
      "type": "integer",
      "example": 1,
      "description": "The version of the expiring target to update. Optional and only used if <code>kind</code> is <code>updateExpiringTarget</code>. If included, update will fail if version doesn't match current version of the expiring target."
    },
    "contextKey": {
      "type": "string",
      "description": "A unique key used to represent the context"
    },
    "targetType": {
      "enum": [
        "included",
        "excluded"
      ],
      "type": "string",
      "description": "The segment's target type"
    },
    "contextKind": {
      "type": "string",
      "example": "user",
      "description": "The kind of context"
    }
  }
}
object patchSegmentInstruction
{
  "type": "object",
  "required": [
    "kind",
    "userKey",
    "targetType"
  ],
  "properties": {
    "kind": {
      "enum": [
        "addExpireUserTargetDate",
        "updateExpireUserTargetDate",
        "removeExpireUserTargetDate"
      ],
      "type": "string",
      "example": "addExpireUserTargetDate",
      "description": "The type of change to make to the user's removal date from this segment"
    },
    "value": {
      "type": "integer",
      "example": 1653469200000,
      "description": "The time, in Unix milliseconds, when the user should be removed from this segment. Required if <code>kind</code> is <code>addExpireUserTargetDate</code> or <code>updateExpireUserTargetDate</code>."
    },
    "userKey": {
      "type": "string",
      "description": "A unique key used to represent the user"
    },
    "version": {
      "type": "integer",
      "example": 1,
      "description": "The version of the segment to update. Required if <code>kind</code> is <code>updateExpireUserTargetDate</code>."
    },
    "targetType": {
      "enum": [
        "included",
        "excluded"
      ],
      "type": "string",
      "description": "The segment's target type"
    }
  }
}
object patchSegmentRequest
{
  "type": "object",
  "required": [
    "instructions"
  ],
  "properties": {
    "comment": {
      "type": "string",
      "example": "optional comment",
      "description": "Optional description of changes"
    },
    "instructions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/patchSegmentInstruction"
      },
      "example": [
        {
          "kind": "updateExpiringTarget",
          "value": 1587582000000,
          "version": 0,
          "contextKey": "contextKey",
          "targetType": "included",
          "contextKind": "user"
        }
      ],
      "description": "Semantic patch instructions for the desired changes to the resource"
    }
  }
}
object patchUsersRequest
{
  "type": "object",
  "required": [
    "instructions"
  ],
  "properties": {
    "comment": {
      "type": "string",
      "example": "optional comment",
      "description": "Optional comment describing the change"
    },
    "instructions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/instructionUserRequest"
      },
      "description": "The instructions to perform when updating"
    }
  }
}
object permissionGrantInput
{
  "type": "object",
  "properties": {
    "actions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "updateTeamMembers"
      ],
      "description": "A list of actions to allow. Specify either <code>actionSet</code> or <code>actions</code>. To learn more, read [Role actions](https://docs.launchdarkly.com/home/members/role-actions)."
    },
    "actionSet": {
      "enum": [
        "maintainTeam"
      ],
      "type": "string",
      "example": "maintainTeam",
      "description": "A group of related actions to allow. Specify either <code>actionSet</code> or <code>actions</code>. Use <code>maintainTeam</code> to add team maintainers."
    },
    "memberIDs": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "12ab3c45de678910fgh12345"
      ],
      "description": "A list of member IDs who receive the permission grant."
    }
  }
}
object postApprovalRequestApplyRequest
{
  "type": "object",
  "properties": {
    "comment": {
      "type": "string",
      "example": "Looks good, thanks for updating",
      "description": "Optional comment about the approval request"
    }
  }
}
object postApprovalRequestReviewRequest
{
  "type": "object",
  "properties": {
    "kind": {
      "enum": [
        "approve",
        "comment",
        "decline"
      ],
      "type": "string",
      "example": "approve",
      "description": "The type of review for this approval request"
    },
    "comment": {
      "type": "string",
      "example": "Looks good, thanks for updating",
      "description": "Optional comment about the approval request"
    }
  }
}
object putBranch
{
  "type": "object",
  "required": [
    "name",
    "head",
    "syncTime"
  ],
  "properties": {
    "head": {
      "type": "string",
      "example": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3",
      "description": "An ID representing the branch HEAD. For example, a commit SHA."
    },
    "name": {
      "type": "string",
      "example": "main",
      "description": "The branch name"
    },
    "syncTime": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1636558831870",
      "description": "A timestamp indicating when the branch was last synced"
    },
    "commitTime": {
      "$ref": "#/components/schemas/UnixMillis",
      "example": "1636558831870",
      "description": "A timestamp of the current commit"
    },
    "references": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ReferenceRep"
      },
      "description": "An array of flag references found on the branch"
    },
    "updateSequenceId": {
      "type": "integer",
      "format": "int64",
      "example": 25,
      "description": "An optional ID used to prevent older data from overwriting newer data. If no sequence ID is included, the newly submitted data will always be saved."
    }
  }
}
object repositoryPost
{
  "type": "object",
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "example": "LaunchDarkly-Docs",
      "description": "The repository name"
    },
    "type": {
      "enum": [
        "bitbucket",
        "custom",
        "github",
        "gitlab"
      ],
      "type": "string",
      "example": "github",
      "description": "The type of repository. If not specified, the default value is <code>custom</code>."
    },
    "sourceLink": {
      "type": "string",
      "example": "https://github.com/launchdarkly/LaunchDarkly-Docs",
      "description": "A URL to access the repository"
    },
    "defaultBranch": {
      "type": "string",
      "example": "main",
      "description": "The repository's default branch. If not specified, the default value is <code>main</code>."
    },
    "hunkUrlTemplate": {
      "type": "string",
      "example": "https://github.com/launchdarkly/LaunchDarkly-Docs/blob/${sha}/${filePath}#L${lineNumber}",
      "description": "A template for constructing a valid URL to view the hunk"
    },
    "commitUrlTemplate": {
      "type": "string",
      "example": "https://github.com/launchdarkly/LaunchDarkly-Docs/commit/${sha}",
      "description": "A template for constructing a valid URL to view the commit"
    }
  }
}
object sourceFlag
{
  "type": "object",
  "required": [
    "key"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "environment-key-123abc",
      "description": "The environment key for the source environment"
    },
    "version": {
      "type": "integer",
      "example": 1,
      "description": "The version of the source flag from which to copy"
    }
  }
}
object subscriptionPost
{
  "type": "object",
  "required": [
    "name",
    "config"
  ],
  "properties": {
    "on": {
      "type": "boolean",
      "example": false,
      "description": "Whether or not you want your subscription to actively send events."
    },
    "url": {
      "type": "string",
      "description": "Slack webhook receiver URL. Only necessary for legacy Slack webhook integrations."
    },
    "name": {
      "type": "string",
      "example": "Example audit log subscription.",
      "description": "A human-friendly name for your audit log subscription."
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "testing-tag"
      ],
      "description": "An array of tags for this subscription."
    },
    "apiKey": {
      "type": "string",
      "description": "Datadog API key. Only necessary for legacy Datadog webhook integrations."
    },
    "config": {
      "type": "object",
      "example": {
        "url": "https://example.com",
        "optional": "an optional property",
        "required": "the required property"
      },
      "description": "The unique set of fields required to configure an audit log subscription integration of this type. Refer to the <code>formVariables</code> field in the corresponding <code>manifest.json</code> at https://github.com/launchdarkly/integration-framework/tree/main/integrations for a full list of fields for the integration you wish to configure.",
      "additionalProperties": {}
    },
    "statements": {
      "$ref": "#/components/schemas/StatementPostList",
      "description": "The set of resources you wish to subscribe to audit log notifications for."
    }
  }
}
object teamPatchInput
{
  "type": "object",
  "required": [
    "instructions"
  ],
  "properties": {
    "comment": {
      "type": "string",
      "example": "Optional comment about the update",
      "description": "Optional comment describing the update"
    },
    "instructions": {
      "$ref": "#/components/schemas/Instructions",
      "example": "[ { \"kind\": \"updateDescription\", \"value\": \"New description for the team\" } ]",
      "description": "The instructions to perform when updating. This should be an array with objects that look like <code>{\"kind\": \"update_action\"}</code>. Some instructions also require additional parameters as part of this object."
    }
  }
}
object teamPostInput
{
  "type": "object",
  "required": [
    "key",
    "name"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "team-key-123abc",
      "description": "The team key"
    },
    "name": {
      "type": "string",
      "example": "Example team",
      "description": "A human-friendly name for the team"
    },
    "memberIDs": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "12ab3c45de678910fgh12345"
      ],
      "description": "A list of member IDs who belong to the team"
    },
    "description": {
      "type": "string",
      "example": "An example team",
      "description": "A description of the team"
    },
    "customRoleKeys": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "example-role1",
        "example-role2"
      ],
      "description": "List of custom role keys the team will access"
    },
    "permissionGrants": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/permissionGrantInput"
      },
      "description": "A list of permission grants. Permission grants allow access to a specific action, without having to create or update a custom role."
    }
  }
}
object teamsPatchInput
{
  "type": "object",
  "required": [
    "instructions"
  ],
  "properties": {
    "comment": {
      "type": "string",
      "example": "Optional comment about the update",
      "description": "Optional comment describing the update"
    },
    "instructions": {
      "$ref": "#/components/schemas/Instructions",
      "example": "[ { \"kind\": \"updateDescription\", \"value\": \"New description for the team\" } ]",
      "description": "The instructions to perform when updating. This should be an array with objects that look like <code>{\"kind\": \"update_action\"}</code>. Some instructions also require additional parameters as part of this object."
    }
  }
}
object triggerPost
{
  "type": "object",
  "required": [
    "integrationKey"
  ],
  "properties": {
    "comment": {
      "type": "string",
      "example": "example comment",
      "description": "Optional comment describing the trigger"
    },
    "instructions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Instruction"
      },
      "example": [
        {
          "kind": "turnFlagOn"
        }
      ],
      "description": "The action to perform when triggering. This should be an array with a single object that looks like <code>{\"kind\": \"flag_action\"}</code>. Supported flag actions are <code>turnFlagOn</code> and <code>turnFlagOff</code>."
    },
    "integrationKey": {
      "type": "string",
      "example": "generic-trigger",
      "description": "The unique identifier of the integration for your trigger. Use <code>generic-trigger</code> for integrations not explicitly supported."
    }
  }
}
object upsertPayloadRep
{
  "type": "object",
  "required": [
    "tags",
    "temporary",
    "booleanDefaults",
    "defaultClientSideAvailability"
  ],
  "properties": {
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "tag-1",
        "tag-2"
      ],
      "description": "A list of default tags for each flag"
    },
    "_links": {
      "type": "object",
      "description": "The location and content type of related resources",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "temporary": {
      "type": "boolean",
      "example": true,
      "description": "Whether the flag should be temporary by default"
    },
    "booleanDefaults": {
      "$ref": "#/components/schemas/BooleanFlagDefaults"
    },
    "defaultClientSideAvailability": {
      "$ref": "#/components/schemas/DefaultClientSideAvailability",
      "description": "Which client-side SDK types can use this flag by default."
    }
  }
}
object webhookPost
{
  "type": "object",
  "required": [
    "url",
    "sign",
    "on"
  ],
  "properties": {
    "on": {
      "type": "boolean",
      "example": true,
      "description": "Whether or not this webhook is enabled."
    },
    "url": {
      "type": "string",
      "example": "http://www.example.com",
      "description": "The URL of the remote webhook"
    },
    "name": {
      "type": "string",
      "example": "Example hook",
      "description": "A human-readable name for your webhook"
    },
    "sign": {
      "type": "boolean",
      "example": true,
      "description": "If sign is false, the webhook does not include a signature header, and the secret can be omitted."
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [],
      "description": "List of tags for this webhook"
    },
    "secret": {
      "type": "string",
      "example": "frobozz",
      "description": "If sign is true, and the secret attribute is omitted, LaunchDarkly automatically generates a secret for you."
    },
    "statements": {
      "$ref": "#/components/schemas/StatementPostList",
      "description": "Represents a Custom role policy, defining a resource kinds filter the webhook should respond to."
    }
  }
}