Templates


Retrieve the template data of your project including IDs, template titles and layer information via the API.

The template object

Properties

{
    "data": [
        {
            "uuid": "template_uuid",
            "title": "Template Title",
            "thumbnail": "https://urltoplacidthumbnail.com",
            "tags": [ "tag1", "tag2" ],
            "layers": [
                {
                    "name": "Text Layer",
                    "type": "text"
                },
                {
                    "name": "Picture Layer",
                    "type": "picture"
                },
                {
                    "name": "Rectangle Layer",
                    "type": "rectangle"
                },
                {
                  "name": "Browser Layer",
                  "type": "browserframe"
                }
            ]
        }
    ],
    "links": {
        "first": null,
        "last": null,
        "prev": "...", // - link to previous page
        "next": "..." // - link to next page
    },
    "meta": {
        "path": "https://api.placid.app/api/rest/templates",
        "per_page": 20
    }
}
Field Values
data Array of templates
template.uuid The template uuid
template.title The template title
template.thumbnail A URL pointing to a thumbnail preview of the template. This value can be null if the preview is currently being regenerated.
template.tags Array of assigned template tags
template.layers All dynamic layers of the template; To be filled with all applicable layer properties when generating images
links.prev Link to prev cursored page
links.next Link to next cursored page

List all templates of a project

Get a list of all your project's templates and their layer information. The API returns 20 items per page. You can optionally filter templates by a specific collection_id by including it as a query parameter in your request.

Endpoint

Method URI Description
GET https://api.placid.app/api/rest/templates Retrieve all templates
GET https://api.placid.app/api/rest/templates?collection_id={collection_id} Retrieve templates filtered by collection_id

Query Parameters

Parameter Type Description
collection_id string (Optional) The ID of the collection by which to filter the templates

Create a template

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

Endpoint

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

Request

{
  "title": "template title",
  "width": 1920,
  "height": 1080,

  "tags": ["tag1","tag2"],
  "custom_data": null,
  "from_template": "template_uuid",
  "add_to_collections": ["collection_uuid"]
}
Field Values Description
title Template Title Title of the new template.
width Template Width Set the canvas width of the new template.
height Template Height Set the canvas height of the new template.
tags Tags Up to 10 tags
custom_data Reference ID You can attach any value to the template which can be used to reference it later; up to 255 chars

TIP: You can put in a serialized JSON object
from_template From Template Create a new template based on an existing template UUID; this will override title, width, and height.

Use this to duplicate templates.
add_to_collections Template Collection IDs Add the new template to one or more specific template collections.

Retrieve a template

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

Endpoint

Method URI
GET https://api.placid.app/api/rest/templates/{template_uuid}

Update a template

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

Endpoint

Method URI
PATCH https://api.placid.app/api/rest/templates/{template_uuid}

Request

{
  "title": "template title", 
  "tags": ["tag1","tag2"],
  "custom_data": null
}
Field Values Description
title Template Title Updated Title of the template.
Field Values
template.uuid The template uuid
template.title The template title
template.tags Array of assigned template tags
template.layers All dynamic layers of the template; To be filled with all applicable layer properties when generating images, generating PDFs or generating videos

Delete a template

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

Endpoint

Method URI
DELETE https://api.placid.app/api/rest/templates/{template_uuid}

Response

Request will return a 200 status code on success.