Skip to content

Update File Metadata

Update the specified file metadata.

Note

File metadata cannot be moved to a different file on update; its fileId is fixed. The fileId field is still accepted in the request body, but any value other than the metadata's current file is ignored rather than rejected.

Verb PATCH
Endpoint {base-url}/files/metadata
Max Page Size N/A

Request Body

{
  "body": [
    {
      "id": 1,
      "key": "type",
      "value": "xls",
      "fileId": 7
    }
  ]
}

Note

All changes in this request are atomic. If any item fails, the entire batch is rolled back and no changes are made.

Returns

On Success

Return the updated file metadata.

Response Body

[
  {
    "id": 1,
    "key": "type",
    "value": "xls",
    "fileId": 7
  }
]

On Error

HTTP Code Error Code Definition
422 VALIDATION_ERROR A required field is missing or invalid (e.g. key is missing or exceeds 300 characters, value is missing or exceeds 300 characters).
403 DATA_ACCESS_VIOLATION One or more of the specified file metadata records belong to an organization you do not have access to.
404 MISSING_RECORD One or more of the specified file metadata id values does not exist.