Skip to main content
POST
/
api
/
v2
/
projects
Create project
curl --request POST \
  --url https://app.launchdarkly.com/api/v2/projects \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "key": "project-key-123abc",
  "name": "My Project"
}
'
{
  "_links": {
    "environments": {
      "href": "/api/v2/projects/my-project/environments",
      "type": "application/json"
    },
    "self": {
      "href": "/api/v2/projects/my-project",
      "type": "application/json"
    }
  },
  "_id": "57be1db38b75bf0772d11383",
  "key": "project-key-123abc",
  "includeInSnippetByDefault": true,
  "name": "My Project",
  "tags": [
    "ops"
  ],
  "environments": [
    {
      "_links": {
        "self": {
          "href": "/api/v2/projects/my-project/environments/my-environment",
          "type": "application/json"
        }
      },
      "_id": "57be1db38b75bf0772d11384",
      "key": "environment-key-123abc",
      "name": "My Environment",
      "apiKey": "sdk-xxx",
      "mobileKey": "mob-xxx",
      "color": "F5A623",
      "defaultTtl": 5,
      "secureMode": true,
      "defaultTrackEvents": false,
      "requireComments": true,
      "confirmChanges": true,
      "tags": [
        "ops"
      ],
      "critical": true,
      "_access": {
        "denied": [
          {
            "action": "<string>",
            "reason": {
              "effect": "allow",
              "resources": [
                "proj/*:env/*;qa_*:/flag/*"
              ],
              "notResources": [
                "<string>"
              ],
              "actions": [
                "*"
              ],
              "notActions": [
                "<string>"
              ],
              "role_name": "<string>"
            }
          }
        ],
        "allowed": [
          {
            "action": "<string>",
            "reason": {
              "effect": "allow",
              "resources": [
                "proj/*:env/*;qa_*:/flag/*"
              ],
              "notResources": [
                "<string>"
              ],
              "actions": [
                "*"
              ],
              "notActions": [
                "<string>"
              ],
              "role_name": "<string>"
            }
          }
        ]
      },
      "approvalSettings": {
        "required": true,
        "bypassApprovalsForPendingChanges": false,
        "minNumApprovals": 1,
        "canReviewOwnRequest": false,
        "canApplyDeclinedChanges": true,
        "serviceKind": "launchdarkly",
        "serviceConfig": {},
        "requiredApprovalTags": [
          "require-approval"
        ],
        "autoApplyApprovedChanges": true,
        "serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258"
      },
      "resourceApprovalSettings": {}
    }
  ],
  "defaultClientSideAvailability": {
    "usingMobileKey": true,
    "usingEnvironmentId": true
  },
  "_access": {
    "denied": [
      {
        "action": "<string>",
        "reason": {
          "effect": "allow",
          "resources": [
            "proj/*:env/*;qa_*:/flag/*"
          ],
          "notResources": [
            "<string>"
          ],
          "actions": [
            "*"
          ],
          "notActions": [
            "<string>"
          ],
          "role_name": "<string>"
        }
      }
    ],
    "allowed": [
      {
        "action": "<string>",
        "reason": {
          "effect": "allow",
          "resources": [
            "proj/*:env/*;qa_*:/flag/*"
          ],
          "notResources": [
            "<string>"
          ],
          "actions": [
            "*"
          ],
          "notActions": [
            "<string>"
          ],
          "role_name": "<string>"
        }
      }
    ]
  },
  "defaultReleasePipelineKey": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://launchdarkly-preview.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Body

application/json
name
string
required

A human-friendly name for the project.

Example:

"My Project"

key
string
required

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

Example:

"project-key-123abc"

includeInSnippetByDefault
boolean

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

Example:

true

defaultClientSideAvailability
object

Controls which client-side SDKs can use new flags by default.

tags
string[]

Tags for the project

Example:
["ops"]
environments
object[]

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

namingConvention
object

The flag key convention for this project. Omit this field if you don't want to enforce any conventions for flag keys.

Response

Project response

The location and content type of related resources

Example:
{
"environments": {
"href": "/api/v2/projects/my-project/environments",
"type": "application/json"
},
"self": {
"href": "/api/v2/projects/my-project",
"type": "application/json"
}
}
_id
string
required

The ID of this project

Example:

"57be1db38b75bf0772d11383"

key
string
required

The key of this project

Example:

"project-key-123abc"

includeInSnippetByDefault
boolean
required

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

Example:

true

name
string
required

A human-friendly name for the project

Example:

"My Project"

tags
string[]
required

A list of tags for the project

Example:
["ops"]
environments
object[]
required

A list of environments for the project

defaultClientSideAvailability
object

Describes which client-side SDKs can use new flags by default

_access
object

Details on the allowed and denied actions for this project

defaultReleasePipelineKey
string

The key of the default release pipeline for this project