Skip to main content
PATCH
/
:bucketName
/
{path}
curl --request PATCH \
  --url https://cdn.sacul.cloud/my-bucket/old-path.txt \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
	"newName": "new-path.txt"
}'
{
    "success": true,
    "message": "Renamed old-path.txt to new-path.txt",
    "newKey": "new-path.txt"
}

Documentation Index

Fetch the complete documentation index at: https://docs.sacul.cloud/llms.txt

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

Path Parameters

bucketName
string
required
The name of the bucket containing the file.
path
string
required
The current full path to the file.

Headers

Content-Type
string
required
Must be set to application/json.

Query Parameters

overwrite
boolean
default:"false"
If true, overwrite destination if it exists.

Body

You must provide either newName or newKey in the JSON body.
newName
string
New filename (keeps the same folder).
newKey
string
Full destination path (can move across folders).

Response

success
boolean
Indicates whether the operation was successful.
message
string
A descriptive message of the operation result.
newKey
string
The new full destination path of the file.
curl --request PATCH \
  --url https://cdn.sacul.cloud/my-bucket/old-path.txt \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
	"newName": "new-path.txt"
}'
{
    "success": true,
    "message": "Renamed old-path.txt to new-path.txt",
    "newKey": "new-path.txt"
}