---
title: "Update meta-data"
method: PUT
path: "/media/{mediaId}"
tags: ["Media (Audio/Video)"]
---

# Update meta-data

`PUT /media/{mediaId}`

## Request

- Base URL: `https://api.speakai.co/v1`
- URL: `https://api.speakai.co/v1/media/{mediaId}`
- Auth: API key in header `x-speakai-key` and API key in header `x-access-token`

If you want to rename, edit description or add a tag to your media, you can do it here.

## Path parameters

- `mediaId` string, required

## Request body

- object
  - `createdAt` string: The creation date to store on the file. Optional. An empty string is allowed, but the controller only writes the value when it is truthy, so an empty string does not clear the existing date.
  - `description` string: A short description for the file. Optional. Trimmed. An empty string is allowed by validation, but the controller only writes a non empty value, so you cannot clear the description this way.
  - `folderId` string: The id of the folder you want to move the file into. Optional. An empty string is allowed but is treated as no change.
  - `mediaId` string: Ignored. The server takes the media id from the path, not from the body. Optional. An empty string is allowed. Accepted by validation and never destructured by the controller.
  - `manageBy` string: The id of the user you want the file assigned to. Optional. An empty string is allowed but is treated as no change. Stored as a reference to a user record (media model: Schema.Types.ObjectId, ref 'User').
  - `name` string, required: The new title for the file. Required. Minimum length 1. This is the only property the controller always writes, so every update overwrites the title.
  - `remark` string: A note stored with the file. Optional. An empty string is allowed but is treated as no change.
  - `status` string: The workflow status of the file. Optional and unconstrained by the schema, so any string passes validation. The media model recognizes '', pending, progress, completed and pendingPayment, and the update runs through findOneAndUpdate without runValidators, so the model enum is not enforced on this path. Only written when not empty.
  - `tags` string[]: The full list of tags for the file. The list you send replaces the existing one. Optional. Items are strings and empty strings are allowed. There is no cap on the number of items. Only written when the property is present, and an empty array is truthy so it does clear the tags.

## Response `200`

OK

- object
  - `status` string
  - `message` string

## Other responses

- `404`: Not Found

---

[API](https://skmtc.dev/speakai/apis/speak-ai-api.md) · [All operations](https://skmtc.dev/speakai/apis/speak-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/speakai/apis/speak-ai-api/revisions/52d777e6d46e?raw)
