Possible to change video status via API?

I’m building an automation that syncs a status in Notion with the video status in Frame via Make. But I can’t seem to get it to work.

Settings I’m using:

Method: PATCH

Endpoint: https://api.frame.io/v4/accounts/{account_id}/files/{file_id}

Headers:

  1. Authorization: Bearer {access_token}
  2. Content-Type: application/json
  3. api-version: experimental (tried without this as well)

Body type: Raw

Content type: JSON (application/json)

Request content:
{
“data”: {
“status”: “{{2.frameStatus}}”
}
}

Screenshot showing the Frame status field I’m trying to update:

And here’s the error from Make:
Error: 422 Unprocessable Entity

{“errors”:[{“title”:“Invalid value”,“source”:{“pointer”:“/data/status”},“detail”:“Unexpected field: status”}]}

I couldn’t find anything useful on the dev docs or forums. Any help would be great :folded_hands:

you need to use the id of the status field, not the string.

So in the example below you would use bd7806b2-cd41-4105-9d2c-7e5a58cf2b62 and not Needs Review

Also since this is using the experimental version of the API for updating metadata at this time, be sure to add api-version:experimental to your header request

Great, thanks!

Could you clarify what the body should contain?

So far I tried:

{
“data”: {
“status”: “{{status_id}}”
}
}

and

{
  "data": {
    "metadata": {
      "file_attributes": [
        {
          "field_definition_id": "<field_definition_id>",
          "value": [
            { "id": "{{status_id}}" }
          ]
        }
      ]
    }
  }
}

They both give me the following error:

Error: 422 Unprocessable Entity
{"errors":[{"title":"Invalid value","source":{"pointer":"/data/metadata"},"detail":"Unexpected field: metadata"}]}

@tylermyeo you’re close.

Your payload would be:

{
  "data": {
    "asset_ids": ["your-asset-id"],
    "values": [
      {
        "field_definition_id": "your-status-field-id",
        "value": ["status-uuid"]
      }
    ]
  }
}

I just tested this myself and confirmed this works. Here was my example cURL command if you want to reference

curl -X PATCH "https://api.frame.io/v4/accounts/ACCOUNT_ID/projects/PROJECT_ID/metadata/values" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -H "api-version: experimental" \
  -d '{
    "data": {
      "asset_ids": [
        "YOUR_ASSET_ID"
      ],
      "values": [
        {
          "field_definition_id": "FIELD_DEFINITION_ID",
          "value": ["STATUS_UUID"]
        }
      ]
    }
  }'

Thanks!

That payload gives me a 403 error in Make (also tried in Postman with the same settings):

Error: 403 Forbidden
{"errors":[{"detail":"Forbidden"}]}

Any idea what could be causing this?

hmm not sure, I just tried again via Postman and didn’t have any issue.

Are you just using the PATCH {{BASE_URL}}/v4/accounts/:account_id/projects/:project_id/metadata/values endpoint?