Media (Audio/Video)

Update meta-data

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

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

Path parameters

mediaIdstring required

Request body

createdAtstring

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.

descriptionstring

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.

folderIdstring

The id of the folder you want to move the file into. Optional. An empty string is allowed but is treated as no change.

mediaIdstring

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.

manageBystring

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').

namestring 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.

remarkstring

A note stored with the file. Optional. An empty string is allowed but is treated as no change.

statusstring

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.

tagsstring[]

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

OK

statusstring
messagestring

Changes

No recorded changes to this operation across all 2 revisions of this API.