Projects

Projects allow you to manage multiple different software projects under one LaunchDarkly account. Each project has its own unique set of environments and feature flags.

Using the Projects API, you can create, destroy, and manage projects.

List projects

Get a list of all projects in the account.

Request
Security:
ApiKey (readwrite)
Responses
200

Project collection response JSON

401

Invalid access token

403

Forbidden

429

Rate limited

get/api/v2/projects
Request samples
curl -i -X GET \
  https://app.launchdarkly.com/api/v2/projects \
  -H 'Authorization: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "_links": {
    },
  • "items": [
    ]
}

Create project

Create a new project with the given key and name. Project keys must be unique within an account.

Request
Security:
ApiKey (readwrite)
Request Body schema: application/json
name
required
string

A human-friendly name for the project.

key
required
string

A unique key used to reference the project in your code.

includeInSnippetByDefault
boolean

Whether or not flags created in this project are made available to the client-side JavaScript SDK by default.

object (DefaultClientSideAvailabilityPost)
tags
Array of strings
Array of objects (EnvironmentPost)

Creates the provided environments for this project. If omitted default environments will be created instead.

Responses
201

Successful project response

400

Invalid request

401

Invalid access token

403

Forbidden

409

Status conflict

429

Rate limited

post/api/v2/projects
Request samples
application/json
{
  • "key": "my-project",
  • "name": "My Project"
}
Response samples
application/json
{
  • "_links": {
    },
  • "_id": "57be1db38b75bf0772d11383",
  • "key": "my-project",
  • "includeInSnippetByDefault": true,
  • "defaultClientSideAvailability": {
    },
  • "name": "My Project",
  • "tags": [
    ],
  • "environments": [
    ]
}

Get project

Get a single project by key.

Request
Security:
ApiKey (readwrite)
path Parameters
projectKey
required
string <string>

The project key

Responses
200

Project response JSON

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

429

Rate limited

get/api/v2/projects/{projectKey}
Request samples
curl -i -X GET \
  https://app.launchdarkly.com/api/v2/projects/:projectKey \
  -H 'Authorization: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "_links": {
    },
  • "_id": "57be1db38b75bf0772d11383",
  • "key": "my-project",
  • "includeInSnippetByDefault": true,
  • "defaultClientSideAvailability": {
    },
  • "name": "My Project",
  • "tags": [
    ],
  • "environments": [
    ]
}

Update project

Update a project. Requires a JSON Patch representation of the desired changes to the project.

Request
Security:
ApiKey (readwrite)
path Parameters
projectKey
required
string <string>

The project key

Request Body schema: application/json
Array
op
required
string

The type of operation to perform

path
required
string

A JSON Pointer string specifying the part of the document to operate on

value
required
any

A JSON value used in "add", "replace", and "test" operations

Responses
200

Project response JSON

400

Invalid request

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

409

Status conflict

429

Rate limited

patch/api/v2/projects/{projectKey}
Request samples
application/json
[
  • {
    }
]
Response samples
application/json
{
  • "_links": {
    },
  • "_id": "57be1db38b75bf0772d11383",
  • "key": "my-project",
  • "includeInSnippetByDefault": true,
  • "defaultClientSideAvailability": {
    },
  • "name": "My Project",
  • "tags": [
    ],
  • "environments": [
    ]
}

Delete project

Delete a project by key. Caution: deleting a project will delete all associated environments and feature flags. You cannot delete the last project in an account.

Request
Security:
ApiKey (readwrite)
path Parameters
projectKey
required
string <string>

The project key

Responses
204

Action succeeded

400

Invalid request

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

429

Rate limited

delete/api/v2/projects/{projectKey}
Request samples
curl -i -X DELETE \
  https://app.launchdarkly.com/api/v2/projects/:projectKey \
  -H 'Authorization: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "code": "invalid_request",
  • "message": "invalid request body"
}