Skip to main content

Create project

POST 

<your-unleash-url>/api/admin/projects

Create a new Unleash project.

Request

Bodyrequired

createProjectSchema

    idstringdeprecated

    The project's identifier. If this property is not present or is an empty string, Unleash will generate the project id automatically. This property is deprecated.

    Possible values: Value must match regular expression [A-Za-z0-9_~.-]*

    Example: pet-shop
    namestringrequired

    The project's name. The name must contain at least one non-whitespace character.

    Possible values: Value must match regular expression ^(?!\s*$).+

    Example: Pet shop
    descriptionstringnullable

    The project's description.

    Example: This project contains features related to the new pet shop.
    modestring

    A mode of the project affecting what actions are possible in this project

    Possible values: [open, protected, private]

    Default value: open
    Example: open
    defaultStickinessstring

    A default stickiness for the project affecting the default stickiness value for variants and Gradual Rollout strategy

    Default value: default
    Example: userId
    environmentsstring[]

    A list of environments that should be enabled for this project. When provided, the list must contain at least one environment. If this property is missing, Unleash will default to enabling all non-deprecated environments for the project.

    Possible values: >= 1

    Example: ["production","development"]
    changeRequestEnvironments object[]

    A list of environments that should have change requests enabled. If the list includes environments not in the environments list, they will still have change requests enabled.

  • Array [
  • namestringrequired

    The name of the environment to configure change requests for.

    Example: production
    requiredApprovalsinteger

    The number of approvals required for a change request to be fully approved and ready to applied in this environment. If no value is provided, it will be set to the default number, which is 1. Values will be clamped to between 1 and 10 inclusive.

    Default value: 1
    Example: 3
  • ]

Responses

The resource was successfully created.

Response Headers
    location

    The location of the newly created resource.

Schema
    idstringrequired

    The project's identifier.

    Possible values: Value must match regular expression [A-Za-z0-9_~.-]+

    Example: pet-shop
    namestringrequired

    The project's name.

    Possible values: non-empty

    Example: Pet shop
    descriptionstringnullable

    The project's description.

    Example: This project contains features related to the new pet shop.
    featureLimitintegernullable

    A limit on the number of features allowed in the project. null if no limit.

    Example: 100
    modestring

    A mode of the project affecting what actions are possible in this project

    Possible values: [open, protected, private]

    Example: open
    defaultStickinessstring

    A default stickiness for the project affecting the default stickiness value for variants and Gradual Rollout strategy

    Example: userId
    environmentsstring[]

    The environments enabled for the project.

    Possible values: >= 1

    Example: ["production","staging"]
    changeRequestEnvironments object[]

    The list of environments that have change requests enabled.

  • Array [
  • namestringrequired

    The name of the environment this change request configuration applies to.

    Example: production
    requiredApprovalsintegerrequired

    The number of approvals required for a change request to be fully approved and ready to applied in this environment. If no value is provided, it will be set to the default number, which is 1. The value must be greater than or equal to 1.

    Possible values: >= 1

    Default value: 1
    Example: 3
  • ]

Authorization: Authorization

name: Authorizationtype: apiKeyin: headerdescription: API key needed to access this API
curl -L '<your-unleash-url>/api/admin/projects' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: <Authorization>' \
-d '{
"name": "Pet shop",
"description": "This project contains features related to the new pet shop.",
"mode": "open",
"defaultStickiness": "userId",
"environments": [
"production",
"development"
],
"changeRequestEnvironments": [
{
"name": "production",
"requiredApprovals": 3
}
]
}'
Request Collapse all
Base URL
<your-unleash-url>
Auth
Body required
{
  "name": "Pet shop",
  "description": "This project contains features related to the new pet shop.",
  "mode": "open",
  "defaultStickiness": "userId",
  "environments": [
    "production",
    "development"
  ],
  "changeRequestEnvironments": [
    {
      "name": "production",
      "requiredApprovals": 3
    }
  ]
}
ResponseClear

Click the Send API Request button above and see the response here!