Skip to main content
PATCH
/
api
/
public
/
v2
/
folders
/
{folder_id}
Update Folder
curl --request PATCH \
  --url https://api.promptlayer.com/api/public/v2/folders/{folder_id} \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <x-api-key>' \
  --data '
{
  "name": "<string>"
}
'
{
  "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
  }
}
Renames an existing folder. The new name must be unique within the folder’s parent (or at root level). The folder must belong to a workspace accessible by the authenticated user.

Headers

X-API-KEY
string
required

Path Parameters

folder_id
integer
required

The ID of the folder to update.

Body

application/json
name
string
required

The new name for the folder. Must be unique within its parent folder.

Required string length: 1 - 255

Response

Folder updated successfully

success
boolean

Indicates if the operation was successful

folder
Folder · object