swagger: "2.0"
schemes:
  - https
host: app.launchdarkly.com
basePath: /api/v2
info:
  contact:
    email: support@launchdarkly.com
    name: LaunchDarkly Support
    url: https://support.launchdarkly.com
    x-twitter: launchdarkly
  description: Build custom integrations with the LaunchDarkly REST API
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  termsOfService: https://launchdarkly.com/terms
  title: LaunchDarkly REST API
  version: 5.3.0
  x-apisguru-categories:
    - developer_tools
  x-logo:
    url: https://twitter.com/launchdarkly/profile_image?size=original
  x-origin:
    - format: swagger
      url: https://launchdarkly.github.io/ld-openapi/openapi.json
      version: "2.0"
  x-providerName: launchdarkly.com
consumes:
  - application/json
produces:
  - application/json
securityDefinitions:
  Token:
    description: https://app.launchdarkly.com/settings#/tokens
    in: header
    name: Authorization
    type: apiKey
security:
  - Token: []
parameters:
  After:
    description: A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned will have occurred after this timestamp.
    format: int64
    in: query
    name: after
    required: false
    type: integer
  ApprovalRequestApplyPostRequest:
    description: Apply an approval request
    in: body
    name: approvalRequestApplyConfigBody
    required: true
    schema:
      properties:
        comment:
          description: comment will be included in audit log item for change.
          example: Applying approved changes
          type: string
      type: object
  ApprovalRequestId:
    description: The approval request ID
    in: path
    name: approvalRequestId
    required: true
    type: string
  ApprovalRequestPostRequest:
    description: Create a new approval request
    in: body
    name: approvalRequestConfigBody
    schema:
      properties:
        comment:
          description: comment will be included in audit log item for change.
          type: string
        description:
          description: A name that describes the changes you would like to apply to a feature flag configuration
          type: string
        executionDate:
          description: Timestamp for when instructions will be executed
          format: int64
          type: integer
        instructions:
          $ref: "#/definitions/SemanticPatchInstruction"
        notifyMemberIds:
          example:
            - memberId
            - memberId2
          items:
            type: string
          type: array
        operatingOnId:
          description: ID of scheduled change to edit or delete
          type: string
      required:
        - description
        - instructions
        - notifyMemberIds
      type: object
  ApprovalRequestReviewPostRequest:
    description: Review an approval request
    in: body
    name: approvalRequestReviewConfigBody
    required: true
    schema:
      properties:
        comment:
          description: comment will be included in audit log item for change.
          example: This is a comment string
          type: string
        kind:
          description: One of approve, decline, or comment.
          enum:
            - approve
            - decline
            - comment
          example: approve
          type: string
      required:
        - kind
      type: object
  ArchivedQuery:
    description: When set to 1, only archived flags will be included in the list of flags returned.  By default, archived flags are not included in the list of flags.
    in: query
    name: archived
    required: false
    type: boolean
  AuditLimit:
    description: A limit on the number of audit log entries to be returned, between 1 and 20.
    in: query
    name: limit
    required: false
    type: number
  Before:
    description: A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned will have before this timestamp.
    format: int64
    in: query
    name: before
    required: false
    type: integer
  BigSegmentTargetsPostRequest:
    description: Add or remove user targets to the included or excluded lists on a big segment. Contact your account manager for early access to this feature.
    in: body
    name: bigSegmentTargetsBody
    required: true
    schema:
      properties:
        excluded:
          $ref: "#/definitions/BigSegmentTargetChanges"
        included:
          $ref: "#/definitions/BigSegmentTargetChanges"
      type: object
  CloneFlagKeyQuery:
    description: The key of the feature flag to be cloned. The key identifies the flag in your code.  For example, setting clone=flagKey will copy the full targeting configuration for all environments (including on/off state) from the original flag to the new flag.
    in: query
    name: clone
    required: false
    type: string
  CustomRoleKey:
    description: The custom role key.
    in: path
    name: customRoleKey
    required: true
    type: string
  CustomRolePostRequest:
    description: New role or roles to create.
    in: body
    name: customRoleBody
    required: true
    schema:
      properties:
        description:
          description: Description of the custom role.
          example: Description of revenue team role here
          type: string
        key:
          description: The 20-hexdigit id or the key for a custom role.
          example: revenue-team
          type: string
        name:
          description: Name of the custom role.
          example: revenue team
          type: string
        policy:
          items:
            $ref: "#/definitions/Policy"
          type: array
      required:
        - name
        - key
        - policy
      type: object
  DestinationId:
    description: The data export destination ID.
    in: path
    name: destinationId
    required: true
    type: string
  DestinationPostRequest:
    description: Create a new data export destination.
    in: body
    name: destinationBody
    required: true
    schema:
      properties:
        config:
          description: destination-specific configuration.
          example:
            project: cool-project
            topic: test
          type: object
        kind:
          description: The data export destination type. Available choices are kinesis, google-pubsub, mparticle, or segment.
          enum:
            - google-pubsub
            - kinesis
            - mparticle
            - segment
          example: google-pubsub
          type: string
        name:
          description: A human-readable name for your data export destination.
          example: Example Google Pub/Sub Destination
          type: string
        on:
          description: Whether the data export destination is on or not.
          example: true
          type: boolean
      required:
        - name
        - kind
        - config
      type: object
  EnvironmentKey:
    description: The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
    in: path
    name: environmentKey
    required: true
    type: string
  EnvironmentKeyQuery:
    collectionFormat: multi
    description: By default, each feature will include configurations for each environment. You can filter environments with the env query parameter. For example, setting env=["production"] will restrict the returned configurations to just your production environment.
    in: query
    items:
      type: string
    name: env
    required: false
    type: array
  EnvironmentMobileKeyExpiry:
    description: The expiry parameter is deprecated for this endpoint, so the old mobile key will always expire immediately. This parameter will be removed in an upcoming major API client version.
    format: int64
    in: query
    name: expiry
    required: false
    type: integer
  EnvironmentPostRequest:
    description: New environment.
    in: body
    name: environmentBody
    required: true
    schema:
      $ref: "#/definitions/EnvironmentPost"
  EnvironmentSDKKeyExpiry:
    description: An expiration time for the old environment SDK key, expressed as a Unix epoch time in milliseconds. By default, the key will expire immediately.
    format: int64
    in: query
    name: expiry
    required: false
    type: integer
  EvaluationEnvId:
    description: The environment id for the flag evaluations in question.
    in: path
    name: envId
    required: true
    type: string
  EvaluationFlagKey:
    description: The key of the flag we want metrics for.
    in: path
    name: flagKey
    required: true
    type: string
  EventType:
    description: The type of event we would like to track.
    in: path
    name: type
    required: true
    type: string
  FeatureFlagCopyBody:
    description: Copy feature flag configurations between environments.
    in: body
    name: featureFlagCopyBody
    required: true
    schema:
      properties:
        comment:
          description: comment will be included in audit log item for change.
          example: This is a comment string
          type: string
        excludedActions:
          description: Define the parts of the flag configuration that will not be copied.
          items:
            $ref: "#/definitions/CopyActions"
          type: array
        includedActions:
          description: Define the parts of the flag configuration that will be copied.
          items:
            $ref: "#/definitions/CopyActions"
          type: array
        source:
          $ref: "#/definitions/FeatureFlagCopyObject"
        target:
          $ref: "#/definitions/FeatureFlagCopyObject"
      type: object
  FeatureFlagKey:
    description: The feature flag's key. The key identifies the flag in your code.
    in: path
    name: featureFlagKey
    required: true
    type: string
  FeatureFlagPostRequest:
    description: Create a new feature flag.
    in: body
    name: featureFlagBody
    required: true
    schema:
      properties:
        clientSideAvailability:
          $ref: "#/definitions/ClientSideAvailability"
        defaults:
          $ref: "#/definitions/Defaults"
        description:
          description: A description of the feature flag.
          example: This flag controls whether test feature is turned on or not.
          type: string
        includeInSnippet:
          description: Whether or not this flag should be made available to the client-side JavaScript SDK.
          type: boolean
        key:
          description: A unique key that will be used to reference the flag in your code.
          example: new-test-flag
          type: string
        name:
          description: A human-friendly name for the feature flag. Remember to note if this flag is intended to be temporary or permanent.
          example: new test flag
          type: string
        tags:
          description: Tags for the feature flag.
          items:
            example: []
            type: string
          type: array
        temporary:
          description: Whether or not the flag is a temporary flag.
          type: boolean
        variations:
          description: An array of possible variations for the flag.
          items:
            $ref: "#/definitions/Variation"
          type: array
      required:
        - name
        - key
        - variations
      type: object
  FilterQuery:
    description: A comma-separated list of filters. Each filter is of the form field:value.
    in: query
    name: filter
    required: false
    type: string
  FlagConfigScheduledChangesConflictsBody:
    description: Used to determine if a semantic patch will result in conflicts with scheduled changes on a feature flag.
    in: body
    name: flagConfigScheduledChangesConflictsBody
    required: true
    schema:
      properties:
        executionDate:
          description: A unix epoch time in milliseconds specifying the date the scheduled changes will be applied
          type: integer
        instructions:
          $ref: "#/definitions/SemanticPatchInstruction"
      type: object
  FlagConfigScheduledChangesPatchBody:
    description: Update scheduled changes on a feature flag.
    in: body
    name: flagConfigScheduledChangesPatchBody
    required: true
    schema:
      properties:
        comment:
          description: Used to describe the scheduled changes.
          type: string
        instructions:
          $ref: "#/definitions/SemanticPatchInstruction"
      type: object
  FlagConfigScheduledChangesPostBody:
    description: Create scheduled changes on a feature flag.
    in: body
    name: flagConfigScheduledChangesPostBody
    required: true
    schema:
      properties:
        comment:
          description: Used to describe the scheduled changes.
          type: string
        executionDate:
          description: A unix epoch time in milliseconds specifying the date the scheduled changes will be applied
          type: integer
        instructions:
          $ref: "#/definitions/SemanticPatchInstruction"
      type: object
  HMAC:
    description: This parameter is required when following "next" links.
    in: query
    name: h
    required: false
    type: string
  IntegrationId:
    description: The integration ID.
    in: path
    name: integrationId
    required: true
    type: string
  IntegrationKey:
    description: The key used to specify the integration kind.
    in: path
    name: integrationKey
    required: true
    type: string
  IntegrationPostRequest:
    description: Create a new integration subscription.
    in: body
    name: subscriptionBody
    required: true
    schema:
      properties:
        config:
          description: Integration-specific configuration fields.
          example:
            apiKey: 582**************************116
            hostURL: https://api.datadoghq.com
          type: object
        name:
          description: A human-readable name for your subscription configuration.
          example: Example Datadog Integration
          type: string
        on:
          description: Whether the integration subscription is active or not.
          example: true
          type: boolean
        statements:
          items:
            $ref: "#/definitions/Statement"
          type: array
        tags:
          description: Tags for the integration subscription.
          example: []
          items:
            type: string
          type: array
      required:
        - name
        - config
      type: object
  Limit:
    description: Pagination limit.
    in: query
    name: limit
    required: false
    type: integer
  LimitQuery:
    description: The number of objects to return. Defaults to -1, which returns everything.
    in: query
    name: limit
    required: false
    type: number
  MemberId:
    description: The member ID.
    in: path
    name: memberId
    required: true
    type: string
  MembersPostRequest:
    description: New members to invite.
    in: body
    name: membersBody
    required: true
    schema:
      items:
        properties:
          customRoles:
            items:
              description: The 20-hexdigit id or the key for a custom role.
              example: revenue-team
              type: string
            type: array
          email:
            example: exampleuser@email.com
            type: string
          firstName:
            example: Bob
            type: string
          inlineRole:
            items:
              $ref: "#/definitions/Statement"
            type: array
          lastName:
            example: Loblaw
            type: string
          role:
            $ref: "#/definitions/Role"
        required:
          - email
        type: object
      type: array
  Offset:
    description: Specifies the first item to return in the collection.
    in: query
    name: offset
    required: false
    type: integer
  OffsetQuery:
    description: Where to start in the list. This is for use with pagination. For example, an offset of 10 would skip the first 10 items and then return the next limit items.
    in: query
    name: offset
    required: false
    type: number
  PatchOnly:
    description: Requires a JSON Patch representation of the desired changes to the project. 'http://jsonpatch.com/' Feature flag patches also support JSON Merge Patch format. 'https://tools.ietf.org/html/rfc7386' The addition of comments is also supported.
    in: body
    name: PatchOnly
    required: true
    schema:
      items:
        $ref: "#/definitions/PatchOperation"
      type: array
  PatchRequest:
    description: Requires a JSON Patch representation of the desired changes to the project. 'http://jsonpatch.com/'
    in: body
    name: patchDelta
    required: true
    schema:
      items:
        $ref: "#/definitions/PatchOperation"
      type: array
  PatchWithComment:
    description: Requires a JSON Patch representation of the desired changes to the project, and an optional comment. 'http://jsonpatch.com/' Feature flag patches also support JSON Merge Patch format. 'https://tools.ietf.org/html/rfc7386' The addition of comments is also supported.
    in: body
    name: patchComment
    required: true
    schema:
      properties:
        comment:
          example: This is a comment string
          type: string
        patch:
          items:
            $ref: "#/definitions/PatchOperation"
          type: array
      type: object
  ProjectKey:
    description: The project key, used to tie the flags together under one project so they can be managed together.
    in: path
    name: projectKey
    required: true
    type: string
  ProjectPostRequest:
    description: Project keys must be unique within an account.
    in: body
    name: projectBody
    required: true
    schema:
      properties:
        defaultClientSideAvailability:
          $ref: "#/definitions/ClientSideAvailability"
        environments:
          items:
            $ref: "#/definitions/EnvironmentPost"
          minLength: 1
          type: array
        includeInSnippetByDefault:
          example: false
          type: boolean
        key:
          example: new-project
          type: string
        name:
          example: New Project
          type: string
        tags:
          example:
            - ops
            - dev
          items:
            type: string
          type: array
      required:
        - name
        - key
      type: object
  Q:
    description: Text to search for. You can search for the full or partial name of the resource involved or full or partial email address of the member who made the change.
    in: query
    name: q
    required: false
    type: string
  Query:
    description: Search query.
    in: query
    name: q
    required: false
    type: string
  RelayProxyConfigId:
    description: The relay proxy configuration ID
    in: path
    name: id
    required: true
    type: string
  RelayProxyConfigPostRequest:
    description: Create a new relay proxy configuration
    in: body
    name: relayProxyConfigBody
    required: true
    schema:
      properties:
        name:
          description: A human-friendly name for the relay proxy configuration
          example: My relay proxy config
          type: string
        policy:
          items:
            $ref: "#/definitions/Policy"
          type: array
      type: object
  RelayProxyConfigsExpiry:
    description: 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
    format: int64
    in: query
    name: expiry
    required: false
    type: integer
  ResourceId:
    description: The resource ID.
    in: path
    name: resourceId
    required: true
    type: string
  ScheduledChangeId:
    description: The id of the scheduled change
    in: path
    name: scheduledChangeId
    required: true
    type: string
  ScrollId:
    description: This parameter is required when following "next" links.
    in: query
    name: scrollId
    required: false
    type: string
  SemanticPatchWithComment:
    description: Requires a Semantic Patch representation of the desired changes to the resource. 'https://apidocs.launchdarkly.com/reference#updates-via-semantic-patches'. The addition of comments is also supported.
    in: body
    name: SemanticPatchWithComment
    required: true
    schema:
      items:
        $ref: "#/definitions/SemanticPatchOperation"
      type: object
  SortQuery:
    description: A comma-separated list of fields to sort by. A field prefixed by a - will be sorted in descending order.
    in: query
    name: sort
    required: false
    type: string
  Spec:
    description: A resource specifier, allowing you to filter audit log listings by resource.
    in: query
    name: spec
    required: false
    type: string
  StreamSource:
    description: The source of where the stream comes from.
    in: path
    name: source
    required: true
    type: string
  SummaryQuery:
    description: By default in api version >= 1, flags will _not_ include their list of prerequisites, targets or rules.  Set summary=0 to include these fields for each flag returned.
    in: query
    name: summary
    required: false
    type: boolean
  Tag:
    description: Filter by tag. A tag can be used to group flags across projects.
    in: query
    name: tag
    required: false
    type: string
  TokenExpiry:
    description: An expiration time for the old token key, expressed as a Unix epoch time in milliseconds. By default, the token will expire immediately.
    format: int64
    in: query
    name: expiry
    required: false
    type: integer
  TokenId:
    description: The access token ID.
    in: path
    name: tokenId
    required: true
    type: string
  TokenShowAllQuery:
    description: If set to true, and the authentication access token has the "Admin" role, personal access tokens for all members will be retrieved.
    in: query
    name: showAll
    required: false
    type: boolean
  TokensPostRequest:
    description: Create a new access token.
    in: body
    name: tokenBody
    required: true
    schema:
      properties:
        customRoleIds:
          description: A list of custom role IDs to use as access limits for the access token
          items:
            example: []
            type: string
          type: array
        defaultApiVersion:
          description: The default API version for this token
          type: integer
        inlineRole:
          items:
            $ref: "#/definitions/Statement"
          type: array
        name:
          description: A human-friendly name for the access token
          example: My access token
          type: string
        role:
          description: The name of a built-in role for the token
          example: writer
          type: string
        serviceToken:
          description: Whether the token will be a service token https://docs.launchdarkly.com/home/account-security/api-access-tokens#service-tokens
          type: boolean
      type: object
  UserKey:
    description: The user's key.
    in: path
    name: userKey
    required: true
    type: string
  UserSegmentKey:
    description: The user segment's key. The key identifies the user segment in your code.
    in: path
    name: userSegmentKey
    required: true
    type: string
  UserSegmentPostRequest:
    description: Create a new user segment.
    in: body
    name: userSegmentBody
    required: true
    schema:
      properties:
        description:
          description: A description for the user segment.
          example: Users in this segment will have access to beta features.
          type: string
        key:
          description: A unique key that will be used to reference the user segment in feature flags.
          example: new-segment
          type: string
        name:
          description: A human-friendly name for the user segment.
          example: new segment
          type: string
        tags:
          description: Tags for the user segment.
          items:
            example: []
            type: string
          type: array
        unbounded:
          description: Controls whether this is considered a "big segment" which can support an unlimited numbers of users. Include/exclude lists sent with this payload are not used in big segments. Contact your account manager for early access to this feature.
          example: false
          type: boolean
      required:
        - name
        - key
      type: object
  UserSettingsPutRequest:
    in: body
    name: userSettingsBody
    required: true
    schema:
      properties:
        setting:
          description: |
            The variation value to set for the user. Must match the variation type of the flag.
          type: boolean
      type: object
  WebhookPostRequest:
    description: New webhook.
    in: body
    name: webhookBody
    required: true
    schema:
      properties:
        name:
          description: The name of the webhook.
          example: Example hook
          type: string
        on:
          description: Whether this webhook is enabled or not.
          example: true
          type: boolean
        secret:
          description: If sign is true, and the secret attribute is omitted, LaunchDarkly will automatically generate a secret for you.
          example: <password>
          type: string
        sign:
          description: If sign is false, the webhook will not include a signature header, and the secret can be omitted.
          type: boolean
        statements:
          items:
            $ref: "#/definitions/Statement"
          type: array
        tags:
          description: Tags for the webhook.
          example: []
          items:
            type: string
          type: array
        url:
          description: The URL of the remote webhook.
          example: https://example.com/example
          type: string
      required:
        - url
        - sign
        - on
      type: object
responses:
  BetaApi403:
    description: This is a beta API, you must pass beta in the LD-API-Version header to use it.
    schema:
      $ref: "#/definitions/UsageError"
  CustomRole2xx:
    description: Custom role response.
    schema:
      $ref: "#/definitions/CustomRole"
  Destination2xx:
    description: Destination response.
    schema:
      $ref: "#/definitions/Destination"
  Environment2xx:
    description: Environment response.
    schema:
      $ref: "#/definitions/Environment"
  EvaluationUsage404:
    description: The environment or flag you requested could not be found
    schema:
      $ref: "#/definitions/EvaluationUsageError"
  Member2xx:
    description: Member response.
    schema:
      $ref: "#/definitions/Member"
  Project2xx:
    description: Successful Project response.
    schema:
      $ref: "#/definitions/Project"
  RelayProxyConfig2xx:
    description: Relay proxy config response.
    schema:
      $ref: "#/definitions/RelayProxyConfig"
  Root200:
    description: A list of links to available resources in the API.
    schema:
      $ref: "#/definitions/Links"
  Standard201:
    description: Resource created.
  Standard204:
    description: Action completed successfully.
  Standard400:
    description: Invalid request body.
  Standard401:
    description: Invalid access token.
  Standard403:
    description: Access to the requested resource was denied.
  Standard404:
    description: Invalid resource specifier.
  Standard409:
    description: Status conflict.
  StreamUsage404:
    description: The stream source you requested could not be found
    schema:
      $ref: "#/definitions/StreamUsageError"
  Token2xx:
    description: Token response.
    schema:
      $ref: "#/definitions/Token"
  UserSegment2xx:
    description: User segment response.
    schema:
      $ref: "#/definitions/UserSegment"
  Webhook2xx:
    description: Webhook response.
    schema:
      $ref: "#/definitions/Webhook"
paths:
  /:
    get:
      description: You can issue a GET request to the root resource to find all of the resource categories supported by the API.
      operationId: getRoot
      responses:
        "200":
          $ref: "#/responses/Root200"
        "401":
          $ref: "#/responses/Standard401"
      tags:
        - Root
  /account/relay-auto-configs:
    get:
      operationId: getRelayProxyConfigs
      responses:
        "200":
          description: Relay proxy configs response.
          schema:
            $ref: "#/definitions/RelayProxyConfigs"
      summary: Returns a list of relay proxy configurations in the account.
      tags:
        - Relay proxy configurations
    post:
      operationId: postRelayAutoConfig
      parameters:
        - $ref: "#/parameters/RelayProxyConfigPostRequest"
      responses:
        "201":
          description: Relay proxy config response.
          schema:
            $ref: "#/definitions/RelayProxyConfig"
        "400":
          $ref: "#/responses/Standard400"
        "403":
          $ref: "#/responses/Standard403"
      summary: Create a new relay proxy config.
      tags:
        - Relay proxy configurations
  "/account/relay-auto-configs/{id}":
    delete:
      operationId: deleteRelayProxyConfig
      parameters:
        - $ref: "#/parameters/RelayProxyConfigId"
      responses:
        "204":
          $ref: "#/responses/Standard204"
        "400":
          $ref: "#/responses/Standard400"
        "404":
          $ref: "#/responses/Standard404"
      summary: Delete a relay proxy configuration by ID.
      tags:
        - Relay proxy configurations
    get:
      operationId: getRelayProxyConfig
      parameters:
        - $ref: "#/parameters/RelayProxyConfigId"
      responses:
        "200":
          $ref: "#/responses/RelayProxyConfig2xx"
        "404":
          $ref: "#/responses/Standard404"
      summary: Get a single relay proxy configuration by ID.
      tags:
        - Relay proxy configurations
    patch:
      operationId: patchRelayProxyConfig
      parameters:
        - $ref: "#/parameters/RelayProxyConfigId"
        - $ref: "#/parameters/PatchRequest"
      responses:
        "200":
          $ref: "#/responses/RelayProxyConfig2xx"
        "400":
          $ref: "#/responses/Standard400"
        "404":
          $ref: "#/responses/Standard404"
        "409":
          $ref: "#/responses/Standard409"
      summary: Modify a relay proxy configuration by ID.
      tags:
        - Relay proxy configurations
  "/account/relay-auto-configs/{id}/reset":
    post:
      operationId: resetRelayProxyConfig
      parameters:
        - $ref: "#/parameters/RelayProxyConfigId"
        - $ref: "#/parameters/RelayProxyConfigsExpiry"
      responses:
        "200":
          $ref: "#/responses/RelayProxyConfig2xx"
        "400":
          $ref: "#/responses/Standard400"
        "404":
          $ref: "#/responses/Standard404"
      summary: Reset a relay proxy configuration's secret key with an optional expiry time for the old key.
      tags:
        - Relay proxy configurations
  /auditlog:
    get:
      operationId: getAuditLogEntries
      parameters:
        - $ref: "#/parameters/Before"
        - $ref: "#/parameters/After"
        - $ref: "#/parameters/Q"
        - $ref: "#/parameters/AuditLimit"
        - $ref: "#/parameters/Spec"
      responses:
        "200":
          description: Audit log entries response.
          schema:
            $ref: "#/definitions/AuditLogEntries"
        "400":
          $ref: "#/responses/Standard400"
        "401":
          $ref: "#/responses/Standard401"
      summary: Get a list of all audit log entries. The query parameters allow you to restrict the returned results by date ranges, resource specifiers, or a full-text search query.
      tags:
        - Audit log
  "/auditlog/{resourceId}":
    get:
      operationId: getAuditLogEntry
      parameters:
        - $ref: "#/parameters/ResourceId"
      responses:
        "200":
          description: Audit log entry response.
          schema:
            $ref: "#/definitions/AuditLogEntry"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
      summary: Use this endpoint to fetch a single audit log entry by its resouce ID.
      tags:
        - Audit log
  /destinations:
    get:
      operationId: getDestinations
      responses:
        "200":
          description: Destinations response.
          schema:
            $ref: "#/definitions/Destinations"
        "401":
          $ref: "#/responses/Standard401"
      summary: Returns a list of all data export destinations.
      tags:
        - Data export destinations
  "/destinations/{projectKey}/{environmentKey}":
    post:
      operationId: postDestination
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/EnvironmentKey"
        - $ref: "#/parameters/DestinationPostRequest"
      responses:
        "201":
          $ref: "#/responses/Destination2xx"
        "400":
          $ref: "#/responses/Standard400"
        "401":
          $ref: "#/responses/Standard401"
        "409":
          $ref: "#/responses/Standard409"
      summary: Create a new data export destination
      tags:
        - Data export destinations
  "/destinations/{projectKey}/{environmentKey}/{destinationId}":
    delete:
      operationId: deleteDestination
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/EnvironmentKey"
        - $ref: "#/parameters/DestinationId"
      responses:
        "204":
          $ref: "#/responses/Standard204"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
      summary: Get a single data export destination by ID
      tags:
        - Data export destinations
    get:
      operationId: getDestination
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/EnvironmentKey"
        - $ref: "#/parameters/DestinationId"
      responses:
        "200":
          $ref: "#/responses/Destination2xx"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
      summary: Get a single data export destination by ID
      tags:
        - Data export destinations
    patch:
      operationId: patchDestination
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/EnvironmentKey"
        - $ref: "#/parameters/DestinationId"
        - $ref: "#/parameters/PatchOnly"
      responses:
        "200":
          $ref: "#/responses/Destination2xx"
        "400":
          $ref: "#/responses/Standard400"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
        "409":
          $ref: "#/responses/Standard409"
      summary: Perform a partial update to a data export destination.
      tags:
        - Data export destinations
  "/flag-status/{projectKey}/{featureFlagKey}":
    get:
      operationId: getFeatureFlagStatusAcrossEnvironments
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/FeatureFlagKey"
      responses:
        "200":
          description: Status of the requested feature flag across environments
          schema:
            $ref: "#/definitions/FeatureFlagStatusAcrossEnvironments"
        "401":
          $ref: "#/responses/Standard401"
        "403":
          $ref: "#/responses/BetaApi403"
      summary: Get the status for a particular feature flag across environments
      tags:
        - Feature flags
  "/flag-statuses/{projectKey}/{environmentKey}":
    get:
      operationId: getFeatureFlagStatuses
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/EnvironmentKey"
      responses:
        "200":
          description: List of feature flag statuses.
          schema:
            $ref: "#/definitions/FeatureFlagStatuses"
        "401":
          $ref: "#/responses/Standard401"
      summary: Get a list of statuses for all feature flags. The status includes the last time the feature flag was requested, as well as the state of the flag.
      tags:
        - Feature flags
  "/flag-statuses/{projectKey}/{environmentKey}/{featureFlagKey}":
    get:
      operationId: getFeatureFlagStatus
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/EnvironmentKey"
        - $ref: "#/parameters/FeatureFlagKey"
      responses:
        "200":
          description: Status of the requested feature flag.
          schema:
            $ref: "#/definitions/FeatureFlagStatus"
        "401":
          $ref: "#/responses/Standard401"
      summary: Get the status for a particular feature flag.
      tags:
        - Feature flags
  "/flags/{projectKey}":
    get:
      operationId: getFeatureFlags
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/EnvironmentKeyQuery"
        - $ref: "#/parameters/SummaryQuery"
        - $ref: "#/parameters/ArchivedQuery"
        - $ref: "#/parameters/LimitQuery"
        - $ref: "#/parameters/OffsetQuery"
        - $ref: "#/parameters/FilterQuery"
        - $ref: "#/parameters/SortQuery"
        - $ref: "#/parameters/Tag"
      responses:
        "200":
          description: Flags response.
          schema:
            $ref: "#/definitions/FeatureFlags"
        "401":
          $ref: "#/responses/Standard401"
      summary: Get a list of all features in the given project.
      tags:
        - Feature flags
    post:
      operationId: postFeatureFlag
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/FeatureFlagPostRequest"
        - $ref: "#/parameters/CloneFlagKeyQuery"
      responses:
        "201":
          description: Flag response.
          schema:
            $ref: "#/definitions/FeatureFlag"
        "400":
          $ref: "#/responses/Standard400"
        "401":
          $ref: "#/responses/Standard401"
        "409":
          $ref: "#/responses/Standard409"
      summary: Creates a new feature flag.
      tags:
        - Feature flags
  "/flags/{projectKey}/{environmentKey}/{featureFlagKey}/dependent-flags":
    get:
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/EnvironmentKey"
        - $ref: "#/parameters/FeatureFlagKey"
      responses:
        "200":
          description: Dependent flags in a single envrionemnt response
          schema:
            $ref: "#/definitions/DependentFlagsByEnvironment"
        "401":
          $ref: "#/responses/Standard401"
        "403":
          $ref: "#/responses/BetaApi403"
        "404":
          $ref: "#/responses/Standard404"
      summary: Get dependent flags for the flag in the environment specified in path parameters
      tags:
        - Feature flags
  "/flags/{projectKey}/{featureFlagKey}":
    delete:
      operationId: deleteFeatureFlag
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/FeatureFlagKey"
      responses:
        "204":
          $ref: "#/responses/Standard204"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
      summary: Delete a feature flag in all environments. Be careful-- only delete feature flags that are no longer being used by your application.
      tags:
        - Feature flags
    get:
      operationId: getFeatureFlag
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/FeatureFlagKey"
        - $ref: "#/parameters/EnvironmentKeyQuery"
      responses:
        "200":
          description: Flag response.
          schema:
            $ref: "#/definitions/FeatureFlag"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
      summary: Get a single feature flag by key.
      tags:
        - Feature flags
    patch:
      operationId: patchFeatureFlag
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/FeatureFlagKey"
        - $ref: "#/parameters/PatchWithComment"
      responses:
        "200":
          description: Feature flag response.
          schema:
            $ref: "#/definitions/FeatureFlag"
        "400":
          $ref: "#/responses/Standard400"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
        "409":
          $ref: "#/responses/Standard409"
      summary: Perform a partial update to a feature.
      tags:
        - Feature flags
  "/flags/{projectKey}/{featureFlagKey}/copy":
    post:
      operationId: copyFeatureFlag
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/FeatureFlagKey"
        - $ref: "#/parameters/FeatureFlagCopyBody"
      responses:
        "201":
          description: Flag configuration copy response.
          schema:
            $ref: "#/definitions/FeatureFlag"
        "400":
          $ref: "#/responses/Standard400"
        "401":
          $ref: "#/responses/Standard401"
        "409":
          $ref: "#/responses/Standard409"
      summary: Copies the feature flag configuration from one environment to the same feature flag in another environment.
      tags:
        - Feature flags
  "/flags/{projectKey}/{featureFlagKey}/dependent-flags":
    get:
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/FeatureFlagKey"
      responses:
        "200":
          description: Dependent flags accross all environemnts in the project response
          schema:
            $ref: "#/definitions/MultiEnvironmentDependentFlags"
        "401":
          $ref: "#/responses/Standard401"
        "403":
          $ref: "#/responses/BetaApi403"
        "404":
          $ref: "#/responses/Standard404"
      summary: Get dependent flags across all environments for the flag specified in the path parameters
      tags:
        - Feature flags
  "/flags/{projectKey}/{featureFlagKey}/expiring-user-targets/{environmentKey}":
    get:
      operationId: getExpiringUserTargets
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/EnvironmentKey"
        - $ref: "#/parameters/FeatureFlagKey"
      responses:
        "200":
          description: User targets of the requested feature flag.
          schema:
            $ref: "#/definitions/UserTargetingExpirationForFlags"
        "401":
          $ref: "#/responses/Standard401"
      summary: Get expiring user targets for feature flag
      tags:
        - Feature flags
    patch:
      operationId: patchExpiringUserTargets
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/EnvironmentKey"
        - $ref: "#/parameters/FeatureFlagKey"
        - $ref: "#/parameters/SemanticPatchWithComment"
      responses:
        "200":
          description: User targeting expirations on feature flag response.
          schema:
            $ref: "#/definitions/UserTargetingExpirationForFlags"
        "400":
          $ref: "#/responses/Standard400"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
        "409":
          $ref: "#/responses/Standard409"
      summary: Update, add, or delete expiring user targets on feature flag
      tags:
        - Feature flags
  /integrations:
    get:
      operationId: getIntegrations
      responses:
        "200":
          description: Integrations response.
          schema:
            $ref: "#/definitions/Integrations"
        "403":
          $ref: "#/responses/BetaApi403"
      summary: Get a list of all configured audit log event integrations associated with this account.
      tags:
        - Integrations
  "/integrations/{integrationKey}":
    get:
      operationId: getIntegrationSubscriptions
      parameters:
        - $ref: "#/parameters/IntegrationKey"
      responses:
        "200":
          description: Integrations response.
          schema:
            $ref: "#/definitions/Integration"
        "403":
          $ref: "#/responses/BetaApi403"
        "404":
          $ref: "#/responses/Standard404"
      summary: Get a list of all configured integrations of a given kind.
      tags:
        - Integrations
    post:
      operationId: postIntegrationSubscription
      parameters:
        - $ref: "#/parameters/IntegrationKey"
        - $ref: "#/parameters/IntegrationPostRequest"
      responses:
        "201":
          description: Integrations response.
          schema:
            $ref: "#/definitions/IntegrationSubscription"
        "400":
          $ref: "#/responses/Standard400"
        "401":
          $ref: "#/responses/Standard401"
        "409":
          $ref: "#/responses/Standard409"
      summary: Create a new integration subscription of a given kind.
      tags:
        - Integrations
  "/integrations/{integrationKey}/{integrationId}":
    delete:
      operationId: deleteIntegrationSubscription
      parameters:
        - $ref: "#/parameters/IntegrationKey"
        - $ref: "#/parameters/IntegrationId"
      responses:
        "204":
          $ref: "#/responses/Standard204"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
      summary: Delete an integration subscription by ID.
      tags:
        - Integrations
    get:
      operationId: getIntegrationSubscription
      parameters:
        - $ref: "#/parameters/IntegrationKey"
        - $ref: "#/parameters/IntegrationId"
      responses:
        "200":
          description: Integrations response.
          schema:
            $ref: "#/definitions/IntegrationSubscription"
        "403":
          $ref: "#/responses/BetaApi403"
        "404":
          $ref: "#/responses/Standard404"
      summary: Get a single integration subscription by ID.
      tags:
        - Integrations
    patch:
      operationId: patchIntegrationSubscription
      parameters:
        - $ref: "#/parameters/IntegrationKey"
        - $ref: "#/parameters/IntegrationId"
        - $ref: "#/parameters/PatchRequest"
      responses:
        "200":
          description: Integrations response.
          schema:
            $ref: "#/definitions/IntegrationSubscription"
        "400":
          $ref: "#/responses/Standard400"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
      summary: Modify an integration subscription by ID.
      tags:
        - Integrations
  /members:
    get:
      operationId: getMembers
      parameters:
        - $ref: "#/parameters/LimitQuery"
        - $ref: "#/parameters/OffsetQuery"
        - $ref: "#/parameters/FilterQuery"
        - $ref: "#/parameters/SortQuery"
      responses:
        "200":
          description: Members response.
          schema:
            $ref: "#/definitions/Members"
        "401":
          $ref: "#/responses/Standard401"
      summary: Returns a list of all members in the account.
      tags:
        - Team members
    post:
      operationId: postMembers
      parameters:
        - $ref: "#/parameters/MembersPostRequest"
      responses:
        "201":
          description: Members response.
          schema:
            $ref: "#/definitions/Members"
        "400":
          $ref: "#/responses/Standard400"
        "401":
          $ref: "#/responses/Standard401"
        "409":
          $ref: "#/responses/Standard409"
      summary: Invite new members.
      tags:
        - Team members
  /members/me:
    get:
      operationId: getMe
      responses:
        "200":
          $ref: "#/responses/Member2xx"
        "400":
          $ref: "#/responses/Standard400"
        "401":
          $ref: "#/responses/Standard401"
      summary: Get the current team member associated with the token
      tags:
        - Team members
  "/members/{memberId}":
    delete:
      operationId: deleteMember
      parameters:
        - $ref: "#/parameters/MemberId"
      responses:
        "204":
          $ref: "#/responses/Standard204"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
      summary: Delete a team member by ID.
      tags:
        - Team members
    get:
      operationId: getMember
      parameters:
        - $ref: "#/parameters/MemberId"
      responses:
        "200":
          $ref: "#/responses/Member2xx"
        "400":
          $ref: "#/responses/Standard400"
        "401":
          $ref: "#/responses/Standard401"
      summary: Get a single team member by ID.
      tags:
        - Team members
    patch:
      operationId: patchMember
      parameters:
        - $ref: "#/parameters/MemberId"
        - $ref: "#/parameters/PatchRequest"
      responses:
        "200":
          $ref: "#/responses/Member2xx"
        "400":
          $ref: "#/responses/Standard400"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
        "409":
          $ref: "#/responses/Standard409"
      summary: Modify a team member by ID.
      tags:
        - Team members
  /projects:
    get:
      operationId: getProjects
      responses:
        "200":
          description: Projects response
          schema:
            $ref: "#/definitions/Projects"
        "401":
          $ref: "#/responses/Standard401"
      summary: Returns a list of all projects in the account.
      tags:
        - Projects
    post:
      operationId: postProject
      parameters:
        - $ref: "#/parameters/ProjectPostRequest"
      responses:
        "201":
          $ref: "#/responses/Project2xx"
        "400":
          $ref: "#/responses/Standard400"
        "401":
          $ref: "#/responses/Standard401"
        "409":
          $ref: "#/responses/Standard409"
      summary: Create a new project with the given key and name.
      tags:
        - Projects
  "/projects/{projectKey}":
    delete:
      operationId: deleteProject
      parameters:
        - $ref: "#/parameters/ProjectKey"
      responses:
        "204":
          $ref: "#/responses/Standard204"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
      summary: Delete a project by key. Caution-- deleting a project will delete all associated environments and feature flags. You cannot delete the last project in an account.
      tags:
        - Projects
    get:
      operationId: getProject
      parameters:
        - $ref: "#/parameters/ProjectKey"
      responses:
        "200":
          $ref: "#/responses/Project2xx"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
      summary: Fetch a single project by key.
      tags:
        - Projects
    patch:
      operationId: patchProject
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/PatchRequest"
      responses:
        "200":
          $ref: "#/responses/Project2xx"
        "400":
          $ref: "#/responses/Standard400"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
        "409":
          $ref: "#/responses/Standard409"
      summary: Modify a project by ID.
      tags:
        - Projects
  "/projects/{projectKey}/environments":
    post:
      operationId: postEnvironment
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/EnvironmentPostRequest"
      responses:
        "201":
          $ref: "#/responses/Environment2xx"
        "400":
          $ref: "#/responses/Standard400"
        "401":
          $ref: "#/responses/Standard401"
        "409":
          $ref: "#/responses/Standard409"
      summary: Create a new environment in a specified project with a given name, key, and swatch color.
      tags:
        - Environments
  "/projects/{projectKey}/environments/{environmentKey}":
    delete:
      operationId: deleteEnvironment
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/EnvironmentKey"
      responses:
        "204":
          $ref: "#/responses/Standard204"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
      summary: Delete an environment in a specific project.
      tags:
        - Environments
    get:
      operationId: getEnvironment
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/EnvironmentKey"
      responses:
        "200":
          $ref: "#/responses/Environment2xx"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
      summary: Get an environment given a project and key.
      tags:
        - Environments
    patch:
      operationId: patchEnvironment
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/EnvironmentKey"
        - $ref: "#/parameters/PatchRequest"
      responses:
        "200":
          $ref: "#/responses/Environment2xx"
        "400":
          $ref: "#/responses/Standard400"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
        "409":
          $ref: "#/responses/Standard409"
      summary: Modify an environment by ID. If you try to patch the environment by setting both required and requiredApprovalTags, it will result in an error. Users can specify either required approvals for all flags in an environment or those with specific tags, but not both. Only customers on an Enterprise plan can require approval for flag updates with either mechanism.
      tags:
        - Environments
  "/projects/{projectKey}/environments/{environmentKey}/apiKey":
    post:
      operationId: resetEnvironmentSDKKey
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/EnvironmentKey"
        - $ref: "#/parameters/EnvironmentSDKKeyExpiry"
      responses:
        "200":
          $ref: "#/responses/Environment2xx"
        "404":
          $ref: "#/responses/Standard404"
        "409":
          $ref: "#/responses/Standard409"
      summary: Reset an environment's SDK key with an optional expiry time for the old key.
      tags:
        - Environments
  "/projects/{projectKey}/environments/{environmentKey}/mobileKey":
    post:
      operationId: resetEnvironmentMobileKey
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/EnvironmentKey"
        - $ref: "#/parameters/EnvironmentMobileKeyExpiry"
      responses:
        "200":
          $ref: "#/responses/Environment2xx"
        "404":
          $ref: "#/responses/Standard404"
        "409":
          $ref: "#/responses/Standard409"
      summary: 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.
      tags:
        - Environments
  "/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests":
    get:
      operationId: getApprovalRequests
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/FeatureFlagKey"
        - $ref: "#/parameters/EnvironmentKey"
      responses:
        "200":
          description: Approval requests response
          schema:
            $ref: "#/definitions/ApprovalRequests"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
      summary: Get all approval requests for a feature flag config
      tags:
        - Feature flags
  "/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{approvalRequestId}":
    delete:
      operationId: deleteApprovalRequest
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/EnvironmentKey"
        - $ref: "#/parameters/FeatureFlagKey"
        - $ref: "#/parameters/ApprovalRequestId"
        - $ref: "#/parameters/ApprovalRequestPostRequest"
      responses:
        "204":
          $ref: "#/responses/Standard204"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
      summary: Delete an approval request for a feature flag config
      tags:
        - Feature flags
    get:
      operationId: getApprovalRequest
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/FeatureFlagKey"
        - $ref: "#/parameters/EnvironmentKey"
        - $ref: "#/parameters/ApprovalRequestId"
      responses:
        "200":
          description: Approval request response
          schema:
            $ref: "#/definitions/ApprovalRequests"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
      summary: Get a single approval request for a feature flag config
      tags:
        - Feature flags
    post:
      operationId: postApprovalRequest
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/FeatureFlagKey"
        - $ref: "#/parameters/EnvironmentKey"
        - $ref: "#/parameters/ApprovalRequestId"
        - $ref: "#/parameters/ApprovalRequestPostRequest"
      responses:
        "200":
          description: Approval request response
          schema:
            $ref: "#/definitions/ApprovalRequest"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
      summary: Create an approval request for a feature flag config
      tags:
        - Feature flags
  "/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{approvalRequestId}/apply":
    post:
      operationId: postApplyApprovalRequest
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/FeatureFlagKey"
        - $ref: "#/parameters/EnvironmentKey"
        - $ref: "#/parameters/ApprovalRequestId"
        - $ref: "#/parameters/ApprovalRequestApplyPostRequest"
      responses:
        "200":
          description: Approval request applied response
          schema:
            $ref: "#/definitions/ApprovalRequests"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
      summary: Apply approval request for a feature flag config
      tags:
        - Feature flags
  "/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{approvalRequestId}/review":
    post:
      operationId: postReviewApprovalRequest
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/FeatureFlagKey"
        - $ref: "#/parameters/EnvironmentKey"
        - $ref: "#/parameters/ApprovalRequestId"
        - $ref: "#/parameters/ApprovalRequestReviewPostRequest"
      responses:
        "200":
          description: Approval request reviewed response
          schema:
            $ref: "#/definitions/ApprovalRequests"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
      summary: Review approval request for a feature flag config
      tags:
        - Feature flags
  "/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes":
    get:
      operationId: getFlagConfigScheduledChanges
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/FeatureFlagKey"
        - $ref: "#/parameters/EnvironmentKey"
      responses:
        "200":
          description: A list of scheduled changes for feature flag response.
          schema:
            $ref: "#/definitions/FeatureFlagScheduledChanges"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
      summary: Get all scheduled workflows for a feature flag by key.
      tags:
        - Feature flags
    post:
      operationId: postFlagConfigScheduledChanges
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/FlagConfigScheduledChangesPostBody"
        - $ref: "#/parameters/FeatureFlagKey"
        - $ref: "#/parameters/EnvironmentKey"
      responses:
        "201":
          description: A scheduled change for feature flag response.
          schema:
            $ref: "#/definitions/FeatureFlagScheduledChange"
        "400":
          $ref: "#/responses/Standard400"
        "401":
          $ref: "#/responses/Standard401"
        "409":
          $ref: "#/responses/Standard409"
      summary: Creates a new scheduled change for a feature flag.
      tags:
        - Feature flags
  "/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes-conflicts":
    post:
      operationId: getFlagConfigScheduledChangesConflicts
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/FeatureFlagKey"
        - $ref: "#/parameters/EnvironmentKey"
        - $ref: "#/parameters/FlagConfigScheduledChangesConflictsBody"
      responses:
        "200":
          description: Scheduled changes conflict response
          schema:
            $ref: "#/definitions/FeatureFlagScheduledChangesConflicts"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
      summary: Lists conflicts between the given instructions and any existing scheduled changes for the feature flag. The actual HTTP verb should be REPORT, not POST.
      tags:
        - Feature flags
  "/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{scheduledChangeId}":
    delete:
      operationId: deleteFlagConfigScheduledChanges
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/FeatureFlagKey"
        - $ref: "#/parameters/EnvironmentKey"
        - $ref: "#/parameters/ScheduledChangeId"
      responses:
        "204":
          $ref: "#/responses/Standard204"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
      summary: Delete a scheduled change on a feature flag in an environment.
      tags:
        - Feature flags
    get:
      operationId: getFlagConfigScheduledChange
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/FeatureFlagKey"
        - $ref: "#/parameters/EnvironmentKey"
        - $ref: "#/parameters/ScheduledChangeId"
      responses:
        "200":
          description: A scheduled change for feature flag response.
          schema:
            $ref: "#/definitions/FeatureFlagScheduledChange"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
      summary: Get a scheduled change on a feature flag by id.
      tags:
        - Feature flags
    patch:
      operationId: patchFlagConfigScheduledChange
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/FeatureFlagKey"
        - $ref: "#/parameters/FlagConfigScheduledChangesPatchBody"
        - $ref: "#/parameters/EnvironmentKey"
        - $ref: "#/parameters/ScheduledChangeId"
      responses:
        "201":
          description: A Scheduled change for feature flag response.
          schema:
            $ref: "#/definitions/FeatureFlagScheduledChange"
        "400":
          $ref: "#/responses/Standard400"
        "401":
          $ref: "#/responses/Standard401"
        "409":
          $ref: "#/responses/Standard409"
      summary: Updates an existing scheduled-change on a feature flag in an environment.
      tags:
        - Feature flags
  /roles:
    get:
      operationId: getCustomRoles
      responses:
        "200":
          description: Custom roles response.
          schema:
            $ref: "#/definitions/CustomRoles"
        "401":
          $ref: "#/responses/Standard401"
      summary: Return a complete list of custom roles.
      tags:
        - Custom roles
    post:
      operationId: postCustomRole
      parameters:
        - $ref: "#/parameters/CustomRolePostRequest"
      responses:
        "201":
          $ref: "#/responses/CustomRole2xx"
        "400":
          $ref: "#/responses/Standard400"
        "401":
          $ref: "#/responses/Standard401"
        "409":
          $ref: "#/responses/Standard409"
      summary: Create a new custom role.
      tags:
        - Custom roles
  "/roles/{customRoleKey}":
    delete:
      operationId: deleteCustomRole
      parameters:
        - $ref: "#/parameters/CustomRoleKey"
      responses:
        "204":
          $ref: "#/responses/Standard204"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
      summary: Delete a custom role by key.
      tags:
        - Custom roles
    get:
      operationId: getCustomRole
      parameters:
        - $ref: "#/parameters/CustomRoleKey"
      responses:
        "200":
          $ref: "#/responses/CustomRole2xx"
        "400":
          $ref: "#/responses/Standard400"
        "401":
          $ref: "#/responses/Standard401"
      summary: Get one custom role by key.
      tags:
        - Custom roles
    patch:
      operationId: patchCustomRole
      parameters:
        - $ref: "#/parameters/CustomRoleKey"
        - $ref: "#/parameters/PatchRequest"
      responses:
        "200":
          $ref: "#/responses/CustomRole2xx"
        "400":
          $ref: "#/responses/Standard400"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
        "409":
          $ref: "#/responses/Standard409"
      summary: Modify a custom role by key.
      tags:
        - Custom roles
  "/segments/{projectKey}/{environmentKey}":
    get:
      operationId: getUserSegments
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/EnvironmentKey"
        - $ref: "#/parameters/Tag"
      responses:
        "200":
          description: Segments response.
          schema:
            $ref: "#/definitions/UserSegments"
        "401":
          $ref: "#/responses/Standard401"
      summary: Get a list of all user segments in the given project.
      tags:
        - User segments
    post:
      operationId: postUserSegment
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/EnvironmentKey"
        - $ref: "#/parameters/UserSegmentPostRequest"
      responses:
        "201":
          $ref: "#/responses/UserSegment2xx"
        "400":
          $ref: "#/responses/Standard400"
        "401":
          $ref: "#/responses/Standard401"
        "409":
          $ref: "#/responses/Standard409"
      summary: Creates a new user segment.
      tags:
        - User segments
  "/segments/{projectKey}/{environmentKey}/{userSegmentKey}":
    delete:
      operationId: deleteUserSegment
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/EnvironmentKey"
        - $ref: "#/parameters/UserSegmentKey"
      responses:
        "204":
          $ref: "#/responses/Standard204"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
      summary: Delete a user segment.
      tags:
        - User segments
    get:
      operationId: getUserSegment
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/EnvironmentKey"
        - $ref: "#/parameters/UserSegmentKey"
      responses:
        "200":
          $ref: "#/responses/UserSegment2xx"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
      summary: Get a single user segment by key.
      tags:
        - User segments
    patch:
      operationId: patchUserSegment
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/EnvironmentKey"
        - $ref: "#/parameters/UserSegmentKey"
        - $ref: "#/parameters/PatchOnly"
      responses:
        "200":
          $ref: "#/responses/UserSegment2xx"
        "400":
          $ref: "#/responses/Standard400"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
        "409":
          $ref: "#/responses/Standard409"
      summary: Perform a partial update to a user segment.
      tags:
        - User segments
  "/segments/{projectKey}/{environmentKey}/{userSegmentKey}/users":
    post:
      operationId: updateBigSegmentTargets
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/EnvironmentKey"
        - $ref: "#/parameters/UserSegmentKey"
        - $ref: "#/parameters/BigSegmentTargetsPostRequest"
      responses:
        "204":
          $ref: "#/responses/Standard204"
        "400":
          $ref: "#/responses/Standard400"
        "401":
          $ref: "#/responses/Standard401"
      summary: Update targets included or excluded in a big segment
      tags:
        - User segments
  "/segments/{projectKey}/{userSegmentKey}/expiring-user-targets/{environmentKey}":
    get:
      operationId: getExpiringUserTargetsOnSegment
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/EnvironmentKey"
        - $ref: "#/parameters/UserSegmentKey"
      responses:
        "200":
          description: User targeting expirations on user segment response.
          schema:
            $ref: "#/definitions/UserTargetingExpirationForSegment"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
      summary: Get expiring user targets for user segment
      tags:
        - User segments
    patch:
      operationId: patchExpiringUserTargetsOnSegment
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/EnvironmentKey"
        - $ref: "#/parameters/UserSegmentKey"
        - $ref: "#/parameters/SemanticPatchWithComment"
      responses:
        "200":
          description: User targeting expirations on user segment response.
          schema:
            $ref: "#/definitions/UserTargetingExpirationForSegment"
        "400":
          $ref: "#/responses/Standard400"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
        "409":
          $ref: "#/responses/Standard409"
      summary: Update, add, or delete expiring user targets on user segment
      tags:
        - User segments
  /tokens:
    get:
      operationId: getTokens
      parameters:
        - $ref: "#/parameters/TokenShowAllQuery"
      responses:
        "200":
          description: Tokens response.
          schema:
            $ref: "#/definitions/Tokens"
        "401":
          $ref: "#/responses/Standard401"
      summary: Returns a list of tokens in the account.
      tags:
        - Access tokens
    post:
      operationId: postToken
      parameters:
        - $ref: "#/parameters/TokensPostRequest"
      responses:
        "201":
          description: Token response.
          schema:
            $ref: "#/definitions/Token"
        "400":
          $ref: "#/responses/Standard400"
        "401":
          $ref: "#/responses/Standard401"
        "409":
          $ref: "#/responses/Standard409"
      summary: Create a new token.
      tags:
        - Access tokens
  "/tokens/{tokenId}":
    delete:
      operationId: deleteToken
      parameters:
        - $ref: "#/parameters/TokenId"
      responses:
        "204":
          $ref: "#/responses/Standard204"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
      summary: Delete an access token by ID.
      tags:
        - Access tokens
    get:
      operationId: getToken
      parameters:
        - $ref: "#/parameters/TokenId"
      responses:
        "200":
          $ref: "#/responses/Token2xx"
        "400":
          $ref: "#/responses/Standard400"
        "401":
          $ref: "#/responses/Standard401"
      summary: Get a single access token by ID.
      tags:
        - Access tokens
    patch:
      operationId: patchToken
      parameters:
        - $ref: "#/parameters/TokenId"
        - $ref: "#/parameters/PatchRequest"
      responses:
        "200":
          $ref: "#/responses/Token2xx"
        "400":
          $ref: "#/responses/Standard400"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
        "409":
          $ref: "#/responses/Standard409"
      summary: Modify an access token by ID.
      tags:
        - Access tokens
  "/tokens/{tokenId}/reset":
    post:
      operationId: resetToken
      parameters:
        - $ref: "#/parameters/TokenId"
        - $ref: "#/parameters/TokenExpiry"
      responses:
        "200":
          $ref: "#/responses/Token2xx"
        "400":
          $ref: "#/responses/Standard400"
        "401":
          $ref: "#/responses/Standard401"
      summary: Reset an access token's secret key with an optional expiry time for the old key.
      tags:
        - Access tokens
  /usage:
    get:
      operationId: getUsage
      responses:
        "200":
          description: Usage endpoints
          schema:
            $ref: "#/definitions/Usage"
        "403":
          $ref: "#/responses/BetaApi403"
      summary: Returns of the usage endpoints available.
      tags:
        - Customer Metrics
  "/usage/evaluations/{envId}/{flagKey}":
    get:
      operationId: getEvaluations
      parameters:
        - $ref: "#/parameters/EvaluationEnvId"
        - $ref: "#/parameters/EvaluationFlagKey"
      responses:
        "200":
          description: Returns timeseries data and all sdk versions.
          schema:
            $ref: "#/definitions/StreamSDKVersion"
        "403":
          $ref: "#/responses/BetaApi403"
        "404":
          $ref: "#/responses/EvaluationUsage404"
      summary: Get events usage by event id and the feature flag key.
      tags:
        - Customer Metrics
  /usage/events:
    get:
      operationId: getEvents
      responses:
        "200":
          description: Returns timeseries data and all sdk versions.
          schema:
            $ref: "#/definitions/Events"
        "403":
          $ref: "#/responses/BetaApi403"
      summary: Get events usage endpoints.
      tags:
        - Customer Metrics
  "/usage/events/{type}":
    get:
      operationId: getEvent
      parameters:
        - $ref: "#/parameters/EventType"
      responses:
        "200":
          description: Returns timeseries data and all sdk versions.
          schema:
            $ref: "#/definitions/StreamSDKVersion"
        "403":
          $ref: "#/responses/BetaApi403"
        "404":
          $ref: "#/responses/StreamUsage404"
      summary: Get events usage by event type.
      tags:
        - Customer Metrics
  /usage/mau:
    get:
      operationId: getMAU
      responses:
        "200":
          description: Returns timeseries data and all sdk versions.
          schema:
            $ref: "#/definitions/MAU"
        "403":
          $ref: "#/responses/BetaApi403"
      summary: Get monthly active user data.
      tags:
        - Customer Metrics
  /usage/mau/bycategory:
    get:
      operationId: getMAUByCategory
      responses:
        "200":
          description: Returns timeseries data and all sdk versions.
          schema:
            $ref: "#/definitions/MAUbyCategory"
        "403":
          $ref: "#/responses/BetaApi403"
      summary: Get monthly active user data by category.
      tags:
        - Customer Metrics
  /usage/streams:
    get:
      operationId: getStreams
      responses:
        "200":
          description: Stream usage endpoints
          schema:
            $ref: "#/definitions/Streams"
        "403":
          $ref: "#/responses/BetaApi403"
      summary: Returns a list of all streams.
      tags:
        - Customer Metrics
  "/usage/streams/{source}":
    get:
      operationId: getStream
      parameters:
        - $ref: "#/parameters/StreamSource"
      responses:
        "200":
          description: Responds with time series data on stream usage.
          schema:
            $ref: "#/definitions/Stream"
        "403":
          $ref: "#/responses/BetaApi403"
        "404":
          $ref: "#/responses/StreamUsage404"
      summary: Get a stream endpoint and return timeseries data.
      tags:
        - Customer Metrics
  "/usage/streams/{source}/bysdkversion":
    get:
      operationId: getStreamBySDK
      parameters:
        - $ref: "#/parameters/StreamSource"
      responses:
        "200":
          description: Returns timeseries data and metadata on sdk version.
          schema:
            $ref: "#/definitions/StreamBySDK"
        "403":
          $ref: "#/responses/BetaApi403"
        "404":
          $ref: "#/responses/StreamUsage404"
      summary: Get a stream timeseries data by source show sdk version metadata.
      tags:
        - Customer Metrics
  "/usage/streams/{source}/sdkversions":
    get:
      operationId: getStreamSDKVersion
      parameters:
        - $ref: "#/parameters/StreamSource"
      responses:
        "200":
          description: Returns timeseries data and all sdk versions.
          schema:
            $ref: "#/definitions/StreamSDKVersion"
        "403":
          $ref: "#/responses/BetaApi403"
        "404":
          $ref: "#/responses/StreamUsage404"
      summary: Get a stream timeseries data by source and show all sdk version associated.
      tags:
        - Customer Metrics
  "/user-search/{projectKey}/{environmentKey}":
    get:
      operationId: getSearchUsers
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/EnvironmentKey"
        - $ref: "#/parameters/Query"
        - $ref: "#/parameters/Limit"
        - $ref: "#/parameters/Offset"
        - $ref: "#/parameters/After"
      responses:
        "200":
          description: Users response.
          schema:
            $ref: "#/definitions/Users"
        "401":
          $ref: "#/responses/Standard401"
      summary: Search users in LaunchDarkly based on their last active date, or a search query. It should not be used to enumerate all users in LaunchDarkly-- use the List users API resource.
      tags:
        - Users
  "/users/{projectKey}/{environmentKey}":
    get:
      operationId: getUsers
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/EnvironmentKey"
        - $ref: "#/parameters/Limit"
        - $ref: "#/parameters/HMAC"
        - $ref: "#/parameters/ScrollId"
      responses:
        "200":
          description: Users response.
          schema:
            $ref: "#/definitions/Users"
        "401":
          $ref: "#/responses/Standard401"
      summary: List all users in the environment. Includes the total count of users. In each page, there will be up to 'limit' users returned (default 20). This is useful for exporting all users in the system for further analysis. Paginated collections will include a next link containing a URL with the next set of elements in the collection.
      tags:
        - Users
  "/users/{projectKey}/{environmentKey}/{userKey}":
    delete:
      operationId: deleteUser
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/EnvironmentKey"
        - $ref: "#/parameters/UserKey"
      responses:
        "204":
          $ref: "#/responses/Standard204"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
      summary: Delete a user by ID.
      tags:
        - Users
    get:
      operationId: getUser
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/EnvironmentKey"
        - $ref: "#/parameters/UserKey"
      responses:
        "200":
          description: User response.
          schema:
            $ref: "#/definitions/UserRecord"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
      summary: Get a user by key.
      tags:
        - Users
  "/users/{projectKey}/{environmentKey}/{userKey}/flags":
    get:
      operationId: getUserFlagSettings
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/EnvironmentKey"
        - $ref: "#/parameters/UserKey"
      responses:
        "200":
          description: User flags settings response.
          schema:
            $ref: "#/definitions/UserFlagSettings"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
      summary: Fetch a single flag setting for a user by key.
      tags:
        - User settings
  "/users/{projectKey}/{environmentKey}/{userKey}/flags/{featureFlagKey}":
    get:
      operationId: getUserFlagSetting
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/EnvironmentKey"
        - $ref: "#/parameters/UserKey"
        - $ref: "#/parameters/FeatureFlagKey"
      responses:
        "200":
          description: User flag setting response.
          schema:
            $ref: "#/definitions/UserFlagSetting"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
      summary: Fetch a single flag setting for a user by key.
      tags:
        - User settings
    put:
      operationId: putFlagSetting
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/EnvironmentKey"
        - $ref: "#/parameters/UserKey"
        - $ref: "#/parameters/FeatureFlagKey"
        - $ref: "#/parameters/UserSettingsPutRequest"
      responses:
        "204":
          $ref: "#/responses/Standard204"
        "400":
          $ref: "#/responses/Standard400"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
      summary: Specifically enable or disable a feature flag for a user based on their key.
      tags:
        - User settings
  "/users/{projectKey}/{userKey}/expiring-user-targets/{environmentKey}":
    get:
      operationId: getExpiringUserTargetsForUser
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/EnvironmentKey"
        - $ref: "#/parameters/UserKey"
      responses:
        "200":
          description: User targets of the requested feature flag.
          schema:
            $ref: "#/definitions/UserTargetingExpirationOnFlagsForUser"
        "401":
          $ref: "#/responses/Standard401"
      summary: Get expiring dates on flags for user
      tags:
        - User settings
    patch:
      operationId: patchExpiringUserTargetsForFlags
      parameters:
        - $ref: "#/parameters/ProjectKey"
        - $ref: "#/parameters/EnvironmentKey"
        - $ref: "#/parameters/UserKey"
        - $ref: "#/parameters/SemanticPatchWithComment"
      responses:
        "200":
          description: User Targeting expiration for single user on all flags response.
          schema:
            $ref: "#/definitions/UserTargetingExpirationOnFlagsForUser"
        "400":
          $ref: "#/responses/Standard400"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
        "409":
          $ref: "#/responses/Standard409"
      summary: Update, add, or delete expiring user targets for a single user on all flags
      tags:
        - User settings
  /webhooks:
    get:
      operationId: getWebhooks
      responses:
        "200":
          description: Webhooks response.
          schema:
            $ref: "#/definitions/Webhooks"
        "401":
          $ref: "#/responses/Standard401"
      summary: Fetch a list of all webhooks.
      tags:
        - Webhooks
    post:
      operationId: postWebhook
      parameters:
        - $ref: "#/parameters/WebhookPostRequest"
      responses:
        "201":
          $ref: "#/responses/Webhook2xx"
        "400":
          $ref: "#/responses/Standard400"
        "401":
          $ref: "#/responses/Standard401"
      summary: Create a webhook.
      tags:
        - Webhooks
  "/webhooks/{resourceId}":
    delete:
      operationId: deleteWebhook
      parameters:
        - $ref: "#/parameters/ResourceId"
      responses:
        "204":
          $ref: "#/responses/Standard204"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
      summary: Delete a webhook by ID.
      tags:
        - Webhooks
    get:
      operationId: getWebhook
      parameters:
        - $ref: "#/parameters/ResourceId"
      responses:
        "200":
          $ref: "#/responses/Webhook2xx"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
      summary: Get a webhook by ID.
      tags:
        - Webhooks
    patch:
      operationId: patchWebhook
      parameters:
        - $ref: "#/parameters/ResourceId"
        - $ref: "#/parameters/PatchRequest"
      responses:
        "200":
          $ref: "#/responses/Webhook2xx"
        "400":
          $ref: "#/responses/Standard400"
        "401":
          $ref: "#/responses/Standard401"
        "404":
          $ref: "#/responses/Standard404"
        "409":
          $ref: "#/responses/Standard409"
      summary: Modify a webhook by ID.
      tags:
        - Webhooks
definitions:
  ApprovalRequest:
    properties:
      _id:
        $ref: "#/definitions/Id"
      _version:
        type: integer
      allReviews:
        items:
          $ref: "#/definitions/ApprovalRequestReview"
        type: array
      appliedByMemberID:
        description: The id of the member that applied the approval request
        type: string
      appliedDate:
        description: A unix epoch time in milliseconds specifying the date the approval request was applied
        type: integer
      creationDate:
        description: A unix epoch time in milliseconds specifying the date the approval request was requested
        type: integer
      executionDate:
        description: Timestamp for when instructions will be executed
        format: int64
        type: integer
      instructions:
        $ref: "#/definitions/SemanticPatchInstruction"
      notifyMemberIds:
        example:
          - memberId
          - memberId2
        items:
          type: string
        type: array
      operatingOnId:
        description: ID of scheduled change to edit or delete
        type: string
      requestorId:
        description: The id of the member that requested the change
        type: string
      reviewStatus:
        $ref: "#/definitions/ApprovalRequestReviewStatus"
      status:
        description: |
          | Name      | Description |
          | ---------:| ----------- |
          | pending   | the approval request has not been applied yet |
          | completed | the approval request has been applied successfully |
          | scheduled | the approval request for a scheduled change has been applied successfully |
          | failed    | the approval request has been applied but the changes were not applied successfully |
        enum:
          - pending
          - completed
          - scheduled
          - failed
        type: string
    type: object
  ApprovalRequestReview:
    properties:
      _id:
        $ref: "#/definitions/Id"
      creationDate:
        description: A unix epoch time in milliseconds specifying the date the approval request was reviewed
        type: integer
      kind:
        $ref: "#/definitions/ApprovalRequestReviewStatus"
      memberId:
        $ref: "#/definitions/Id"
    type: object
  ApprovalRequestReviewStatus:
    description: |
      | Name     | Description |
      | --------:| ----------- |
      | pending  | the approval request has not been reviewed yet |
      | approved | the approval request has been approved and can now be applied |
      | declined | the approval request has been declined and cannot be applied |
    enum:
      - pending
      - approved
      - declined
    type: string
  ApprovalRequests:
    properties:
      _links:
        $ref: "#/definitions/Links"
      items:
        items:
          $ref: "#/definitions/ApprovalRequest"
        type: array
    type: object
  AuditLogEntries:
    properties:
      _links:
        $ref: "#/definitions/Links"
      items:
        items:
          $ref: "#/definitions/AuditLogEntry"
        type: array
    type: object
  AuditLogEntry:
    properties:
      _id:
        $ref: "#/definitions/Id"
      _links:
        $ref: "#/definitions/Links"
      comment:
        example: This is a comment string
        type: string
      date:
        example: 1472243938774
        format: int64
        type: integer
      description:
        example: Changed the name from Test to Testing
        type: string
      kind:
        example: environment
        type: string
      member:
        $ref: "#/definitions/Member"
      name:
        example: Testing
        type: string
      shortDescription:
        example: '""'
        type: string
      target:
        properties:
          _links:
            $ref: "#/definitions/Links"
          name:
            example: Testing
            type: string
          resources:
            items:
              example: proj/alexis:env/test
              type: string
            type: array
        type: object
      title:
        example: "[Reese Applebaum](mailto:refapp@launchdarkly.com) changed the name of [Testing](https://app.launchdarkly.com/settings#/projects)"
        type: string
      titleVerb:
        example: changed the name of
        type: string
    type: object
  BigSegmentTargetChanges:
    properties:
      add:
        description: Users to add to this list of targets
        example:
          - user@launchdarkly.com
        items:
          type: string
        type: array
      remove:
        description: Users to remove from this list of targets
        example: []
        items:
          type: string
        type: array
    type: object
  Clause:
    properties:
      _id:
        type: string
      attribute:
        example: groups
        type: string
      negate:
        type: boolean
      op:
        example: in
        type: string
      values:
        items:
          example: Top Customers
          type: object
        type: array
    type: object
  ClientSideAvailability:
    properties:
      usingEnvironmentId:
        description: When set to true, this flag will be available to SDKs using the client-side id.
        type: boolean
      usingMobileKey:
        description: When set to true, this flag will be available to SDKS using a mobile key.
        type: boolean
    type: object
  CopyActions:
    enum:
      - updateOn
      - updatePrerequisites
      - updateTargets
      - updateRules
      - updateFallthrough
      - updateOffVariation
    example: []
    type: string
  CustomProperty:
    description: A name and value describing a custom property.
    properties:
      name:
        description: The name of the property.
        example: My property
        type: string
      value:
        description: Values for this property.
        items:
          example:
            - Value 1
            - Value 2
          type: string
        type: array
    required:
      - name
    type: object
  CustomPropertyValues:
    description: Values for this property.
    example:
      - Value 1
      - Value 2
    items:
      type: string
    type: array
  CustomRole:
    properties:
      _id:
        $ref: "#/definitions/Id"
      _links:
        $ref: "#/definitions/Links"
      description:
        description: Description of the custom role.
        example: Description of revenue team role here
        type: string
      key:
        description: The 20-hexdigit id or the key for a custom role.
        example: revenue-team
        type: string
      name:
        description: Name of the custom role.
        example: revenue team
        type: string
      policy:
        items:
          $ref: "#/definitions/Policy"
        type: array
    type: object
  CustomRoles:
    properties:
      _links:
        $ref: "#/definitions/Links"
      items:
        items:
          $ref: "#/definitions/CustomRole"
        type: array
    type: object
  Defaults:
    description: Default values to be used when a new environment is created.
    properties:
      offVariation:
        description: The index of the variation to be served when a flag is off.
        type: integer
      onVariation:
        description: The index of the variation to be served when a flag's targeting is on (default variation).
        type: integer
    required:
      - onVariation
      - offVariation
    type: object
  DependentFlag:
    properties:
      _links:
        properties:
          self:
            $ref: "#/definitions/Link"
        type: object
      _site:
        $ref: "#/definitions/Site"
      key:
        type: string
      name:
        type: string
    type: object
  DependentFlagEnvironment:
    properties:
      _links:
        properties:
          flagLink:
            $ref: "#/definitions/Link"
          self:
            $ref: "#/definitions/Link"
        type: object
      _site:
        $ref: "#/definitions/Site"
      key:
        type: string
      name:
        type: string
    type: object
  DependentFlagsByEnvironment:
    properties:
      _links:
        $ref: "#/definitions/DependentFlagsLinks"
      _site:
        $ref: "#/definitions/Site"
      items:
        items:
          $ref: "#/definitions/DependentFlag"
        type: array
    type: object
  DependentFlagsLinks:
    properties:
      parent:
        $ref: "#/definitions/Link"
      self:
        $ref: "#/definitions/Link"
    type: object
  Destination:
    properties:
      _id:
        description: Unique destination ID.
        example: 37ed9aad-de0a-4665-932e-41c35587aeea
        type: string
      _links:
        $ref: "#/definitions/Links"
      config:
        description: destination-specific configuration.
        example:
          project: cool-project
          topic: test
        type: object
      kind:
        description: Destination type ("google-pubsub", "kinesis", "mparticle", or "segment")
        enum:
          - google-pubsub
          - kinesis
          - mparticle
          - segment
        example: google-pubsub
        type: string
      name:
        description: The destination name
        example: Example Google Pub/Sub Destination
        type: string
      on:
        description: Whether the data export destination is on or not.
        example: true
        type: boolean
      version:
        example: 2
        type: integer
    type: object
  DestinationAmazonKinesis:
    properties:
      region:
        example: us-east-1
        type: string
      roleArn:
        example: arn:aws:iam::123456789012:role/marketingadmin
        type: string
      streamName:
        example: cat-stream
        type: string
    type: object
  DestinationGooglePubSub:
    properties:
      project:
        example: cool-project
        type: string
      topic:
        example: test
        type: string
    type: object
  DestinationMParticle:
    properties:
      apiKey:
        example: apiKeyfromMParticle
        type: string
      environment:
        example: production
        type: string
      secret:
        example: mParticleSecret
        type: string
      userIdentity:
        example: customer_id
        type: string
    type: object
  DestinationSegment:
    properties:
      writeKey:
        example: segmentWriteKey
        type: string
    type: object
  Destinations:
    properties:
      _links:
        $ref: "#/definitions/Links"
      items:
        items:
          $ref: "#/definitions/Destination"
        type: array
    type: object
  Environment:
    properties:
      _id:
        $ref: "#/definitions/Id"
      _links:
        $ref: "#/definitions/Links"
      apiKey:
        description: The SDK key for backend LaunchDarkly SDKs.
        example: XXX
        type: string
      approvalSettings:
        description: Approval settings for an environment. Only appears if the approvals feature is enabled.
        properties:
          canApplyDeclinedChanges:
            description: Whether changes can be applied as long as minNumApprovals is met, regardless of if any reviewers have declined a request.
            type: boolean
          canReviewOwnRequest:
            description: Whether requesters can approve or decline their own request. They may always comment.
            type: boolean
          minNumApprovals:
            description: The number of approvals required before an approval request can be applied.
            example: 2
            format: int64
            type: integer
          required:
            description: Whether any changes to flags in this environment will require approval. You may only set required or requiredApprovalTags, not both.
            type: boolean
          requiredApprovalTags:
            description: An array of tags used to specify which flags with those tags require approval. You may only set requiredApprovalTags or required, not both.
            items:
              type: string
            type: array
          serviceKind:
            description: The approvals system used.
            enum:
              - launchdarkly
              - service-now
            type: string
        type: object
      color:
        description: The swatch color for the environment.
        example: "417505"
        type: string
      confirmChanges:
        description: Determines if this environment requires confirmation for flag and segment changes.
        example: false
        type: boolean
      defaultTrackEvents:
        description: Set to true to send detailed event information for new flags.
        example: false
        type: boolean
      defaultTtl:
        description: The default TTL.
        example: 0
        type: number
      key:
        description: The key for the environment.
        example: production
        type: string
      mobileKey:
        description: The SDK key for mobile LaunchDarkly SDKs.
        example: XXX
        type: string
      name:
        description: The name of the environment.
        example: Production
        type: string
      requireComments:
        description: Determines if this environment requires comments for flag and segment changes.
        example: false
        type: boolean
      secureMode:
        description: Determines if this environment is in safe mode.
        example: false
        type: boolean
      tags:
        description: An array of tags for this environment.
        items:
          type: string
        type: array
    type: object
  EnvironmentPost:
    properties:
      color:
        description: A color swatch (as an RGB hex value with no leading '#', e.g. C8C8C8).
        example: "417505"
        type: string
      confirmChanges:
        description: Determines if this environment requires confirmation for flag and segment changes.
        example: false
        type: boolean
      defaultTrackEvents:
        description: Set to true to send detailed event information for newly created flags.
        example: false
        type: boolean
      defaultTtl:
        description: The default TTL for the new environment.
        example: 0
        type: number
      key:
        description: A project-unique key for the new environment.
        example: dev
        type: string
      name:
        description: The name of the new environment.
        example: Development
        type: string
      requireComments:
        description: Determines if this environment requires comments for flag and segment changes.
        example: false
        type: boolean
      secureMode:
        description: Determines whether the environment is in secure mode.
        example: false
        type: boolean
      tags:
        description: An array of tags for this environment.
        example:
          - tag1
          - tag2
        items:
          type: string
        type: array
    required:
      - name
      - key
      - color
    type: object
  EvaluationUsageError:
    properties:
      code:
        example: not_found
        type: string
      message:
        example: unknown environment
        type: string
    type: object
  Events:
    properties:
      links:
        $ref: "#/definitions/UsageLinks"
    type: object
  Fallthrough:
    properties:
      rollout:
        $ref: "#/definitions/Rollout"
      variation:
        type: integer
    type: object
  FeatureFlag:
    properties:
      _links:
        $ref: "#/definitions/Links"
      _maintainer:
        $ref: "#/definitions/Member"
      _version:
        example: 23
        type: integer
      archived:
        description: Whether or not this flag is archived.
        example: false
        type: boolean
      archivedDate:
        description: A unix epoch time in milliseconds specifying the archived time of this flag.
        example: 1443652232590
        format: int64
        type: integer
      clientSideAvailability:
        $ref: "#/definitions/ClientSideAvailability"
      creationDate:
        description: A unix epoch time in milliseconds specifying the creation time of this flag.
        example: 1443652232590
        format: int64
        type: integer
      customProperties:
        additionalProperties:
          $ref: "#/definitions/CustomProperty"
        description: A mapping of keys to CustomProperty entries.
        example:
          bugs:
            name: Issue tracker ids
            value:
              - "123"
              - "456"
          deprecated:
            name: Deprecated Date
            value: []
        type: object
      defaults:
        $ref: "#/definitions/Defaults"
      description:
        description: Description of the feature flag.
        example: This flag controls whether test feature is turned on or not.
        type: string
      environments:
        additionalProperties:
          $ref: "#/definitions/FeatureFlagConfig"
        type: object
      goalIds:
        description: An array goals from all environments associated with this feature flag
        example:
          - d7239405bd89c930e885aa76
          - 405bc930e88d7239d895aa76
        items:
          type: string
        type: array
      includeInSnippet:
        example: false
        type: boolean
      key:
        example: test-feature
        type: string
      kind:
        description: Whether the feature flag is a boolean flag or multivariate.
        example: boolean
        type: string
      maintainerId:
        description: The ID of the member that should maintain this flag.
        example: 561c579cd8fd5c2704000001
        type: string
      name:
        description: Name of the feature flag.
        example: Test Feature
        type: string
      tags:
        description: An array of tags for this feature flag.
        example: []
        items:
          type: string
        type: array
      temporary:
        description: Whether or not this flag is temporary.
        example: false
        type: boolean
      variations:
        description: The variations for this feature flag.
        example:
          - value: a
          - value: b
        items:
          $ref: "#/definitions/Variation"
        type: array
    type: object
  FeatureFlagConfig:
    properties:
      _environmentName:
        type: string
      _site:
        $ref: "#/definitions/Site"
      archived:
        type: boolean
      fallthrough:
        $ref: "#/definitions/Fallthrough"
      lastModified:
        example: 1469326565348
        format: int64
        type: integer
      offVariation:
        type: integer
      on:
        type: boolean
      prerequisites:
        items:
          $ref: "#/definitions/Prerequisite"
        type: array
      rules:
        items:
          $ref: "#/definitions/Rule"
        type: array
      salt:
        example: YWx0ZXJuYXRlLnBhZ2U=
        type: string
      sel:
        example: 45501b9314dc4641841af774cb038b96
        type: string
      targets:
        items:
          $ref: "#/definitions/Target"
        type: array
      trackEvents:
        description: Set to true to send detailed event information for this flag.
        example: false
        type: boolean
      trackEventsFallthrough:
        description: Set to true to send detailed event information when targeting is enabled but no individual targeting rule is matched.
        example: true
        type: boolean
      version:
        example: 65
        type: integer
    type: object
  FeatureFlagCopyObject:
    properties:
      currentVersion:
        description: If the latest version of the flag matches provided version it will copy, otherwise it will return a conflict.
        example: 65
        type: integer
      key:
        description: The environment key to be used.
        example: staging
        type: string
    required:
      - key
    type: object
  FeatureFlagScheduledChange:
    properties:
      _id:
        type: string
      _version:
        type: integer
      executionDate:
        description: A unix epoch time in milliseconds specifying the date the scheduled changes will be applied
        type: integer
      instructions:
        $ref: "#/definitions/SemanticPatchInstruction"
    type: object
  FeatureFlagScheduledChanges:
    properties:
      _links:
        $ref: "#/definitions/Links"
      items:
        items:
          $ref: "#/definitions/FeatureFlagScheduledChange"
        type: array
    type: object
  FeatureFlagScheduledChangesConflicts:
    properties:
      instructions:
        items:
          properties:
            conflicts:
              items:
                $ref: "#/definitions/ScheduledChangesFeatureFlagConflict"
              type: array
            kind:
              description: The name of the modification you would like to perform on a resource.
              example: removeUserTargets
              type: string
        type: array
    type: object
  FeatureFlagStatus:
    properties:
      _links:
        $ref: "#/definitions/FeatureFlagStatusLinks"
      default:
        type: object
      lastRequested:
        example: 2016-08-16T21:10:11.886Z
        type: string
      name:
        description: |
          | Name     | Description |
          | --------:| ----------- |
          | new      | the feature flag was created within the last 7 days, and has not been requested yet |
          | active   | the feature flag was requested by your servers or clients within the last 7 days |
          | inactive | the feature flag was created more than 7 days ago, and hasn't been requested by your servers or clients within the past 7 days |
          | launched | one variation of the feature flag has been rolled out to all your users for at least 7 days |
        enum:
          - new
          - active
          - inactive
          - launched
        type: string
    type: object
  FeatureFlagStatusAcrossEnvironments:
    properties:
      _links:
        $ref: "#/definitions/FeatureFlagStatusLinks"
      environments:
        additionalProperties:
          $ref: "#/definitions/FeatureFlagStatusForQueriedEnvironment"
        type: object
      key:
        type: string
    type: object
  FeatureFlagStatusForQueriedEnvironment:
    properties:
      default:
        type: object
      lastRequested:
        example: 2016-08-16T21:10:11.886Z
        type: string
      name:
        description: |
          | Name     | Description |
          | --------:| ----------- |
          | new      | the feature flag was created within the last 7 days, and has not been requested yet |
          | active   | the feature flag was requested by your servers or clients within the last 7 days |
          | inactive | the feature flag was created more than 7 days ago, and hasn't been requested by your servers or clients within the past 7 days |
          | launched | one variation of the feature flag has been rolled out to all your users for at least 7 days |
        enum:
          - new
          - active
          - inactive
          - launched
        type: string
    type: object
  FeatureFlagStatusLinks:
    properties:
      parent:
        $ref: "#/definitions/Link"
      self:
        $ref: "#/definitions/Link"
    type: object
  FeatureFlagStatuses:
    properties:
      _links:
        $ref: "#/definitions/FeatureFlagStatusLinks"
      items:
        items:
          $ref: "#/definitions/FeatureFlagStatus"
        type: array
    type: object
  FeatureFlags:
    properties:
      _links:
        $ref: "#/definitions/Links"
      items:
        items:
          $ref: "#/definitions/FeatureFlag"
        type: array
      totalCount:
        type: number
    type: object
  FlagListItem:
    properties:
      _links:
        $ref: "#/definitions/Links"
      _site:
        $ref: "#/definitions/Site"
      key:
        type: string
      name:
        type: string
    type: object
  HierarchicalLinks:
    properties:
      parent:
        $ref: "#/definitions/Link"
      self:
        $ref: "#/definitions/Link"
    type: object
  Id:
    description: The unique resource id.
    example: 5a580a01b4ff89217bdf9dc1
    type: string
  Integration:
    properties:
      _links:
        properties:
          self:
            $ref: "#/definitions/Link"
        type: object
      items:
        items:
          $ref: "#/definitions/IntegrationSubscription"
        type: array
    type: object
  IntegrationSubscription:
    properties:
      _id:
        $ref: "#/definitions/Id"
      _links:
        $ref: "#/definitions/HierarchicalLinks"
      _status:
        properties:
          errorCount:
            example: 2
            type: integer
          lastSuccess:
            description: A unix epoch time in milliseconds specifying the last time this integration was successfully used.
            example: 1443652232590
            format: int64
            type: integer
          successCount:
            example: 6
            type: integer
        type: object
      config:
        description: A key-value mapping of configuration fields.
        example:
          apiKey: 582**************************116
          hostURL: https://api.datadoghq.com
        type: object
      kind:
        description: The type of integration associated with this configuration.
        example: datadog
        type: string
      name:
        description: The user-defined name associated with this configuration.
        example: V2
        type: string
      on:
        description: Whether or not the integration is currently active.
        example: true
        type: boolean
      statements:
        items:
          $ref: "#/definitions/Statement"
        type: array
      tags:
        description: An array of tags for this integration configuration.
        items:
          type: string
        type: array
    type: object
  Integrations:
    properties:
      _links:
        description: A mapping of integration types to their respective API endpoints.
        example:
          appdynamics:
            href: /api/v2/integrations/appdynamics
            type: application/json
          splunk:
            href: /api/v2/integrations/splunk
            type: application/json
        type: object
      items:
        items:
          $ref: "#/definitions/IntegrationSubscription"
          type: object
        type: array
    type: object
  Link:
    properties:
      href:
        example: /api/v2/endpoint
        type: string
      type:
        example: application/json
        type: string
    type: object
  Links:
    properties:
      next:
        $ref: "#/definitions/Link"
      self:
        $ref: "#/definitions/Link"
    type: object
  MAU:
    properties:
      _links:
        $ref: "#/definitions/UsageLinks"
      metadata:
        items:
          $ref: "#/definitions/StreamBySDKLinksMetadata"
        type: array
      series:
        items:
          $ref: "#/definitions/StreamUsageSeries"
        type: array
    type: object
  MAUMetadata:
    type: object
  MAUbyCategory:
    properties:
      _links:
        $ref: "#/definitions/StreamBySDKLinks"
      metadata:
        items:
          $ref: "#/definitions/MAUMetadata"
        type: array
      series:
        items:
          $ref: "#/definitions/StreamUsageSeries"
        type: array
    type: object
  Member:
    properties:
      _id:
        $ref: "#/definitions/Id"
      _lastSeen:
        description: A unix epoch time in milliseconds specifying the last time this member was active in LaunchDarkly.
        example: 1469326565348
        format: int64
        type: integer
      _lastSeenMetadata:
        properties:
          tokenId:
            description: If the last time this member accessed LaunchDarkly was using the REST API, this value will be set to the ID of the personal access token used.
            example: 5fd2a1ee05600316d5cb3e96
            type: string
        type: object
      _links:
        $ref: "#/definitions/Links"
      _pendingInvite:
        type: boolean
      _verified:
        type: boolean
      customRoles:
        items:
          $ref: "#/definitions/Id"
        type: array
      email:
        example: user@launchdarkly.com
        type: string
      firstName:
        example: Alan
        type: string
      isBeta:
        type: boolean
      lastName:
        example: Turing
        type: string
      role:
        $ref: "#/definitions/Role"
    type: object
  Members:
    properties:
      _links:
        $ref: "#/definitions/Links"
      items:
        items:
          $ref: "#/definitions/Member"
        type: array
      totalCount:
        type: number
    type: object
  MultiEnvironmentDependentFlag:
    properties:
      _links:
        $ref: "#/definitions/DependentFlagsLinks"
      _site:
        $ref: "#/definitions/Site"
      environments:
        items:
          $ref: "#/definitions/DependentFlagEnvironment"
        type: array
      key:
        type: string
      name:
        type: string
    type: object
  MultiEnvironmentDependentFlags:
    properties:
      _links:
        $ref: "#/definitions/DependentFlagsLinks"
      _site:
        $ref: "#/definitions/Site"
      items:
        items:
          $ref: "#/definitions/MultiEnvironmentDependentFlag"
        type: array
    type: object
  PatchOperation:
    properties:
      op:
        example: replace
        type: string
      path:
        example: /name
        type: string
      value:
        example: My resource name
        type: object
    required:
      - op
      - path
      - value
    type: object
  Policy:
    properties:
      actions:
        items:
          description: An action to perform on a resource.
          example: updateOn
          type: string
        type: array
      effect:
        description: Effect of the policy - allow or deny.
        example: deny
        type: string
      notActions:
        description: Targeted actions will be those actions NOT in this list. The "actions" field must be empty to use this field.
        items:
          description: An action to perform on a resource.
          example: updateOn
          type: string
        type: array
      notResources:
        description: Targeted resource will be those resources NOT in this list. The "resources`" field must be empty to use this field.
        items:
          description: A resource specifier string
          example: proj/*:env/*:flag/my-flag
          type: string
        type: array
      resources:
        items:
          description: A resource specifier string
          example: proj/*:env/*:flag/my-flag
          type: string
        type: array
    type: object
  Prerequisite:
    properties:
      key:
        type: string
      variation:
        type: integer
    type: object
  Project:
    properties:
      _id:
        $ref: "#/definitions/Id"
      _links:
        $ref: "#/definitions/Links"
      defaultClientSideAvailability:
        $ref: "#/definitions/ClientSideAvailability"
      environments:
        items:
          $ref: "#/definitions/Environment"
        type: array
      includeInSnippetByDefault:
        example: true
        type: boolean
      key:
        example: zentasks
        type: string
      name:
        example: Zentasks
        type: string
      tags:
        description: An array of tags for this project.
        items:
          type: string
        type: array
    type: object
  Projects:
    properties:
      _links:
        $ref: "#/definitions/Links"
      items:
        items:
          $ref: "#/definitions/Project"
        type: array
    type: object
  RelayProxyConfig:
    properties:
      _creator:
        $ref: "#/definitions/Member"
      _id:
        $ref: "#/definitions/Id"
      creationDate:
        description: A unix epoch time in milliseconds specifying the creation time of this relay proxy configuration
        example: 1443652232590
        format: int64
        type: integer
      displayKey:
        description: The last 4 digits of the unique secret key for this relay proxy configuration
        example: 66eo
        type: string
      fullKey:
        description: Full secret key. Only included if creating or resetting the relay proxy configuration
        example: rel-8a3a773d-b75e-48eb-a850-492cda9266eo
        type: string
      lastModified:
        description: A unix epoch time in milliseconds specifying the last time this relay proxy configuration was modified
        example: 1469326565348
        format: int64
        type: integer
      name:
        description: A human-friendly name for the relay proxy configuration
        example: My relay proxy config
        type: string
      policy:
        items:
          $ref: "#/definitions/Policy"
        type: array
    required:
      - _id
      - _creator
      - name
      - policy
      - displayKey
      - creationDate
      - lastModified
    type: object
  RelayProxyConfigs:
    properties:
      items:
        items:
          $ref: "#/definitions/RelayProxyConfig"
        type: array
    type: object
  Role:
    enum:
      - writer
      - reader
      - admin
      - owner
    type: string
  Rollout:
    properties:
      bucketBy:
        type: string
      variations:
        items:
          $ref: "#/definitions/WeightedVariation"
        type: array
    type: object
  Rule:
    properties:
      _id:
        type: string
      clauses:
        items:
          $ref: "#/definitions/Clause"
        type: array
      description:
        type: string
      rollout:
        $ref: "#/definitions/Rollout"
      trackEvents:
        type: boolean
      variation:
        type: integer
    type: object
  ScheduledChangesFeatureFlagConflict:
    properties:
      _id:
        description: Feature flag scheduled change id this change will conflict with
        type: string
      reason:
        description: Feature flag scheduled change conflict reason
        type: string
    type: object
  SemanticPatchInstruction:
    items:
      properties:
        kind:
          description: The name of the modification you would like to perform on a resource.
          example: removeUserTargets
          type: string
    type: array
  SemanticPatchOperation:
    properties:
      comment:
        example: This is a comment string
        type: string
      instructions:
        $ref: "#/definitions/SemanticPatchInstruction"
    required:
      - instructions
    type: object
  Site:
    properties:
      href:
        example: /features/sort.order
        type: string
      type:
        example: text/html
        type: string
    type: object
  Statement:
    properties:
      actions:
        items:
          description: An action to perform on a resource.
          example: updateOn
          type: string
        type: array
      effect:
        enum:
          - allow
          - deny
        type: string
      notActions:
        description: Targeted actions will be those actions NOT in this list. The "actions" field must be empty to use this field.
        items:
          description: An action to perform on a resource.
          example: updateOn
          type: string
        type: array
      notResources:
        description: Targeted resource will be those resources NOT in this list. The "resources`" field must be empty to use this field.
        items:
          description: A resource specifier string
          example: proj/*:env/*:flag/my-flag
          type: string
        type: array
      resources:
        items:
          description: A resource specifier string
          example: proj/*:env/*:flag/my-flag
          type: string
        type: array
    type: object
  Stream:
    properties:
      _links:
        $ref: "#/definitions/StreamUsageLinks"
      metadata:
        items:
          $ref: "#/definitions/StreamUsageMetadata"
        type: array
      series:
        items:
          $ref: "#/definitions/StreamUsageSeries"
        type: array
    type: object
  StreamBySDK:
    properties:
      _links:
        $ref: "#/definitions/StreamBySDKLinks"
      metadata:
        items:
          $ref: "#/definitions/StreamBySDKLinksMetadata"
        type: array
      series:
        items:
          $ref: "#/definitions/StreamUsageSeries"
        type: array
    type: object
  StreamBySDKLinks:
    properties:
      parent:
        $ref: "#/definitions/Link"
      self:
        $ref: "#/definitions/Link"
    type: object
  StreamBySDKLinksMetadata:
    properties:
      sdk:
        example: ruby
        type: string
      source:
        example: server
        type: string
      version:
        example: 5.4.3
        type: string
    type: object
  StreamLinks:
    properties:
      parent:
        $ref: "#/definitions/Link"
      self:
        $ref: "#/definitions/Link"
      subseries:
        description: Links to endpoints that are in the request path.
        items:
          $ref: "#/definitions/Link"
        type: array
    type: object
  StreamSDKVersion:
    properties:
      _links:
        $ref: "#/definitions/StreamBySDKLinks"
      sdkVersions:
        items:
          $ref: "#/definitions/StreamSDKVersionData"
        type: array
    type: object
  StreamSDKVersionData:
    properties:
      sdk:
        description: The language of the sdk
        example: ruby
        type: string
      version:
        description: The version of the sdk
        example: 5.4.3
        type: string
    type: object
  StreamUsageError:
    properties:
      code:
        example: not_found
        type: string
      message:
        example: Stream source not found
        type: string
    type: object
  StreamUsageLinks:
    properties:
      parent:
        $ref: "#/definitions/Link"
      self:
        $ref: "#/definitions/Link"
      subseries:
        description: The following links that are in the response.
        items:
          $ref: "#/definitions/Link"
        type: array
    type: object
  StreamUsageMetadata:
    properties:
      sdk:
        description: The language of the sdk
        example: ruby
        type: string
      source:
        example: server
        type: string
      version:
        description: The version of the SDK
        example: 5.4.3
        type: string
    type: object
  StreamUsageSeries:
    properties:
      "0":
        description: A key corresponding to a time series data point.
        example: 0
        format: int64
        type: integer
      time:
        description: A unix epoch time in milliseconds specifying the creation time of this flag.
        example: 1551740400000
        format: int64
        type: integer
    type: object
  Streams:
    properties:
      _links:
        $ref: "#/definitions/StreamUsageLinks"
    type: object
  Target:
    properties:
      values:
        items:
          example: '"1461797806427-7-115540266", "00142875-a39d-4028-a3b7-987ccd151649"'
          type: string
        type: array
      variation:
        type: integer
    type: object
  Token:
    properties:
      _id:
        $ref: "#/definitions/Id"
      _links:
        $ref: "#/definitions/Links"
      _member:
        $ref: "#/definitions/Member"
      creationDate:
        description: A unix epoch time in milliseconds specifying the creation time of this access token.
        example: 1443652232590
        format: int64
        type: integer
      customRoleIds:
        description: A list of custom role IDs to use as access limits for the access token
        items:
          type: string
        type: array
      defaultApiVersion:
        description: The default API version for this token
        type: integer
      inlineRole:
        items:
          $ref: "#/definitions/Statement"
        type: array
      lastModified:
        description: A unix epoch time in milliseconds specifying the last time this access token was modified.
        example: 1469326565348
        format: int64
        type: integer
      lastUsed:
        description: A unix epoch time in milliseconds specifying the last time this access token was used to authorize access to the LaunchDarkly REST API.
        example: 1469326565348
        format: int64
        type: integer
      memberId:
        $ref: "#/definitions/Id"
      name:
        description: A human-friendly name for the access token
        example: My access token
        type: string
      ownerId:
        $ref: "#/definitions/Id"
      role:
        description: The name of a built-in role for the token
        example: writer
        type: string
      serviceToken:
        description: Whether the token will be a service token https://docs.launchdarkly.com/home/account-security/api-access-tokens#service-tokens
        type: boolean
      token:
        description: The last 4 digits of the unique secret key for this access token. If creating or resetting the token, this will be the full token secret.
        example: "3243"
        type: string
    type: object
  Tokens:
    properties:
      _links:
        $ref: "#/definitions/Links"
      items:
        items:
          $ref: "#/definitions/Token"
        type: array
    type: object
  Usage:
    properties:
      _links:
        $ref: "#/definitions/UsageLinks"
      series:
        items:
          $ref: "#/definitions/StreamUsageSeries"
        type: array
    type: object
  UsageError:
    properties:
      message:
        example: This is a beta API, you must pass beta in the LD-API-Version header to use it.
        type: string
    type: object
  UsageLinks:
    properties:
      parent:
        $ref: "#/definitions/Link"
      self:
        $ref: "#/definitions/Link"
      subseries:
        description: The following links that are in the response.
        items:
          $ref: "#/definitions/Link"
        type: array
    type: object
  User:
    properties:
      anonymous:
        type: boolean
      avatar:
        type: string
      country:
        type: string
      custom:
        example:
          company: example.com
        type: object
      email:
        type: string
      firstName:
        type: string
      ip:
        type: string
      key:
        example: a00bea
        type: string
      lastName:
        type: string
      name:
        example: Bob Loblaw
        type: string
      secondary:
        type: string
    type: object
  UserFlagSetting:
    properties:
      _links:
        $ref: "#/definitions/Links"
      _value:
        description: The most important attribute in the response. The _value is the current setting for the user. For a boolean feature toggle, this will be true, false, or null if there is no defined fallthrough value.
        example: true
        type: boolean
      setting:
        description: The setting attribute indicates whether you've explicitly targeted this user to receive a particular variation. For example, if you have explicitly turned off a feature toggle for a user, setting will be false. A setting of null means that you haven't assigned that user to a specific variation.
        example: null
        type: boolean
    type: object
  UserFlagSettings:
    properties:
      _links:
        $ref: "#/definitions/Links"
      items:
        additionalProperties:
          $ref: "#/definitions/UserFlagSetting"
        example:
          alternate.page:
            _links:
              self:
                href: /api/v2/users/lacuna/production/Abbie_Braun/flags/alternate.page
                type: application/json
            _value: false,
            setting: null
          sort.order:
            _links:
              _value: true
              self:
                href: /api/v2/users/lacuna/production/Abbie_Braun/flags/sort.order
                type: application/json
              setting: null
        type: object
    type: object
  UserRecord:
    properties:
      avatar:
        example: https://s3.amazonaws.com/uifaces/faces/twitter/shylockjoy/73.jpg
        type: string
      environmentId:
        example: 54ac2d97de674204ddd61096
        type: string
      lastPing:
        example: 2015-03-03T02:37:22.492Z
        type: string
      ownerId:
        $ref: "#/definitions/Id"
      user:
        $ref: "#/definitions/User"
    type: object
  UserSegment:
    properties:
      _flags:
        items:
          $ref: "#/definitions/FlagListItem"
        readOnly: true
        type: array
      _links:
        $ref: "#/definitions/Links"
      creationDate:
        description: A unix epoch time in milliseconds specifying the creation time of this flag.
        example: 1443652232590
        format: int64
        type: integer
      description:
        description: Description of the user segment.
        example: Users in this segment can access beta features.
        type: string
      excluded:
        description: An array of user keys that should not be included in this segment, unless they are also listed in "included".
        items:
          type: string
        type: array
      included:
        description: An array of user keys that are included in this segment.
        items:
          type: string
        type: array
      key:
        description: Unique identifier for the user segment.
        example: beta-testers
        type: string
      name:
        description: Name of the user segment.
        example: Beta Testers
        type: string
      rules:
        description: An array of rules that can cause a user to be included in this segment.
        items:
          $ref: "#/definitions/UserSegmentRule"
        type: array
      tags:
        description: An array of tags for this user segment.
        example:
          - dev
          - ops
        items:
          type: string
        type: array
      unbounded:
        description: Controls whether this is considered a "big segment" which can support an unlimited numbers of users. Include/exclude lists sent with this payload are not used in big segments. Contact your account manager for early access to this feature.
        example: false
        type: boolean
      version:
        type: integer
    required:
      - key
      - name
      - creationDate
    type: object
  UserSegmentRule:
    properties:
      bucketBy:
        type: string
      clauses:
        items:
          $ref: "#/definitions/Clause"
        type: array
      weight:
        type: integer
    type: object
  UserSegments:
    properties:
      _links:
        $ref: "#/definitions/Links"
      items:
        items:
          $ref: "#/definitions/UserSegment"
        type: array
    type: object
  UserTargetingExpirationForFlag:
    properties:
      _id:
        type: string
      _links:
        $ref: "#/definitions/Links"
      _resourceId:
        $ref: "#/definitions/UserTargetingExpirationResourceIdForFlag"
      _version:
        type: integer
      expirationDate:
        description: Unix epoch time in milliseconds specifying the expiration date
        example: 1735689600000
        format: int64
        type: integer
      userKey:
        description: Unique identifier for the user
        type: string
      variationId:
        description: the ID of the variation that the user is targeted on a flag
        type: string
    type: object
  UserTargetingExpirationForFlags:
    properties:
      _links:
        $ref: "#/definitions/Links"
      items:
        items:
          $ref: "#/definitions/UserTargetingExpirationForFlag"
        type: array
    type: object
  UserTargetingExpirationForSegment:
    properties:
      _id:
        type: string
      _links:
        $ref: "#/definitions/Links"
      _resourceId:
        $ref: "#/definitions/UserTargetingExpirationResourceIdForFlag"
      _version:
        type: integer
      expirationDate:
        description: Unix epoch time in milliseconds specifying the expiration date
        example: 1735689600000
        format: int64
        type: integer
      targetType:
        description: either the included or excluded variation that the user is targeted on a segment
        type: string
      userKey:
        description: Unique identifier for the user
        type: string
    type: object
  UserTargetingExpirationOnFlagsForUser:
    properties:
      _links:
        $ref: "#/definitions/Links"
      items:
        items:
          $ref: "#/definitions/UserTargetingExpirationForFlag"
        type: array
    type: object
  UserTargetingExpirationResourceIdForFlag:
    properties:
      environmentKey:
        type: string
      flagKey:
        type: string
      key:
        type: string
      kind:
        type: string
      projectKey:
        type: string
    type: object
  Users:
    properties:
      _links:
        $ref: "#/definitions/Links"
      items:
        items:
          $ref: "#/definitions/UserRecord"
        type: array
      totalCount:
        example: 3
        type: number
    type: object
  Variation:
    properties:
      _id:
        example: 24b32dd3-0ba6-46ee-86af-230eebf3c7cb
        type: string
      description:
        example: The true variation
        type: string
      name:
        example: "True"
        type: string
      value:
        type: object
    required:
      - value
    type: object
  Webhook:
    properties:
      _id:
        $ref: "#/definitions/Id"
      _links:
        $ref: "#/definitions/Links"
      name:
        description: The name of the webhook.
        example: Example hook
        type: string
      on:
        description: Whether this webhook is enabled or not.
        example: true
        type: boolean
      secret:
        description: If defined, the webhooks post request will include a X-LD-Signature header whose value will contain an HMAC SHA256 hex digest of the webhook payload, using the secret as the key.
        example: frobozz
        type: string
      statements:
        items:
          $ref: "#/definitions/Statement"
        type: array
      tags:
        description: Tags assigned to this webhook.
        items:
          example: []
          type: string
        type: array
      url:
        description: The URL of the remote webhook.
        example: https://example.com/example
        type: string
    type: object
  Webhooks:
    properties:
      _links:
        $ref: "#/definitions/Links"
      items:
        items:
          $ref: "#/definitions/Webhook"
        type: array
    type: object
  WeightedVariation:
    properties:
      variation:
        type: integer
      weight:
        type: integer
    type: object
