Commands › Inventory
inventory_create_folder
Create a folder
Usage
curl -X POST "https://api.lifebots.cloud/api/bot.html" \
-H "Content-Type: application/json" \
-d '{
"action": "inventory_create_folder",
"apikey": "YOUR_API_KEY",
"botname": "Joe Resident",
"secret": "bot-secret-123",
"name": "Gifts",
"dataType": "json"
}' Every request also needs apikey, botname and secret — see Authentication.
Parameters
| Name | Required | Description |
|---|---|---|
namestring | yes | Folder name. |
parentFolderUUID | no | Where to create it. Default: the root folder. Also accepted as: parentFolderUuid |
Example response
{
"result": "OK",
"folder": {
"folderID": "7c1e9b2a-4d3f-4a8b-9c6d-000000000000",
"name": "Gifts",
"typeDefault": -1
}
} With dataType=json. A failure has result: "FAIL" and the reason in resulttext — see Responses & errors.