Update a file
Update a file's metadata: rename it, change its description, attach or detach workspace tags (tagsToAdd / tagsToRemove), or set custom-field values (customFields). Send at least one field. When renaming, keep the original file extension. Tag ids must belong to the header workspace. Returns the updated file.
Authentication
authentication Create an API key from the Adnova dashboard (Account integrations). Pass the key value in the api-key request header on every call.
In: header
Path Parameters
File id.
1 <= lengthHeader Parameters
Workspace the request operates in. Get it from List workspaces.
1 <= lengthOrganization context (required on every endpoint).
1 <= lengthRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://api.adnova.ai/creative-hub/v1/files/01J8ZF9K8M7N6P5R4S3T2V1W0X" \ -H "x-workspace-id: 01J8ZQ9X2K3M4N5P6R7S8T9V0W" \ -H "x-org-id: 01J8ZQ7B3C4D5F6G7H8K9M0N1P" \ -H "Content-Type: application/json" \ -d '{}'{
"_id": "01H8YA...",
"name": "spring-hero.mp4",
"mime": "video/mp4",
"extension": "mp4",
"size": 1846720,
"mediaKey": "01H8Y3.../__MEDIA_FILES/01H8YA...",
"thumbnailKey": "01H8Y3.../__MEDIA_FILES/01H8YA...-thumb.jpg",
"thumbnailURL": "https://adnova-media.s3.amazonaws.com/01H8Y3.../__MEDIA_FILES/01H8YA...-thumb.jpg",
"mediaURL": "https://adnova-media.s3.amazonaws.com/01H8Y3.../__MEDIA_FILES/01H8YA...",
"versionId": "V123ABC...",
"versions": [
{
"versionId": "V123ABC...",
"name": "spring-hero.mp4",
"mime": "video/mp4",
"extension": "mp4",
"size": 1846720,
"mediaKey": "01H8Y3.../__MEDIA_FILES/01H8YA...",
"thumbnailKey": "01H8Y3.../__MEDIA_FILES/01H8YA...-thumb.jpg",
"thumbnailURL": "https://adnova-media.s3.amazonaws.com/01H8Y3.../__MEDIA_FILES/01H8YA...-thumb.jpg",
"mediaURL": "https://adnova-media.s3.amazonaws.com/01H8Y3.../__MEDIA_FILES/01H8YA...",
"createdAt": "2019-08-24T14:15:22Z"
}
],
"tags": [
"01H8YT..."
],
"customFields": {
"01H8YF...": "01H8YG..."
},
"parents": [
"01H8YC..."
],
"createdAt": "2019-08-24T14:15:22Z"
}{
"error": {
"code": "string",
"message": "string"
},
"message": "string"
}{
"error": {
"code": "string",
"message": "string"
},
"message": "string"
}{
"error": {
"code": "string",
"message": "string"
},
"message": "string"
}{
"error": {
"code": "string",
"message": "string"
},
"message": "string"
}{
"error": {
"code": "string",
"message": "string"
},
"message": "string"
}{
"error": {
"code": "string",
"message": "string"
},
"message": "string"
}