LaunchDarkly Adaptive triggers API

Adaptive triggers automatically update the targeting of a feature flag or AgentControl config when a trigger source, such as an observability alert, fires. Each adaptive trigger pairs a trigger source with a task that describes the change to make, such as updating the variation served by the default rule or by a specific targeting rule. Using the adaptive triggers API, you can create, read, update, enable, disable, and delete adaptive triggers.

Operations 7

GET /api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers List adaptive triggers #
POST /api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers Create an adaptive trigger #
DELETE /api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers/{triggerID} Delete an adaptive trigger #
GET /api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers/{triggerID} Get an adaptive trigger #
PATCH /api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers/{triggerID} Update an adaptive trigger #
POST /api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers/{triggerID}/enable Enable an adaptive trigger #
POST /api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers/{triggerID}/disable Disable an adaptive trigger #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/launchdarkly:launchdarkly-adaptive-triggers-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

launchdarkly-adaptive-triggers-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: LaunchDarkly REST Adaptive triggers API
  description: 'This documentation describes LaunchDarkly''s REST API. To access the complete OpenAPI spec directly, use Get OpenAPI spec. To learn how to use LaunchDarkly using the user interface (UI) instead, read our product documentation. ## Authentication


    LaunchDarkly''s REST API uses the HTTPS protocol with a minimum TLS version of 1.2. All REST API resources are authenticated with either personal or service access tokens, or session cookies. Other authentication mechanisms are not supported. You can manage personal access tokens on your **Authorization** page in the LaunchDarkly UI. LaunchDarkly also has SDK keys, mobile keys, and client-side IDs that are used by our server-side SDKs, mobile SDKs, and JavaScript-based SDKs, respectively. **These keys cannot be used to access our REST API**. These keys are environment-specific, and can only perform read-only operations such as fetching feature flag settings. | Auth mechanism | Allowed resources | Use cases |

    | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------- |

    | Personal or service access tokens | Can be customized on a per-token basis | Building scripts, custom integrations, data export. |

    | SDK keys | Can only access read-only resources specific to server-side SDKs. Restricted to a single environment. | Server-side SDKs |

    | Mobile keys | Can only access read-only resources specific to mobile SDKs, and only for flags marked available to mobile keys. Restricted to a single environment. | Mobile SDKs |

    | Client-side ID | Can only access read-only resources specific to JavaScript-based client-side SDKs, and only for flags marked available to client-side. Restricted to a single environment. | Client-side JavaScript |


    > #### Keep your access tokens and SDK keys private

    >

    > Access tokens should _never_ be exposed in untrusted contexts. Never put an access token in client-side JavaScript, or embed it in a mobile application. LaunchDarkly has special mobile keys that you can embed in mobile apps. If you accidentally expose an access token or SDK key, you can reset it from your **Authorization** page. >

    > The client-side ID is safe to embed in untrusted contexts. It''s designed for use in client-side JavaScript. ### Authentication using request header


    The preferred way to authenticate with the API is by adding an `Authorization` header containing your access token to your requests. The value of the `Authorization` header must be your access token. Manage personal access tokens from the **Authorization** page. ### Authentication using session cookie


    For testing purposes, you can make API calls directly from your web browser. If you are logged in to the LaunchDarkly application, the API will use your existing session to authenticate calls. Depending on the permissions granted as part of your role, you may not have permission to perform some API calls. You will receive a `401` response code in that case. > ### Modifying the Origin header causes an error

    >

    > LaunchDarkly validates that the Origin header for any API request authenticated by a session cookie matches the expected Origin header. The expected Origin header is `https://app.launchdarkly.com`. >

    > If the Origin header does not match what''s expected, LaunchDarkly returns an error. This error can prevent the LaunchDarkly app from working correctly. >

    > Any browser extension that intentionally changes the Origin header can cause this problem. For example, Cross-Origin Resource Sharing (CORS) extensions used during development can modify the Origin header and cause the app to fail. >

    > To prevent this error, do not modify your Origin header. >

    > LaunchDarkly does not require origin matching when authenticating with an access token, so this issue does not affect normal API usage.'
  contact:
    name: LaunchDarkly Technical Support Team
    url: https://support.launchdarkly.com
    email: support@launchdarkly.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  version: '2.0'
servers:
- url: https://app.launchdarkly.com
  description: ' Default'
- url: https://app.launchdarkly.us
  description: ' Federal'
security:
- ApiKey:
  - read
  - write
tags:
- name: Adaptive triggers
  description: 'Adaptive triggers automatically update the targeting of a feature flag or AgentControl config when a trigger source, such as an observability alert, fires. Each adaptive trigger pairs a trigger source with a task that describes the change to make, such as updating the variation served by the default rule or by a specific targeting rule.


    Using the adaptive triggers API, you can create, read, update, enable, disable, and delete adaptive triggers.'
paths:
  /api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers:
    get:
      description: List all adaptive triggers for a resource.
      operationId: listAdaptiveTriggers
      parameters:
      - explode: false
        in: path
        name: projectKey
        required: true
        schema:
          type: string
        style: simple
      - explode: false
        in: path
        name: environmentKey
        required: true
        schema:
          type: string
        style: simple
      - explode: true
        in: query
        name: resourceKind
        required: true
        schema:
          $ref: '#/components/schemas/AdaptiveTriggerResourceKind'
        style: form
      - explode: true
        in: query
        name: resourceKey
        required: true
        schema:
          type: string
        style: form
      - description: The number of items to return.
        explode: true
        in: query
        name: limit
        required: false
        schema:
          default: 25
          maximum: 50
          minimum: 1
          type: integer
        style: form
      - description: Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`.
        explode: true
        in: query
        name: offset
        required: false
        schema:
          default: 0
          minimum: 0
          type: integer
        style: form
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdaptiveTriggers'
          description: Adaptive Triggers list
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Rate Limited
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal server error
      summary: List adaptive triggers
      tags:
      - Adaptive triggers
    post:
      description: Create a new adaptive trigger for a resource.
      operationId: postAdaptiveTrigger
      parameters:
      - explode: false
        in: path
        name: projectKey
        required: true
        schema:
          type: string
        style: simple
      - explode: false
        in: path
        name: environmentKey
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAdaptiveTriggerRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdaptiveTrigger'
          description: Adaptive Trigger created
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Not found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Conflict
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Rate Limited
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal server error
      summary: Create an adaptive trigger
      tags:
      - Adaptive triggers
  /api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers/{triggerID}:
    delete:
      description: Delete a single adaptive trigger.
      operationId: deleteAdaptiveTrigger
      parameters:
      - explode: false
        in: path
        name: projectKey
        required: true
        schema:
          type: string
        style: simple
      - explode: false
        in: path
        name: environmentKey
        required: true
        schema:
          type: string
        style: simple
      - explode: false
        in: path
        name: triggerID
        required: true
        schema:
          format: uuid
          type: string
        style: simple
      responses:
        '204':
          description: No content
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Rate Limited
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal server error
      summary: Delete an adaptive trigger
      tags:
      - Adaptive triggers
    get:
      description: Get a single adaptive trigger.
      operationId: getAdaptiveTrigger
      parameters:
      - explode: false
        in: path
        name: projectKey
        required: true
        schema:
          type: string
        style: simple
      - explode: false
        in: path
        name: environmentKey
        required: true
        schema:
          type: string
        style: simple
      - explode: false
        in: path
        name: triggerID
        required: true
        schema:
          format: uuid
          type: string
        style: simple
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdaptiveTrigger'
          description: Trigger
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Rate Limited
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal server error
      summary: Get an adaptive trigger
      tags:
      - Adaptive triggers
    patch:
      description: Update a single adaptive trigger.
      operationId: patchAdaptiveTrigger
      parameters:
      - explode: false
        in: path
        name: projectKey
        required: true
        schema:
          type: string
        style: simple
      - explode: false
        in: path
        name: environmentKey
        required: true
        schema:
          type: string
        style: simple
      - explode: false
        in: path
        name: triggerID
        required: true
        schema:
          format: uuid
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAdaptiveTriggerRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdaptiveTrigger'
          description: Adaptive Trigger updated
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Rate Limited
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal server error
      summary: Update an adaptive trigger
      tags:
      - Adaptive triggers
  /api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers/{triggerID}/enable:
    post:
      description: Enable an adaptive trigger.
      operationId: postEnableAdaptiveTrigger
      parameters:
      - explode: false
        in: path
        name: projectKey
        required: true
        schema:
          type: string
        style: simple
      - explode: false
        in: path
        name: environmentKey
        required: true
        schema:
          type: string
        style: simple
      - explode: false
        in: path
        name: triggerID
        required: true
        schema:
          format: uuid
          type: string
        style: simple
      responses:
        '204':
          description: No content
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Rate Limited
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal server error
      summary: Enable an adaptive trigger
      tags:
      - Adaptive triggers
  /api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers/{triggerID}/disable:
    post:
      description: Disable an adaptive trigger.
      operationId: postDisableAdaptiveTrigger
      parameters:
      - explode: false
        in: path
        name: projectKey
        required: true
        schema:
          type: string
        style: simple
      - explode: false
        in: path
        name: environmentKey
        required: true
        schema:
          type: string
        style: simple
      - explode: false
        in: path
        name: triggerID
        required: true
        schema:
          format: uuid
          type: string
        style: simple
      responses:
        '204':
          description: No content
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Rate Limited
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal server error
      summary: Disable an adaptive trigger
      tags:
      - Adaptive triggers
components:
  schemas:
    AdaptiveTrigger:
      example:
        resourceKind: flag
        createdAt: 6
        task:
          instructions:
          - variationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
            kind: updateFallthroughVariationOrRollout
            ruleId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
          - variationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
            kind: updateFallthroughVariationOrRollout
            ruleId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
        resourceKey: resourceKey
        name: name
        id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
        triggerSource:
          alertId: 0
          type: observabilityAlert
        enabled: true
        updatedAt: 1
      properties:
        id:
          format: uuid
          type: string
        name:
          type: string
        resourceKind:
          $ref: '#/components/schemas/AdaptiveTriggerResourceKind'
        resourceKey:
          type: string
        enabled:
          type: boolean
        triggerSource:
          $ref: '#/components/schemas/ObservabilityAlertSource'
        task:
          $ref: '#/components/schemas/AdaptiveTriggerTask'
        createdAt:
          format: int64
          type: integer
        updatedAt:
          format: int64
          type: integer
      required:
      - createdAt
      - enabled
      - id
      - name
      - resourceKey
      - resourceKind
      - task
      - triggerSource
      - updatedAt
      type: object
    Error:
      example:
        code: code
        message: message
      properties:
        message:
          type: string
        code:
          type: string
      required:
      - code
      - message
      type: object
    CreateAdaptiveTriggerRequest:
      example:
        resourceKind: flag
        task:
          instructions:
          - variationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
            kind: updateFallthroughVariationOrRollout
            ruleId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
          - variationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
            kind: updateFallthroughVariationOrRollout
            ruleId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
        resourceKey: resourceKey
        name: name
        triggerSource:
          alertId: 0
          type: observabilityAlert
      properties:
        name:
          type: string
        resourceKind:
          $ref: '#/components/schemas/AdaptiveTriggerResourceKind'
        resourceKey:
          type: string
        triggerSource:
          $ref: '#/components/schemas/ObservabilityAlertSource'
        task:
          $ref: '#/components/schemas/AdaptiveTriggerTask'
      required:
      - name
      - resourceKey
      - resourceKind
      - task
      - triggerSource
      type: object
    AdaptiveTriggerTask:
      example:
        instructions:
        - variationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
          kind: updateFallthroughVariationOrRollout
          ruleId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
        - variationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
          kind: updateFallthroughVariationOrRollout
          ruleId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
      properties:
        instructions:
          items:
            $ref: '#/components/schemas/AdaptiveTriggerInstruction'
          minItems: 1
          type: array
      required:
      - instructions
      type: object
    AdaptiveTriggers:
      example:
        _links:
          next:
            href: href
            type: type
          last:
            href: href
            type: type
          prev:
            href: href
            type: type
          self:
            href: href
            type: type
          first:
            href: href
            type: type
        totalCount: 5
        items:
        - resourceKind: flag
          createdAt: 6
          task:
            instructions:
            - variationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
              kind: updateFallthroughVariationOrRollout
              ruleId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
            - variationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
              kind: updateFallthroughVariationOrRollout
              ruleId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
          resourceKey: resourceKey
          name: name
          id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
          triggerSource:
            alertId: 0
            type: observabilityAlert
          enabled: true
          updatedAt: 1
        - resourceKind: flag
          createdAt: 6
          task:
            instructions:
            - variationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
              kind: updateFallthroughVariationOrRollout
              ruleId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
            - variationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
              kind: updateFallthroughVariationOrRollout
              ruleId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
          resourceKey: resourceKey
          name: name
          id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
          triggerSource:
            alertId: 0
            type: observabilityAlert
          enabled: true
          updatedAt: 1
      properties:
        _links:
          $ref: '#/components/schemas/AdaptiveTriggersPaginatedLinks'
        items:
          items:
            $ref: '#/components/schemas/AdaptiveTrigger'
          type: array
        totalCount:
          type: integer
      required:
      - items
      - totalCount
      type: object
    ObservabilityAlertSource:
      example:
        alertId: 0
        type: observabilityAlert
      properties:
        type:
          enum:
          - observabilityAlert
          type: string
        alertId:
          type: integer
      required:
      - alertId
      - type
      type: object
    UpdateAdaptiveTriggerRequest:
      example:
        task:
          instructions:
          - variationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
            kind: updateFallthroughVariationOrRollout
            ruleId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
          - variationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
            kind: updateFallthroughVariationOrRollout
            ruleId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
        name: name
      minProperties: 1
      properties:
        name:
          type: string
        task:
          $ref: '#/components/schemas/AdaptiveTriggerTask'
      type: object
    AdaptiveTriggerResourceKind:
      enum:
      - flag
      - ai-config
      type: string
    AdaptiveTriggerInstruction:
      example:
        variationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
        kind: updateFallthroughVariationOrRollout
        ruleId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
      properties:
        kind:
          enum:
          - updateFallthroughVariationOrRollout
          - updateRuleVariationOrRollout
          type: string
        variationId:
          format: uuid
          type: string
        ruleId:
          description: The targeting rule this adaptive trigger acts on. Required for updateRuleVariationOrRollout instructions.
          format: uuid
          type: string
      required:
      - kind
      - variationId
      type: object
    ExperimentationLink:
      example:
        href: href
        type: type
      properties:
        href:
          type: string
        type:
          type: string
      type: object
    AdaptiveTriggersPaginatedLinks:
      example:
        next:
          href: href
          type: type
        last:
          href: href
          type: type
        prev:
          href: href
          type: type
        self:
          href: href
          type: type
        first:
          href: href
          type: type
      properties:
        first:
          $ref: '#/components/schemas/ExperimentationLink'
        last:
          $ref: '#/components/schemas/ExperimentationLink'
        next:
          $ref: '#/components/schemas/ExperimentationLink'
        prev:
          $ref: '#/components/schemas/ExperimentationLink'
        self:
          $ref: '#/components/schemas/ExperimentationLink'
      required:
      - self
      type: object
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: Authorization
x-provenance:
  method: harvested
  publisher: LaunchDarkly
  source: https://app.launchdarkly.com/api/v2/openapi.json
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)