Skip to main content
PATCH
cURL
This endpoint has a rate limit of 1 request every 3 seconds, shared with the other endpoints that change files (upload, delete, rename, move and create).

Authorizations

Authorization
string
header
required

Your CamposCloud API token, sent as Authorization: Bearer <token>.

Path Parameters

appId
string
required

ID of the application.

Pattern: ^[a-f0-9]{24}$

Body

application/json
filePath
string
required

Current path of the file or directory. Must not be the application root.

Required string length: 1 - 1024
Example:

"src/old-name.js"

newName
string
required

New name only, without any directory. It must not contain /, must not be . or .., must not start or end with a space and must not end with a dot.

Required string length: 1 - 255
Example:

"new-name.js"

Response

The file or directory was renamed.

message
string
Example:

"Renamed successfully"