Skip to content

Update media metadata

POST
/media/{id}/metadata
curl --request POST \
--url https://api.colourbox.com/media/1/metadata \
--header 'Authorization: CBX-SIMPLE-TOKEN Token=<token>' \
--header 'Content-Type: application/json' \
--data '{ "editorial": false, "adult_content": false, "keywords": { "en": [ "keyword1", "keyword2" ] }, "title": { "en": "Title" }, "description": { "en": "Description" }, "iptc": { "Keywords": [ "keyword1", "keyword2" ], "Caption-Abstract": "title" }, "geolocation": { "source": "gps", "longitude": 7.26627, "latitude": 43.7034 } }'

Update the entire metadata sub-document of the media.

Note that on title, description and keywords, only en is indexed by the Colourbox search engines for your own files. All languages are indexed on Colourbox media.

id
required
integer
Media typeapplication/json
object
editorial
required
boolean
adult_content
required
boolean
keywords
required

Keywords per language, e.g. en

object
key
additional properties
Array<string>
title
required

Title per language, e.g. en

object
key
additional properties
string
description
required

Description per language, e.g. en

object
key
additional properties
string
iptc
required
object
geolocation
required
object
latitude
required

A number. GET /media/{id} returns it as a string; convert it before sending it back.

number
longitude
required

A number. GET /media/{id} returns it as a string; convert it before sending it back.

number
source
required
string
Allowed values: lookup gps
camera_created

The time the picture was taken as a UNIX timestamp

number
nullable

Example

{
"editorial": false,
"adult_content": false,
"keywords": {
"en": [
"keyword1",
"keyword2"
]
},
"title": {
"en": "Title"
},
"description": {
"en": "Description"
},
"iptc": {
"Keywords": [
"keyword1",
"keyword2"
],
"Caption-Abstract": "title"
},
"geolocation": {
"source": "gps",
"longitude": 7.26627,
"latitude": 43.7034
}
}

Metadata updated