Collections
A Collection represents a set of media files grouped by specific attributes and includes all types of assets. It can be a collection of images, videos, documents or audio files.
The Collection object
{
"id": "df7c1544-bad0-4c9d-928f-0c9f684c9ceb",
"created_on": "2023-06-13T14:35:54+00:00",
"changed_on": "2023-06-13T14:35:54+00:00",
"label": "Collection",
"body": "Branding & backgrounds"
}
FIELD | DESCRIPTION |
---|---|
id | Unique identifier for each item. |
created_on | UTC time at which the asset was created/upload. |
changed_on | UTC time at which the asset was last updated. |
label | Identifier for the object. |
body | Name of the collection. |
Create, update or destroy
Create a new collection
To create a collection.
POST: /collections
Update an existing collection
To update a collection.
PUT: /collections/{id}
Destroy an existing collection
To destroy a collection.
DELETE: /collections/{id}
Managing collections
Add assets to a collection
To add assets to an existing collection.
{
"items" : [
{
"id" : "234h-432847-x23498-763x4-324x234" // The Asset ID.
}
]
}
POST: /collections/{id}/assets
Remove assets from a collection
To remove assets from the collection.
{
"items" : [
{
"id" : "234h-432847-x23498-763x4-324x234" // The Asset ID.
}
]
}
DELETE: /collections/{id}/assets
Set a collection cover
To set a cover of the collection.
POST: /collections/{id}/cover?id={assetId}
Scopes
collections
, collections_publish
, collections_delete
Was this article helpful?
We’d love to learn from your feedback