> This page is for Platform, version V4 Experimental.
> For other versions, use one of these documentation indexes:
> - V4 (default): https://developer.frame.io/platform/v4/llms.txt
> - V4 Experimental: https://developer.frame.io/platform/v4-experimental/llms.txt
> - Legacy: https://developer.frame.io/platform/v2/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer.frame.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer.frame.io/_mcp/server.

# Update metadata

PATCH https://api.frame.io/v4/accounts/{account_id}/files/{file_id}/metadata
Content-Type: application/json

Update one or more metadata field values on a file.
Rate Limits: 100 calls per 1.00 minute(s) per account\_user

Reference: https://developer.frame.io/platform/v4-experimental/api-reference/metadata/update

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `account_id` (string, required)
- `file_id` (string, required)

### Headers

- `api-version` (enum, required)
  - Allowed values: `experimental`

### Body (application/json)

This endpoint expects an UpdateAssetMetadataParams.

- `data` (UpdateAssetMetadataParamsData, required)

## Response

### 200

OK

- `data` (MetadataWithDefinition, required)

## Errors

### 400 Bad Request Error

Bad request

- `errors` (list of BadRequestErrorsItems, required)

### 401 Unauthorized Error

Unauthorized

- `errors` (list of UnauthorizedErrorsItems, required)

### 403 Forbidden Error

Forbidden

- `errors` (list of ForbiddenErrorsItems, required)

### 404 Not Found Error

Not found

- `errors` (list of NotFoundErrorsItems, required)

### 409 Conflict Error

Conflict

- `errors` (list of ConflictErrorsItems, required)

### 422 Unprocessable Entity Error

Unprocessable content

- `errors` (list of UnprocessableContentErrorsItems, required)

### 429 Too Many Requests Error

Too many requests

- `errors` (list of TooManyRequestsErrorsItems, required)

## Types

### UpdateAssetMetadataParamsData

- `values` (list of UpdateAssetMetadataParamsDataValuesItems, required) — Metadata field and value mapping params. Note: Select and MultiSelect field values should be passed as lists, eg: \[\<uuid>]. Users and MultiUser values should be passed as lists formatted as follows: \[%\{id: \<user\_id>, type: "user"}, %\{id: \<user\_group\_id>, type: "account\_user\_group"}

### MetadataWithDefinition

- `file_id` (string, required) — File ID
- `metadata` (list of MetadataField, required) — Metadata fields values

### BadRequestErrorsItems

- `detail` (string, required)
- `source` (BadRequestErrorsItemsSource, optional)
- `title` (string, optional)

### UnauthorizedErrorsItems

- `detail` (string, required)
- `source` (UnauthorizedErrorsItemsSource, optional)
- `title` (string, optional)

### ForbiddenErrorsItems

- `detail` (string, required)
- `source` (ForbiddenErrorsItemsSource, optional)
- `title` (string, optional)

### NotFoundErrorsItems

- `detail` (string, required)
- `source` (NotFoundErrorsItemsSource, optional)
- `title` (string, optional)

### ConflictErrorsItems

- `detail` (string, required)
- `source` (ConflictErrorsItemsSource, optional)
- `title` (string, optional)

### UnprocessableContentErrorsItems

- `detail` (string, required)
- `source` (UnprocessableContentErrorsItemsSource, optional)
- `title` (string, optional)

### TooManyRequestsErrorsItems

- `detail` (string, required)
- `source` (TooManyRequestsErrorsItemsSource, optional)
- `title` (string, optional)

### UpdateAssetMetadataParamsDataValuesItems

- `field_definition_id` (string, required)
- `value` (any, required)

### MetadataField

- `field_type`: `date` (DateValue)
  - `field_definition_id` (string, required) — Field definition ID
  - `field_definition_name` (string, required) — Field definition name
  - `mutable` (boolean, required) — Metadata mutability. System field values cannot be updated.
  - `value` (string, required, nullable)
- `field_type`: `long_text` (TextValue)
  - `field_definition_id` (string, required) — Field definition ID
  - `field_definition_name` (string, required) — Field definition name
  - `mutable` (boolean, required) — Metadata mutability. System field values cannot be updated.
  - `value` (string, required, nullable)
- `field_type`: `number` (NumberValue)
  - `field_definition_id` (string, required) — Field definition ID
  - `field_definition_name` (string, required) — Field definition name
  - `mutable` (boolean, required) — Metadata mutability. System field values cannot be updated.
  - `value` (double, required, nullable)
- `field_type`: `rating` (IntegerValue)
  - `field_definition_id` (string, required) — Field definition ID
  - `field_definition_name` (string, required) — Field definition name
  - `mutable` (boolean, required) — Metadata mutability. System field values cannot be updated.
  - `value` (integer, required, nullable)
- `field_type`: `select` (SelectValue)
  - `field_definition_id` (string, required) — Field definition ID
  - `field_definition_name` (string, required) — Field definition name
  - `mutable` (boolean, required) — Metadata mutability. System field values cannot be updated.
  - `value` (list of SelectOption, required)
  - `field_options` (list of SelectOption, optional)
- `field_type`: `select_multi` (MultiSelectValue)
  - `field_definition_id` (string, required) — Field definition ID
  - `field_definition_name` (string, required) — Field definition name
  - `mutable` (boolean, required) — Metadata mutability. System field values cannot be updated.
  - `value` (list of SelectOption, required)
  - `field_options` (list of SelectOption, optional)
- `field_type`: `text` (TextValue)
  - `field_definition_id` (string, required) — Field definition ID
  - `field_definition_name` (string, required) — Field definition name
  - `mutable` (boolean, required) — Metadata mutability. System field values cannot be updated.
  - `value` (string, required, nullable)
- `field_type`: `toggle` (BooleanValue)
  - `field_definition_id` (string, required) — Field definition ID
  - `field_definition_name` (string, required) — Field definition name
  - `mutable` (boolean, required) — Metadata mutability. System field values cannot be updated.
  - `value` (boolean, required, nullable)
- `field_type`: `user_multi` (MultiUserValue)
  - `field_definition_id` (string, required) — Field definition ID
  - `field_definition_name` (string, required) — Field definition name
  - `mutable` (boolean, required) — Metadata mutability. System field values cannot be updated.
  - `value` (list of UserValue, required)
  - `custom_members` (list of UserValue, optional) — Populated with custom member options only if `member_options_type` is set to 'custom'.
  - `member_options_type` (enum, optional)
    - Allowed values: `custom`, `all_project_members`
- `field_type`: `user_single` (SingleUserValue)
  - `field_definition_id` (string, required) — Field definition ID
  - `field_definition_name` (string, required) — Field definition name
  - `mutable` (boolean, required) — Metadata mutability. System field values cannot be updated.
  - `value` (list of UserValue, required)
  - `custom_members` (list of UserValue, optional) — Populated with custom member options only if `member_options_type` is set to 'custom'.
  - `member_options_type` (enum, optional)
    - Allowed values: `custom`, `all_project_members`
- `field_type`: `users` (MultiUserValue)
  - `field_definition_id` (string, required) — Field definition ID
  - `field_definition_name` (string, required) — Field definition name
  - `mutable` (boolean, required) — Metadata mutability. System field values cannot be updated.
  - `value` (list of UserValue, required)
  - `custom_members` (list of UserValue, optional) — Populated with custom member options only if `member_options_type` is set to 'custom'.
  - `member_options_type` (enum, optional)
    - Allowed values: `custom`, `all_project_members`

### BadRequestErrorsItemsSource

- `pointer` (string, optional)

### UnauthorizedErrorsItemsSource

- `pointer` (string, optional)

### ForbiddenErrorsItemsSource

- `pointer` (string, optional)

### NotFoundErrorsItemsSource

- `pointer` (string, optional)

### ConflictErrorsItemsSource

- `pointer` (string, optional)

### UnprocessableContentErrorsItemsSource

- `pointer` (string, optional)

### TooManyRequestsErrorsItemsSource

- `pointer` (string, optional)

### SelectOption

- `display_name` (string, required) — Option display name
- `id` (string, required) — Option ID

### UserValue

- `id` (string, required) — User Id or Account User Group Id
- `type` (enum, required)
  - Allowed values: `user`, `account_user_group`

## Examples

**Request**

```json
{
  "data": {
    "values": [
      {
        "field_definition_id": "a133d6ea-3d5c-430e-8257-df2ca067037c",
        "value": "active"
      },
      {
        "field_definition_id": "4164accd-f2b5-4fd5-9f80-ee42796ba722",
        "value": 5
      }
    ]
  }
}
```

**Response**

```json
{
  "data": {
    "file_id": "5b8599bd-3792-4685-9653-d6558ad9aeee",
    "metadata": [
      {
        "field_type": "select_multi",
        "field_definition_id": "4a4af312-de4d-451e-a122-419add810261",
        "field_definition_name": "Fields definition name",
        "mutable": true,
        "value": [
          {
            "display_name": "Display name",
            "id": "f4a5455b-222a-47dd-a550-17475d8d0bf4"
          }
        ],
        "field_options": [
          {
            "display_name": "Display name",
            "id": "f4a5455b-222a-47dd-a550-17475d8d0bf4"
          },
          {
            "display_name": "Display name 2",
            "id": "2197d776-0b64-4ed9-8484-a14309af39ca"
          }
        ]
      },
      {
        "field_type": "text",
        "field_definition_id": "4a4af312-de4d-451e-a122-419add810261",
        "field_definition_name": "Fields definition name",
        "mutable": true,
        "value": "text value"
      }
    ]
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.frame.io/v4/accounts/23209e49-b0fb-4205-87dd-7c14bf3b11d6/files/2082a8e1-7730-4cef-b514-4ae0bba76e11/metadata"

payload = { "data": { "values": [
            {
                "field_definition_id": "a133d6ea-3d5c-430e-8257-df2ca067037c",
                "value": "active"
            },
            {
                "field_definition_id": "4164accd-f2b5-4fd5-9f80-ee42796ba722",
                "value": 5
            }
        ] } }
headers = {
    "api-version": "experimental",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.frame.io/v4/accounts/23209e49-b0fb-4205-87dd-7c14bf3b11d6/files/2082a8e1-7730-4cef-b514-4ae0bba76e11/metadata';
const options = {
  method: 'PATCH',
  headers: {
    'api-version': 'experimental',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"data":{"values":[{"field_definition_id":"a133d6ea-3d5c-430e-8257-df2ca067037c","value":"active"},{"field_definition_id":"4164accd-f2b5-4fd5-9f80-ee42796ba722","value":5}]}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.frame.io/v4/accounts/23209e49-b0fb-4205-87dd-7c14bf3b11d6/files/2082a8e1-7730-4cef-b514-4ae0bba76e11/metadata"

	payload := strings.NewReader("{\n  \"data\": {\n    \"values\": [\n      {\n        \"field_definition_id\": \"a133d6ea-3d5c-430e-8257-df2ca067037c\",\n        \"value\": \"active\"\n      },\n      {\n        \"field_definition_id\": \"4164accd-f2b5-4fd5-9f80-ee42796ba722\",\n        \"value\": 5\n      }\n    ]\n  }\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("api-version", "experimental")
	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.frame.io/v4/accounts/23209e49-b0fb-4205-87dd-7c14bf3b11d6/files/2082a8e1-7730-4cef-b514-4ae0bba76e11/metadata")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["api-version"] = 'experimental'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"data\": {\n    \"values\": [\n      {\n        \"field_definition_id\": \"a133d6ea-3d5c-430e-8257-df2ca067037c\",\n        \"value\": \"active\"\n      },\n      {\n        \"field_definition_id\": \"4164accd-f2b5-4fd5-9f80-ee42796ba722\",\n        \"value\": 5\n      }\n    ]\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.frame.io/v4/accounts/23209e49-b0fb-4205-87dd-7c14bf3b11d6/files/2082a8e1-7730-4cef-b514-4ae0bba76e11/metadata")
  .header("api-version", "experimental")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"data\": {\n    \"values\": [\n      {\n        \"field_definition_id\": \"a133d6ea-3d5c-430e-8257-df2ca067037c\",\n        \"value\": \"active\"\n      },\n      {\n        \"field_definition_id\": \"4164accd-f2b5-4fd5-9f80-ee42796ba722\",\n        \"value\": 5\n      }\n    ]\n  }\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.frame.io/v4/accounts/23209e49-b0fb-4205-87dd-7c14bf3b11d6/files/2082a8e1-7730-4cef-b514-4ae0bba76e11/metadata', [
  'body' => '{
  "data": {
    "values": [
      {
        "field_definition_id": "a133d6ea-3d5c-430e-8257-df2ca067037c",
        "value": "active"
      },
      {
        "field_definition_id": "4164accd-f2b5-4fd5-9f80-ee42796ba722",
        "value": 5
      }
    ]
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'api-version' => 'experimental',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.frame.io/v4/accounts/23209e49-b0fb-4205-87dd-7c14bf3b11d6/files/2082a8e1-7730-4cef-b514-4ae0bba76e11/metadata");
var request = new RestRequest(Method.PATCH);
request.AddHeader("api-version", "experimental");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"data\": {\n    \"values\": [\n      {\n        \"field_definition_id\": \"a133d6ea-3d5c-430e-8257-df2ca067037c\",\n        \"value\": \"active\"\n      },\n      {\n        \"field_definition_id\": \"4164accd-f2b5-4fd5-9f80-ee42796ba722\",\n        \"value\": 5\n      }\n    ]\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "api-version": "experimental",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["data": ["values": [
      [
        "field_definition_id": "a133d6ea-3d5c-430e-8257-df2ca067037c",
        "value": "active"
      ],
      [
        "field_definition_id": "4164accd-f2b5-4fd5-9f80-ee42796ba722",
        "value": 5
      ]
    ]]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.frame.io/v4/accounts/23209e49-b0fb-4205-87dd-7c14bf3b11d6/files/2082a8e1-7730-4cef-b514-4ae0bba76e11/metadata")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```