Rename a file
PATCH
/
api
/
files
/
{id}
Rename a file
curl --request PATCH \
--url https://convertly.sh/api/files/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"filename": "<string>"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({filename: '<string>'})
};
fetch('https://convertly.sh/api/files/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"file": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"mime_type": "<string>",
"size_bytes": 123,
"created_at": "2023-11-07T05:31:56Z",
"folder_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"downloadUrl": "<string>"
}
}{
"error": "<string>",
"upgradeUrl": "<string>"
}{
"error": "<string>",
"upgradeUrl": "<string>"
}{
"error": "<string>",
"upgradeUrl": "<string>"
}{
"error": "<string>",
"upgradeUrl": "<string>"
}Authorizations
bearerAuthapiKeyAuth
Dashboard-generated Convertly API key. Keys currently begin with cvly_.
Path Parameters
Body
application/json
Minimum string length:
1Response
Renamed file
Show child attributes
Show child attributes
⌘I
Rename a file
curl --request PATCH \
--url https://convertly.sh/api/files/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"filename": "<string>"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({filename: '<string>'})
};
fetch('https://convertly.sh/api/files/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"file": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"mime_type": "<string>",
"size_bytes": 123,
"created_at": "2023-11-07T05:31:56Z",
"folder_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"downloadUrl": "<string>"
}
}{
"error": "<string>",
"upgradeUrl": "<string>"
}{
"error": "<string>",
"upgradeUrl": "<string>"
}{
"error": "<string>",
"upgradeUrl": "<string>"
}{
"error": "<string>",
"upgradeUrl": "<string>"
}