Skip to navigation

Update Folder (Rename)

View as Markdown

Update Folder (Rename)

Renames an existing folder.

Method: PUT
URL: {{base_url}}/folders/{{folder_id}}


Authentication

This endpoint requires authentication.

Use a Bearer token in the Authorization header:

Authorization: Bearer {{access_token}}

Headers

HeaderValue
Content-Typeapplication/json
AuthorizationBearer {{access_token}}

Path Parameters

ParameterTypeRequiredDescription
folder_idintegerYesID of the folder to rename

Example endpoint:

{{base_url}}/folders/{{folder_id}}

Required Variables

VariableRequiredDescription
base_urlYesBase API URL
access_tokenYesAuthentication access token
folder_idYesFolder ID to update

Body (raw JSON)

Send the request body as raw JSON.

FieldTypeRequiredDescription
namestringYesNew folder name

Example body:

{
"name": "Campaign Gallery"
}

Sample Request

curl --request PUT "{{base_url}}/folders/{{folder_id}}" \
--header "Authorization: Bearer {{access_token}}" \
--header "Content-Type: application/json" \
--data '{
"name": "Campaign Gallery"
}'

Sample Success Response

A successful request typically returns HTTP 200 OK.

{
"success": true,
"message": "Folder renamed successfully",
"data": {
"id": 11,
"user_id": "43028",
"name": "Campaign Gallery",
"parent_id": 10,
"is_system": false,
"file_count": 0,
"created_at": "2026-03-10T06:25:32.000000Z",
"updated_at": "2026-03-10T06:27:25.000000Z",
"deleted_at": null
}
}

Response Fields

FieldTypeDescription
idintegerFolder ID
user_idstringOwner user ID
namestringUpdated folder name
parent_idinteger/nullParent folder ID
is_systembooleanIndicates if the folder is a system folder
file_countintegerNumber of files inside the folder
created_atdatetimeFolder creation timestamp
updated_atdatetimeLast update timestamp
deleted_atdatetime/nullSoft delete timestamp

Common Errors

  • 400 Bad Request

    • Missing name
    • Invalid folder name
  • 401 Unauthorized / 403 Forbidden

    • Missing or invalid Authorization header
    • Expired {{access_token}}
  • 404 Not Found

    • Folder does not exist

Notes

  • This endpoint only renames the folder; it does not change its location.
  • Files and subfolders inside the folder remain unchanged.
  • System folders (is_system = true) may not be renameable depending on permissions.

Request

This endpoint expects an object.
namestringRequired

Response

OK
dataobject
messagestring
successboolean