Skip to main content
GET
/
templates
List templates
curl --request GET \
  --url https://api.pictify.io/templates \
  --header 'Authorization: Bearer <token>'
{
  "templates": [
    {
      "uid": "<string>",
      "name": "<string>",
      "type": "<string>",
      "category": "<string>",
      "tags": [
        "<string>"
      ],
      "width": 123,
      "height": 123,
      "thumbnail": "<string>",
      "variableDefinitions": [
        {
          "name": "<string>",
          "defaultValue": "<string>",
          "description": "<string>",
          "validation": {
            "required": true,
            "minLength": 123,
            "maxLength": 123
          }
        }
      ],
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  ],
  "pagination": {
    "page": 123,
    "limit": 123,
    "total": 123,
    "totalPages": 123,
    "hasNext": true,
    "hasPrev": true
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.pictify.io/llms.txt

Use this file to discover all available pages before exploring further.

Templates

Templates are reusable designs with dynamic variables. Create once, render with different data.
For expression syntax and conditional rendering, see Expressions.

Endpoints

MethodEndpointDescription
GET/templatesList templates
POST/templatesCreate template
GET/templates/{uid}Get template
PUT/templates/{uid}Update template
DELETE/templates/{uid}Delete template
POST/templates/{uid}/renderRender template to an image
GET/templates/{uid}/variablesGet variables defined in a template

Variable Types

Templates support different variable types in {{variable}} placeholders:
TypeExampleDescription
string"Hello World"Text content
number42, 3.14Numeric values
booleantrue, falseConditional rendering
array["a", "b"]Lists for iteration
object{name: "..."}Nested data

Using Variables in Templates

Simple Interpolation

<h1>{{title}}</h1>
<p>By {{author}}</p>

Conditional Rendering

<div _if="showBadge" class="badge">Premium</div>

Expressions

<p>Total: {{currency(price * quantity, 'USD')}}</p>
See Expressions for the full expression syntax.

Template Content

A template requires either html or fabricJSData (FabricJS canvas JSON), but not both.
Either html or fabricJSData is required when creating a template. You cannot provide both.

Authorizations

Authorization
string
header
required

API key obtained from the Pictify dashboard

Query Parameters

page
integer
default:1
limit
integer
default:12
Required range: x <= 100
sort
enum<string>
default:newest
Available options:
newest,
oldest,
name
outputFormat
enum<string>
default:all
Available options:
all,
image,
pdf

Response

200 - application/json

List of templates

templates
object[]
pagination
object