POST
/
api
/
public
/
v2
/
folders
Create Folder
curl --request POST \
  --url https://api.promptlayer.com/api/public/v2/folders \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <x-api-key>' \
  --data '{
  "name": "<string>",
  "parent_id": 123
}'
{
  "success": true,
  "folder": {
    "id": 123,
    "name": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "path": [
      {}
    ],
    "workspace_id": 123,
    "parent_id": 123
  }
}
Creates a new folder in the workspace. Folders can be nested within other folders by providing a parent_id. The folder name must be unique within its parent folder (or at the root level if no parent is specified).

Headers

X-API-KEY
string
required

Body

application/json

Response

201
application/json

Folder created successfully

The response is of type object.