Set media folders
POST
/media/{id}/folders
const url = 'https://api.colourbox.com/media/1/folders';const options = { method: 'POST', headers: { Authorization: 'CBX-SIMPLE-TOKEN Token=<token>', 'Content-Type': 'application/json' }, body: '[{"group_id":202557,"status":"RELEASED"},{"group_id":392791,"status":"RELEASED"}]'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.colourbox.com/media/1/folders \ --header 'Authorization: CBX-SIMPLE-TOKEN Token=<token>' \ --header 'Content-Type: application/json' \ --data '[ { "group_id": 202557, "status": "RELEASED" }, { "group_id": 392791, "status": "RELEASED" } ]'Update the folders a media file resides in.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
integer
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
Array<object>
object
group_id
required
The folder ID
integer
status
Is always “RELEASED”
string
Example
[ { "group_id": 202557, "status": "RELEASED" }, { "group_id": 392791, "status": "RELEASED" }]Responses
Section titled “Responses”Folders updated