Templates
Templates are, well, templates that you can cutomize in order to design hundreds of images for any of your marketing needs. You can use these templates to generate social cards, product images, instagram stories, certificates, and so on. In this page you'll learn how to list them with the API, and how to know what can be modified in these templates.
The template model
Properties
- Name
id
- Type
- string
- Description
Unique identifier for the contact.
- Name
title
- Type
- string
- Description
The title of the template.
- Name
layers
- Type
- array
- Description
An array of Layer objects that compose the given template
- Name
width
- Type
- integer
- Description
The width in pixels of the template
- Name
height
- Type
- integer
- Description
The height in pixels of the template
- Name
created_at
- Type
- timestamp
- Description
Timestamp of when the template was created
Template model
{
"id": "141e8454-8aa1-420a-bd0b-18a85ba949a2",
"title": "Movie reviews twitter card",
"height": 1080,
"width": 1500,
"layers": [
{
"layer": "review_poster",
"available_modifications": {
"image_url": "https://snapsbrew.com/crazy-doc-brown-jailed"
}
},
{
"layer": "review_title",
"available_modifications": {
"text": "The best Time-Travel movie ever made"
}
},
{
"layer": "reviewer_handle",
"available_modifications": {
"text": "@grumpyTraveler"
}
}
],
"created_at": "1985-10-15:18:38.000000Z"
}
List all templates
This endpoint will allow you to make a GET
request to get a list of the templates that have been created in your account. This endpoint doesn't have any required fields but you certainly need to add a few to travel trough the paginated list.
Optional attributes
- Name
cursor
- Type
- string
- Description
Cursor position of the paginated response.
- Name
pagination
- Type
- integer
- Description
The items quantity returned in each response page. Defaults to
15
.
Request
{
"cursor": "1041afe7-b9c3-42ef-8530-6910bb486e76"
}
Response
{
"items": [
{
"id": "141e8454-8aa1-420a-bd0b-18a85ba949a2",
"title": "Movie reviews twitter card",
"height": 1080,
"width": 1500,
"layers": [
{
"layer": "review_poster",
"available_modifications": {
"image_url": "https://snapsbrew.com/crazy-doc-brown-jailed"
}
},
{
"layer": "review_title",
"available_modifications": {
"text": "The best Time-Travel movie ever made"
}
},
{
"layer": "reviewer_handle",
"available_modifications": {
"text": "@grumpyTraveler"
}
}
],
"created_at": "1985-10-15:18:38.000000Z"
},
...
],
"metadata": {
"items_per_page": 15,
"next_page_cursor": "d78ae80b-34d5-4a1e-8845-48bbff14697b",
"previous_page_cursor": null
}
}
Retrieve a template
This endpoint will allow you to make a GET
request to get a single template.
Response
{
"id": "141e8454-8aa1-420a-bd0b-18a85ba949a2",
"title": "Movie reviews twitter card",
"height": 1500,
"width": 1080,
"layers": [
{
"layer": "review_poster",
"available_modifications": {
"image_url": "https://snapsbrew.com/crazy-doc-brown-jailed"
}
},
{
"layer": "review_title",
"available_modifications": {
"text": "The best Time-Travel movie ever made"
}
},
{
"layer": "reviewer_handle",
"available_modifications": {
"text": "@grumpyTraveler"
}
}
],
"created_at": "1985-10-15:18:38.000000Z"
}