Skip to main content
POST
/
api
/
v2
/
projects
/
{projectKey}
/
layers
Create layer
curl --request POST \
  --url https://app.launchdarkly.com/api/v2/projects/{projectKey}/layers \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "key": "checkout-flow",
  "name": "Checkout Flow",
  "description": "<string>"
}
'
{
  "key": "checkout-flow",
  "name": "Checkout Flow",
  "description": "The checkout flow for the application",
  "createdAt": 123,
  "randomizationUnit": "user",
  "environments": {}
}

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

Path Parameters

projectKey
string<string>
required

The project key

Body

application/json
key
string
required

Unique identifier for the layer

Example:

"checkout-flow"

name
string
required

Layer name

Example:

"Checkout Flow"

description
string
required

The checkout flow for the application

Response

Layer response

key
string
required

The key of the layer

Example:

"checkout-flow"

name
string
required

The name of the layer

Example:

"Checkout Flow"

description
string
required

The description of the layer

Example:

"The checkout flow for the application"

createdAt
integer<int64>
required

The date and time when the layer was created

randomizationUnit
string

The unit of randomization for the layer

Example:

"user"

environments
object

The layer configurations for each requested environment