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: <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,
    "external_ids": [
      {
        "source": "<string>",
        "external_id": "<string>"
      }
    ]
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.promptlayer.com/llms.txt

Use this file to discover all available pages before exploring further.

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.

Authorizations

X-API-KEY
string
header
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