VX Agents

API directory · Developer Tools

LaunchDarkly Feature Flags

v1.0.0 · 9 endpoints · 0 connections · shared by vx.ai

Is the new checkout flag on in production, and who flipped it last night? Look up LaunchDarkly flags per project and environment, read their status, create a flag, toggle or retarget it with a JSON patch, and trace changes in the audit log.

Connect this API to an AI agent Browse all specs

What you can do with LaunchDarkly Feature Flags via MCP

Every endpoint below becomes a governed tool your AI agent (Claude, ChatGPT, or a customer-facing VX agent) can call — with scoped permissions, sandbox testing, and audit logs.

MethodPathOperationDescription
GET /api/v2/projects listProjects List the projects in the LaunchDarkly account
GET /api/v2/projects/{projectKey}/environments listEnvironments List the environments (production, staging, ...) of a project
GET /api/v2/flags/{projectKey} listFeatureFlags List or search feature flags in a project
POST /api/v2/flags/{projectKey} createFeatureFlag Create a feature flag in a project
GET /api/v2/flags/{projectKey}/{featureFlagKey} getFeatureFlag Get one flag with its variations and per-environment targeting
PATCH /api/v2/flags/{projectKey}/{featureFlagKey} updateFeatureFlag Update a flag with a JSON patch (turn it on/off, change targeting or name)
GET /api/v2/flag-statuses/{projectKey}/{environmentKey} listFlagStatuses List flag statuses (new, active, inactive, launched) in an environment
GET /api/v2/flag-status/{projectKey}/{featureFlagKey} getFlagStatusAcrossEnvironments See a flag's status in every environment
GET /api/v2/auditlog listAuditLogEntries List audit log entries: who changed which flag and when

Authentication

ApiKey

API key — sent as the Authorization header

LaunchDarkly API access token, sent as the raw value of the Authorization header (no Bearer prefix).

How to get a credential

  1. Sign in to LaunchDarkly and open Organization settings > Authorization.
  2. Under Access tokens, click Create token.
  3. Give it a name and a role: Reader for read-only use, Writer if the agent should create or update flags.
  4. Copy the token (it starts with api-); it is shown only once.

Permissions used

Role / action Operations
Reader listProjects, listEnvironments, listFeatureFlags, getFeatureFlag, listFlagStatuses, getFlagStatusAcrossEnvironments, listAuditLogEntries
Writer (createFlag, updateOn, updateTargets, ...) createFeatureFlag, updateFeatureFlag

Common errors

  • 401 Unauthorized: the token is wrong or was revoked; paste it again without a Bearer prefix.
  • 403 Forbidden: the token's role cannot do this (a Reader token tried to write, or a custom role denies the project/environment).
  • 400 Bad Request: invalid patch body or flag key; check the JSON pointer paths such as /environments/production/on.
  • 409 Conflict: a pending approval or scheduled change conflicts; retry with ignoreConflicts=true only if the user agrees.
  • 429 Too Many Requests: rate limit hit; wait for the X-Ratelimit-Reset time.

Store the token as a VX Agents credential for this spec; never paste it into chat.

Usage guide

Setup

  • Credential: a LaunchDarkly API access token (Organization settings > Authorization > Access tokens). Reader role for read-only agents, Writer to create or change flags. It goes in the Authorization header as-is, without Bearer.
  • Worth pinning: projectKey (often default) and, for status checks, environmentKey (e.g. production).

Check and change a flag

  1. listProjects, then listEnvironments to learn the project and environment keys.
  2. listFeatureFlags with filter=query:checkout (or summary=true for a short list) to find the flag key.
  3. getFeatureFlag to read variations and, under environments.<key>, whether it is on and how it targets.
  4. getFlagStatusAcrossEnvironments or listFlagStatuses to see if a flag is new, active, inactive or launched (handy for clean-up).
  5. To change it, call updateFeatureFlag with a body like {"comment": "Enable for launch", "patch": [{"op": "replace", "path": "/environments/production/on", "value": true}]}. Pass dryRun=true first to preview the result.
  6. listAuditLogEntries with spec=proj/<project>:env/<env>:flag/<flag> to see who changed it and when.

Confirm with the user before createFeatureFlag or updateFeatureFlag: a change in a production environment affects live customers immediately.

Good to know

  • Flag, project and environment keys are lower-case slugs; they are not the display names.
  • createFeatureFlag needs name and key; variations default to boolean true/false. New flags start off in every environment.
  • Patch paths are JSON pointers into the flag (/name, /environments/<env>/on, /environments/<env>/fallthrough/variation). Use test ops to guard against concurrent edits.
  • Audit log before/after take Unix milliseconds and it returns at most 20 entries per call (limit), so narrow the time window. Flag lists page with limit and offset.
  • 409 means a pending approval or scheduled change blocks the patch; only add ignoreConflicts=true if the user agrees.
  • Federal customers use https://app.launchdarkly.us instead of the default host.

Source: LaunchDarkly API reference (https://launchdarkly.com/docs/api), checked 2026-10-21.

How to use this spec

  1. Create a free VX Agents account (sandbox tools included).
  2. Open the marketplace and connect “LaunchDarkly Feature Flags” to an agent.
  3. Expose it as an MCP server for Claude/ChatGPT, or chat with it directly.

Related APIs