Update file metadata

Sets the file metadata provided in the request body for the respective file.

After the metadata keys are validated, only the key-value pairs in the request body are updated.

PUT /v4/file/{file_uuid}/meta

API permissions

FILE_META_CHANGE

Body

{
    "meta": {
        "title": {
          "de_DE": "Boot",
          "en_US": "boat",
          "fr_FR": "bateau",
          "it_IT": "barca"
        },
        "price":70,
        "sku":"A320120",
        "material":"leather"
    }
}

The metadata key-value pairs have to match the structure of your container (can be seen in the response of Get file details API). Only the fields provided in the request body are updated, others are left untouched.

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/file/{file_uuid}/meta" headers: X-Filerobot-Key: 19692813e7364ef8ad6a6504d50a12ca Content-Type: application/json variables: file_uuid: 6e11018f-669e-5ce6-9dd2-82ca1cd50000 body: | { "meta": { "title": { "de_DE": "Boot", "en_US": "boat", "fr_FR": "bateau", "it_IT": "barca" }, "price":70, "sku":"A320120", "material":"leather" } } theme: clouds-midnight editor_theme: clouds_midnight method: PUT render: curl_tab: true

Response

{
    "status": "success",
    "action": "meta_updated",
    "file_uuid": "d7a64732-8a70-5b28-a483-b09298350000",
    "meta": {
        "sku": "A320120",
        "price": "70",
        "title": {
            "de_DE": "Boot",
            "en_US": "boat",
            "fr_FR": "bateau",
            "it_IT": "barca"
        },
        "category": [],
        "material": "leather",
        "description": {
          "de_DE": "ein kleines Boot",
          "en_US": "a small boat",
          "fr_FR": "un petit bateau",
          "it_IT": "una piccola barca"
        }
    },
    "file": {
        "uuid": "d7a64732-8a70-5b28-a483-b09298350000",
        "name": "leather.jpg",
        "extension": "jpg",
        "size": {
            "bytes": 104778,
            "pretty": "102.32 KB"
        },
        "type": "image/jpeg",
        "info": {
            "name": "leather.jpg",
            "type": "image/jpeg",
            "img_h": 1000,
            "img_w": 667,
            "img_type": "JPEG",
            "visibility": "2"
        },
        "meta": {
            "sku": "A320120",
            "price": "70",
            "title": {
                "de_DE": "Boot",
                "en_US": "boat",
                "fr_FR": "bateau",
                "it_IT": "barca"
            },
            "category": [],
            "material": "leather",
            "description": {
              "de_DE": "ein kleines Boot",
              "en_US": "a small boat",
              "fr_FR": "un petit bateau",
              "it_IT": "una piccola barca"
            },
        },
        "visibility": {
            "value": "VISIBILITY_INHERIT",
            "inherited": "VISIBILITY_PUBLIC",
            "set": "VISIBILITY_INHERIT",
            "actual": "VISIBILITY_PUBLIC"
        },
        "url": {
            "public": "https://store.filerobot.com/fdocs/api-demo/new-folder/leather.jpg",
            "permalink": "https://api.filerobot.com/fdocs/v4/get/d7a64732-8a70-5b28-a483-b09298350000",
            "cdn": "https://fdocs.filerobot.com/api-demo/new-folder/leather.jpg?vh=2558f1",
            "path": "/api-demo/new-folder/leather.jpg"
        },
        "hash": {
            "sha1": "2558f1789fdb6b31c173602ed600183185a9448d",
            "blurhash": "AcE.;M-p?woz"
        },
        "created_at": "2021-08-23T12:42:45Z",
        "modified_at": "2021-08-24T16:19:14Z",
        "folder": {
            "uuid": "c35f5199-19da-57e1-9230-ec4a136db6b6",
            "name": "/api-demo/new-folder"
        },
    }
}