Skip to main content

Create project

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

Authorization

name: Authorizationtype: apiKeyin: headerdescription: API key needed to access this API

Create a new Unleash project.

Request

Body

required

createProjectSchema

  • id string required

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

    The project's identifier.

  • name string required

    Possible values: non-empty

    The project's name.

  • description string nullable

    The project's description.

  • mode string

    Possible values: [open, protected, private]

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

  • defaultStickiness string

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

Responses

The resource was successfully created.

Response Headers
  • location string

    The location of the newly created resource.

Schema
  • id string required

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

    The project's identifier.

  • name string required

    Possible values: non-empty

    The project's name.

  • description string nullable

    The project's description.

  • featureLimit integer nullable

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

  • mode string

    Possible values: [open, protected, private]

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

  • defaultStickiness string

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

Authorization

name: Authorizationtype: apiKeyin: headerdescription: API key needed to access this API

Request

Base URL
<your-unleash-url>
Security Scheme
apiKey
Body required
{
"id": "pet-shop",
"name": "Pet shop",
"description": "This project contains features related to the new pet shop.",
"mode": "open",
"defaultStickiness": "userId"
}
curl / cURL
curl -L -X POST '<your-unleash-url>/api/admin/projects' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>' \
--data-raw '{
"id": "pet-shop",
"name": "Pet shop",
"description": "This project contains features related to the new pet shop.",
"mode": "open",
"defaultStickiness": "userId"
}'