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

# LaunchDarkly REST API

Jentic publishes the only available OpenAPI specification for LaunchDarkly REST API, keeping it validated and agent-ready. This 5.3.0 cut of the LaunchDarkly REST API covers the core feature flag and experimentation surface - projects, environments, feature flags, segments, account members, custom roles, audit logs, Data Export destinations, and webhooks. It is the management plane for releasing software safely behind flags. The spec covers 105 operations across LaunchDarkly's foundational resources.

## For AI agents

Manage LaunchDarkly feature flags, environments, segments, and audit history through the REST API.

## Scope

Does not handle SDK flag evaluation traffic, log streaming, or product analytics - use for feature flag, audit, 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 targeting rules that select users by attributes
- Query the audit log for changes to flags, segments, or environments
- Configure Data Export destinations for streaming flag evaluation events
- Manage account members, custom roles, and webhooks at the account level

## 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.

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 entries 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 for project p_abc in the last 30 days, filter for kind='flag', and write the results to the SIEM.

### Streaming Evaluation Events to a Warehouse

An analytics team configures a Data Export destination so every flag evaluation streams into Kinesis or Pub/Sub for downstream analysis. The destinations endpoints register the target, enable it per environment, and return the configuration for management. Useful for joining flag exposure with product metrics in a warehouse.

Example prompt: Create a Data Export destination targeting Kinesis stream 'ld-evals' for project p_abc and environment production, then verify it is enabled.

### AI Agent Release Manager

An AI agent operating as a release manager flips flags, queries audit history, and reports rollout status 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 access token handling. This lets an agent run progressive delivery and audit pulls with a single tool 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 | /auditlog | List audit log entries across the account. |
| GET | /auditlog/{resourceId} | Get audit history for a specific resource. |
| GET | /destinations | List Data Export destinations. |
| GET | /account/relay-auto-configs | List Relay Proxy auto-config entries. |
| POST | /account/relay-auto-configs/{id}/reset | Reset the SDK key on a Relay Proxy auto-config. |
| GET | /flag-status/{projectKey}/{featureFlagKey} | Get the rollout status of a specific feature flag. |

## 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.
- **Audit Log** — Query the audit history of changes across resources.
- **Account Members** — Manage users and custom roles in the LaunchDarkly account.
- **Data Export Destinations** — Configure destinations for streaming flag evaluation events.
- **Webhooks** — Register webhooks for change notifications.

## Why Jentic

- **Setup:** Wiring the LaunchDarkly REST API by hand means setting the access token in the Authorization header, targeting the app.launchdarkly.com/api/v2 host, and locating the right path among many 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 (/flag-status/{projectKey}/{featureFlagKey}), so a rule can pin your agent to one project: it can read flag status and the audit log for that project and nothing else. You choose the operations it may call, so resetting a relay auto-config 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 'check a flag status' or 'read the audit log', and Jentic returns the matching LaunchDarkly REST operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Split** — Split offers feature flag and experimentation tooling with strong impact analysis.
- **ConfigCat** — ConfigCat is a simpler 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 access token passed in the Authorization header. Through Jentic, the 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 accept JSON Patch operations to flip a flag on or off in a specific environment, change targeting rules, or adjust percentage rollouts - all without a redeploy.

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

LaunchDarkly applies per-account and per-endpoint rate limits returned in X-RateLimit-* response headers; the spec does not list exact thresholds. Read those headers and back off when limits are approached.

### How do I query the audit log through Jentic?

Search Jentic for 'launchdarkly audit log', load the GET /auditlog operation, and filter by project, kind, and time range. The response paginates so the agent should follow nextPage links until empty.

### Can I configure Data Export destinations with the LaunchDarkly REST API?

Yes. The /destinations endpoints register a destination such as Kinesis or Pub/Sub, scope it to a project and environment, and return the configuration for later updates.

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

Yes. Jentic One runs self-hosted, so your own rules decide which LaunchDarkly operations and credentials your agent may use. Because LaunchDarkly puts the project key in the URL path, such as /flag-status/{projectKey}/{featureFlagKey}, you can pin the agent to a single project and let it read flag status and the audit log for that project and nothing else. You also choose the exact operations it can call, so a sensitive action like resetting a Relay Proxy auto-config is available only if you explicitly add it.
