Template Collections


A template collection allows you to group together multiple templates. This feature can be used to further organize your templates; for example, having a collection for a user of your SaaS that holds their templates.

The collection object

The collection object holds reference data that you can save, and which will be passed through with every request you make to us. It also contains a list of template_ids with the attached templates.

Properties

{
    "id": "...",
    "title": "...",
    "custom_data": "...",
    "template_uuids": [ "template_id_1", "template_id_2", "template_id_3" ]
}
Field Values Description
id Unique collection id for internal reference ID of the collection
title string Collection title
custom_data string or object Any data added to this parameter will be saved and sent in any subsequent webhooks and requests for this image (max length is 1024 characters)
template_uuids array of template uuids A list of template IDs; limited to 500 at the moment

List all collections

This endpoint retrieves all the template collections available for a project.

Endpoint

Method URI
GET https://api.placid.app/api/rest/collections

Create a collection

Create a new template collection by using the following endpoint and request structure:

Endpoint

Method URI
POST https://api.placid.app/api/rest/collections

Request

{
  "title": "collection_title",
  "custom_data": null,
  "template_uuids": [ "template_uuid1", "template_uuid2" ]
}
Field Values Description
title string (max 255 chars) The title of the collection.
custom_data string or object Any data added to this field will be saved and forwarded in any subsequent requests for this collection. Max length is 1024 characters.
template_uuids array (list of template UUIDs; limited to 500) An array containing the UUIDs of the templates to be included in the collection

Retrieve a collection

This endpoint allows you to retrieve a collection by providing their collection_id. Refer to the object at the top of this page to see which properties are included with collection objects.

Endpoint

Method URI
GET https://api.placid.app/api/rest/collections/{collection_id}

Update a collection

Update the details of an existing template collection. This can include modifying the custom_data or updating the list of template_ids.

Endpoint

Method URI
PATCH https://api.placid.app/api/rest/collections/{collection_id}

Request

{
  "title": "collection_title",
  "custom_data": null,
  "template_uuids": [ "template_uuid1", "template_uuid2" ],
  "add_template_uuids": [ "new_template_uuid1" ],
  "remove_template_uuids": [ "template_uuid1" ]
}
Field Values Description
title string (max 255 chars) The title of the collection.
custom_data string or object Any data added to this field will be saved and forwarded in any subsequent requests for this collection. Max length is 1024 characters.
template_uuids array (list of template UUIDs; limited to 500) If provided, this will replace the entire existing list of associated templates for the collection.
add_template_uuids array (list of template UUIDs; limited by the total limit of 500) Templates specified here will be added to the collection.
remove_template_uuids array (list of template UUIDs) Templates specified here will be removed from the collection.

Delete a collection

This endpoint allows the user to delete a specific template collection, identified by its collection_id.

Endpoint

Method URI
DELETE https://api.placid.app/api/rest/collections/{collection_id}