Welcome
Manage feature flags, segments, experiments, AI configs and everything else in LaunchDarkly with the REST API v2.
The LaunchDarkly REST API gives you programmatic access to everything in LaunchDarkly: feature flags, segments, contexts, experiments, AI configs, approvals, audit logs, teams and more. Use it to automate releases, sync flags with your tooling, and build internal workflows on top of LaunchDarkly.
What you'll find here
- API Reference: all 404 REST API v2 operations grouped by resource, with request and response examples and a live API playground.
- SDKs: client libraries for C#, Python and TypeScript, generated by APIMatic, with code samples on every endpoint.
- Context Plugin: brings the API and SDKs into AI coding assistants such as Claude Code, Cursor and Codex.
Base URLs
| Instance | Base URL |
|---|---|
| Commercial | https://app.launchdarkly.com |
| Federal | https://app.launchdarkly.us |
Authentication
Authenticate with a personal or service access token in the Authorization header (no Bearer prefix):
Authorization: api-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxCreate tokens under Organization settings → Authorization in LaunchDarkly. SDK keys, mobile keys and client-side IDs do not work with the REST API.
Common tasks
- List projects:
GET /api/v2/projects - List feature flags in a project:
GET /api/v2/flags/{projectKey} - Create a feature flag:
POST /api/v2/flags/{projectKey} - Update a flag (JSON patch, merge patch or semantic patch):
PATCH /api/v2/flags/{projectKey}/{featureFlagKey}
Responses are rate limited; watch the X-Ratelimit-* headers and back off on 429.