canonical: https://jentic.com/apis/launchdarkly.com/launchdarkly-api

# LaunchDarkly REST API

Jentic publishes the only available OpenAPI specification for LaunchDarkly REST API, keeping it validated and agent-ready. The LaunchDarkly REST API (v2) covers feature flag and experimentation management - projects, environments, feature flags, segments, contexts, AI Configs, approvals, audit logs, code references, account members, custom roles, applications, and Data Export destinations. It is the platform-wide control plane for releasing software safely behind flags and running experiments. The spec covers 355 operations across the entire LaunchDarkly product surface.

## For AI agents

Manage LaunchDarkly feature flags, environments, experiments, contexts, and access controls programmatically through the v2 REST API.

## Scope

Does not handle SDK flag evaluation traffic, log streaming, or product analytics - use for feature flag, experimentation, and admin control only.

## Capabilities

- Create or update a feature flag and its variations across environments
- Toggle a flag on or off in a specific environment without redeploying
- Manage segments and rules that target users by context attributes
- Submit, approve, or reject change approvals against a flag
- Query the audit log for changes to flags, segments, or environments
- Manage AI Configs and their versions for prompt and model rollouts
- Administer projects, environments, account members, and custom roles

## Use cases

### Programmatic Flag Rollouts

A release tool flips a feature flag from 0 percent to 25 percent of traffic in production by calling the flag and environment endpoints, gradually expanding exposure based on health metrics. The API supports targeting rules, percentage rollouts, and per-environment overrides so a single flag can be progressed independently across staging and production. Teams use this to automate canaries without redeploying.

Example prompt: Update the 'checkout-redesign' flag in the production environment to a 25 percent rollout, then query the flag state to confirm the new rule is active.

### Audit and Compliance Reporting

A compliance team pulls the LaunchDarkly audit log to produce evidence of who changed which flag, when, and why for SOC 2 and ISO 27001 audits. The audit log endpoints return changes filtered by project, environment, kind, and time window, which can be persisted into a SIEM. Useful for change-management evidence on regulated systems.

Example prompt: Pull every audit log entry from /api/v2 for project p_abc in the last 30 days, filter for kind='flag', and write the results to the SIEM.

### Approval-Gated Production Changes

A team requires approvals on any production flag change. The Approvals endpoints submit a request, send it to designated reviewers, and apply the change only after sign-off. Combined with custom roles, this enforces separation of duties on high-risk flags.

Example prompt: Submit an approval request to change the 'billing-v2' flag in production, route it to the on-call lead, and apply the change once approval is granted.

### AI Config Rollouts for LLM Apps

A team versioning prompts and models for an LLM-backed product manages them as AI Configs in LaunchDarkly, rolling out a new prompt to 10 percent of users via the same flag rules used for code. The AI Configs endpoints expose versions and targeting so prompt iteration ships safely. Useful when prompt changes need the same release governance as code.

Example prompt: Create a new AI Config version with the candidate prompt, target it to 10 percent of users in production, and monitor the audit log for any rule changes.

### AI Agent Release Manager

An AI agent operating as a release manager flips flags, submits approvals, and reads the audit log via the LaunchDarkly REST API through Jentic. The agent searches Jentic for flag toggling, loads the operation schema, and executes the change without manually wiring LaunchDarkly's API key handling. This lets an agent run progressive delivery and audit pulls with the same call surface.

Example prompt: Use Jentic to call LaunchDarkly, advance the canary flag to the next rollout step in production, and post a summary of the change to the team channel.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /api/v2/applications | List applications tracked in LaunchDarkly. |
| GET | /api/v2/approval-requests | List approval requests across the account. |
| POST | /api/v2/approval-requests/{id} | Apply or comment on an approval request. |
| GET | /api/v2/account/relay-auto-configs | List Relay Proxy auto-config entries. |
| POST | /api/v2/account/relay-auto-configs/{id}/reset | Reset the SDK key on a Relay Proxy auto-config. |

## Key resources

- **Feature Flags** — Create, update, and toggle feature flags across environments.
- **Environments** — Manage environments inside a project.
- **Segments** — Create user segments and targeting rules.
- **Contexts** — Manage context kinds and instances used in targeting.
- **AI Configs** — Manage AI Configs and versions for LLM-backed apps.
- **Approvals** — Submit, review, and apply approval requests on flag changes.
- **Audit Log** — Query the audit history of changes across resources.
- **Account Members** — Manage users and custom roles in the LaunchDarkly account.
- **Code References** — Track where flags are referenced in source code.
- **Data Export** — Configure destinations for streaming flag evaluation events.

## Why Jentic

- **Setup:** Wiring the LaunchDarkly REST API by hand means setting the access token in the Authorization header, choosing the app.launchdarkly.com or app.launchdarkly.us host, and finding the right path among hundreds yourself. Through Jentic you install once, import the LaunchDarkly REST API from the API Directory, store the access token once, and your agent calls it.
- **Permission scoping:** LaunchDarkly puts the project key in the URL path (/flags/{projectKey}/...), so a rule can pin your agent to one project: it can read and update flags in that project and nothing else. You choose the operations it may call, so approving requests or resetting relay configs is included only if you add it.
- **Credential handling:** Your LaunchDarkly access token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'toggle a feature flag' or 'list approval requests', and Jentic returns the matching LaunchDarkly REST operation with its input schema so the agent calls the right endpoint without paging through the reference docs.

## Related APIs

- **Split** — Split offers feature flag and experimentation tooling with strong impact analysis.
- **ConfigCat** — ConfigCat is a simpler, lower-cost feature flag service with a generous free tier.
- **Statsig** — Statsig combines feature flags with built-in product analytics and experimentation.
- **Optimizely** — Optimizely focuses on experimentation and personalisation alongside feature flags.

## FAQ

### Why is there no official OpenAPI spec for LaunchDarkly REST API?

LaunchDarkly does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call LaunchDarkly REST API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the LaunchDarkly REST API use?

The API uses an API key passed in the Authorization header. Through Jentic, the LaunchDarkly access token lives in the encrypted vault and is injected at execution time so the raw token never appears in the agent context.

### Can I toggle a feature flag with the LaunchDarkly REST API?

Yes. The flag endpoints under /api/v2 accept JSON Patch operations to flip a flag on or off in a specific environment, change targeting rules, or adjust percentage rollouts without a redeploy.

### What are the rate limits for the LaunchDarkly REST API?

LaunchDarkly applies a global per-account rate limit and per-endpoint limits that are returned in X-RateLimit-* response headers; the spec does not enumerate exact numbers. Read those headers to back off when the limit is approached.

### How do I submit a flag approval request through Jentic?

Search Jentic for 'submit a feature flag approval', load the operation under /api/v2/approval-requests, and POST the change with the target reviewers. Once approved, call the apply endpoint to commit the change.

### Can I manage AI Configs with the LaunchDarkly REST API?

Yes. The AI Configs endpoints expose versions and targeting so a prompt or model can be rolled out to a percentage of users using the same governance as code flags.

### Can I limit what my agent is allowed to do with the LaunchDarkly REST API?

Yes. Because Jentic One runs self-hosted, you write the rules that decide which LaunchDarkly operations and credentials your agent may use. Since LaunchDarkly puts the project key in the URL path, you can pin the agent to a single project so it only reads and updates flags there and nothing else. You also select the exact operations it can call, so higher-risk actions like approving change requests or resetting Relay Proxy configs are available only if you explicitly add them.
