Rename file

Renames the file with the value given in the body.

PATCH /v4/files/{file_uuid}

API Permissions

FILE_RENAME

Body

{
    "name":"new_filename.jpg"
}

Try it out

Request

Copy-paste the cURL request in your Terminal or click on the API Explorer tab to see the API in action.

host: 'https://api.filerobot.com/fdocs' path: '/v4/files/{file_uuid}' variables: file_uuid: 8f2b979e-57e0-5d91-8068-f26c99450000 headers: X-Filerobot-Key: fa5fe3303dd34e1da4810915c7c3fd6f theme: clouds-midnight editor_theme: clouds_midnight method: PATCH body: | { "name": "new_filename.jpg" } render: curl_tab: true

Response

{
  "status": "success",
  "action": "file_renamed",
  "file_uuid": "8f2b979e-57e0-5d91-8068-f26c99450000",
  "file": {
    "uuid": "8f2b979e-57e0-5d91-8068-f26c99450000",
    "name": "newname.jpg",
    "extension": "jpg",
    "size": {
      "bytes": 873178,
      "pretty": "852.71 KB"
    },
    "flags": [],
    "type": "image/jpeg",
    "info": {
      "img_h": 1400,
      "img_w": 2100,
      "img_type": "JPEG",
      "visibility": "2"
    },
    "meta": {
      "fthfth": null,
      "propro": null,
      "meta_key": null,
      "test key2": null,
      "test key3": null,
      "test_tags": null,
      "dsfgdfgfdg": null
    },
    "visibility": {
      "value": "VISIBILITY_INHERIT",
      "inherited": "VISIBILITY_PUBLIC",
      "set": "VISIBILITY_INHERIT",
      "actual": "VISIBILITY_PUBLIC"
    },
    "url": {
      "public": "https://store.filerobot.com/fdocs/api-demo/newname.jpg",
      "permalink": "https://api.filerobot.com/fdocs/v4/get/8f2b979e-57e0-5d91-8068-f26c99450000",
      "cdn": "https://fdocs.filerobot.com/api-demo/newname.jpg?vh=7559b0",
      "path": "/api-demo/newname.jpg"
    },
    "hash": {
      "sha1": "7559b07b5886f5a404bd3f1f5d8b1955c7ac434c",
      "blurhash": null
    },
    "created_at": "2021-05-04T09:01:46Z",
    "modified_at": "2021-05-04T13:32:34Z",
    "folder": {
      "uuid": "7610923e-80d0-50e8-a2e4-c509be390158",
      "name": "/api-demo"
    },
    "product": {
      "ref": null,
      "position": null
    }
  }
}