Collections

Asset 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"
}
FIELDDESCRIPTION
idUnique identifier for each item.
created_onUTC time at which the asset was created/upload.
changed_onUTC time at which the asset was last updated.
labelIdentifier for the object.
bodyName 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, use the example below. This process only adds new assets to the collection. If this collection already has assets, these remain in the collection unchanged and duplicate entries are simply ignored.

{
  "items" : [
      {
          "id" : "234h-432847-x23498-763x4-324x234" // The Asset ID, you can add mulitple assets at once.
      },
      {
          // "id" : "30f064f4-8acb-4ee9-9e79-81d7029cc0c7"
      }
  ]
}
POST: /collections/{id}/assets

Remove assets from a collection

To remove assets from an existing collection, use the example below.

{
  "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