Stencil Documentation
  • General
  • API
    • Authentication
      • Account
    • Pagination
    • Status Code and Throttling
    • Endpoints
      • Projects
      • Templates
      • Images
      • Collections
      • PDFs
      • Airtable
    • Charts
  • Using Stencil
    • Template Editor (New)
    • Template Editor (Legacy)
      • Limited Markdown Supports
      • Anchoring Element
      • Using Custom Font
      • Circular Text Positioning
    • White Label for Business
      • Setting Up Your First Client
      • DNS Setup with Cloudflare
  • Guides
    • Airtable Integration
      • Basic
    • Integromat Integration
      • Connection
      • Instant Trigger
    • Zapier Integration
      • Authentication
      • Trigger - New Image
      • Action - Create Image
    • Secure Signed Image
      • Basic
    • Query String Integration
      • Basic
      • Cache
    • Forms Integration
    • Case Studies
      • Generate Instagram Post from WooCommerce
      • Generate Open Graph Image for WordPress
      • Generate Personalized SendGrid Email Campaigns
      • Sending Charts to Twitter
      • Generate Instagram Post from Shopify
      • Automating Webflow Open Graph Image
      • Generate certificate of accomplishment
      • Automate Candidate's Certificate Generation
  • LINKS
    • Back to Stencil
    • Got bug?
    • Need feature?
    • Blog
Powered by GitBook
On this page
  • List templates
  • Get specific template
  • Response

Was this helpful?

  1. API
  2. Endpoints

Templates

List available templates

List templates

GET https://api.usestencil.com/v1/projects/:project_id/templates

Path Parameters

Name
Type
Description

project_id

string

Project ID

Query Parameters

Name
Type
Description

before

string

Query the previous result set

after

string

Query the next result set

{
  "meta":{
    "next":null,
    "previous":null,
    "total_count":2
  },
  "results":[
    {
      "available_modifications":[
        [
          {
            "description":"URL of the image",
            "field":"src",
            "primary":true,
            "required":true,
            "type":"string",
            "value":"https//example.com/image.png"
          },
          {
            "description":"Object identifier",
            "field":"name",
            "primary":false,
            "required":true,
            "type":"string",
            "value":"image_3"
          },
          {
            "description":"Angle of the object",
            "field":"angle",
            "primary":false,
            "required":false,
            "type":"integer",
            "value":0
          }
        ],
        [
          {
            "description":"Value for the textbox",
            "field":"text",
            "primary":true,
            "required":true,
            "type":"string",
            "value":"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do..."
          },
          {
            "description":"Text color",
            "field":"fill",
            "primary":false,
            "required":false,
            "type":"string",
            "value":"rgba(15, 15, 15, 1)"
          },
          {
            "description":"Object identifier",
            "field":"name",
            "primary":false,
            "required":true,
            "type":"string",
            "value":"circular_text_2"
          },
          {
            "description":"Angle of the object",
            "field":"angle",
            "primary":false,
            "required":false,
            "type":"integer",
            "value":0
          }
        ],
        [
          {
            "description":"Value for the textbox",
            "field":"text",
            "primary":true,
            "required":true,
            "type":"string",
            "value":"ينا الألم. في بعض الأحيان ونظراً للالتزامات التي يفرضها علينا الواجب والعمل سنتنازل غالباً ونرفض الشعور"
          },
          {
            "description":"Text color",
            "field":"fill",
            "primary":false,
            "required":false,
            "type":"string",
            "value":"rgba(0, 0, 0, 1)"
          },
          {
            "description":"Object identifier",
            "field":"name",
            "primary":false,
            "required":true,
            "type":"string",
            "value":"text_5"
          },
          {
            "description":"Angle of the object",
            "field":"angle",
            "primary":false,
            "required":false,
            "type":"integer",
            "value":0
          }
        ]
      ],
      "created_at":"2021-05-22T05:00:44Z",
      "id":"10dee897-cc28-4ae1-bf8e-f1bc1c551fe3",
      "name":"Test2",
      "project_id":"f2eb2dab-a861-4960-b5f4-d54c61552f7d",
      "self":"http://localhost:4000/api/v1/templates/10dee897-cc28-4ae1-bf8e-f1bc1c551fe3",
      "signed_image_base":"Hts6NWUuvtXbmGaQbM2kGM",
      "starred":false,
      "updated_at":"2021-05-22T05:00:59Z"
    },
    {
      "available_modifications":[
        [
          {
            "description":"URL of the image",
            "field":"src",
            "primary":true,
            "required":true,
            "type":"string",
            "value":"https//example.com/image.png"
          },
          {
            "description":"Object identifier",
            "field":"name",
            "primary":false,
            "required":true,
            "type":"string",
            "value":"image_3"
          },
          {
            "description":"Angle of the object",
            "field":"angle",
            "primary":false,
            "required":false,
            "type":"integer",
            "value":0
          }
        ],
        [
          {
            "description":"Value for the textbox",
            "field":"text",
            "primary":true,
            "required":true,
            "type":"string",
            "value":"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do..."
          },
          {
            "description":"Text color",
            "field":"fill",
            "primary":false,
            "required":false,
            "type":"string",
            "value":"rgba(15, 15, 15, 1)"
          },
          {
            "description":"Object identifier",
            "field":"name",
            "primary":false,
            "required":true,
            "type":"string",
            "value":"circular_text_2"
          },
          {
            "description":"Angle of the object",
            "field":"angle",
            "primary":false,
            "required":false,
            "type":"integer",
            "value":0
          }
        ],
        [
          {
            "description":"Value for the textbox",
            "field":"text",
            "primary":true,
            "required":true,
            "type":"string",
            "value":"ينا الألم. في بعض الأحيان ونظراً للالتزامات التي يفرضها علينا الواجب والعمل سنتنازل غالباً ونرفض الشعور"
          },
          {
            "description":"Text color",
            "field":"fill",
            "primary":false,
            "required":false,
            "type":"string",
            "value":"rgba(0, 0, 0, 1)"
          },
          {
            "description":"Object identifier",
            "field":"name",
            "primary":false,
            "required":true,
            "type":"string",
            "value":"text_5"
          },
          {
            "description":"Angle of the object",
            "field":"angle",
            "primary":false,
            "required":false,
            "type":"integer",
            "value":0
          }
        ]
      ],
      "created_at":"2021-05-22T04:59:03Z",
      "id":"70176253-3bcb-4592-913d-a6c5df83a258",
      "name":"Untitled",
      "project_id":"f2eb2dab-a861-4960-b5f4-d54c61552f7d",
      "self":"http://localhost:4000/api/v1/templates/70176253-3bcb-4592-913d-a6c5df83a258",
      "signed_image_base":"Hts6NWUuvtXbmGaQbM2kGM",
      "starred":true,
      "updated_at":"2021-05-22T07:43:02Z"
    }
  ]
}

Get specific template

GET https://api.usestencil.com/v1/templates/:id

Path Parameters

Name
Type
Description

id

string

Template ID

Query Parameters

Name
Type
Description

before

string

Query the previous result set

after

string

Query the next result set

{
  "available_modifications":[
    [
      {
        "description":"URL of the image",
        "field":"src",
        "primary":true,
        "required":true,
        "type":"string",
        "value":"https://example.com/image.png"
      },
      {
        "description":"Object identifier",
        "field":"name",
        "primary":false,
        "required":true,
        "type":"string",
        "value":"image_3"
      },
      {
        "description":"Angle of the object",
        "field":"angle",
        "primary":false,
        "required":false,
        "type":"integer",
        "value":0
      }
    ],
    [
      {
        "description":"Value for the textbox",
        "field":"text",
        "primary":true,
        "required":true,
        "type":"string",
        "value":"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do..."
      },
      {
        "description":"Text color",
        "field":"fill",
        "primary":false,
        "required":false,
        "type":"string",
        "value":"rgba(15, 15, 15, 1)"
      },
      {
        "description":"Object identifier",
        "field":"name",
        "primary":false,
        "required":true,
        "type":"string",
        "value":"circular_text_2"
      },
      {
        "description":"Angle of the object",
        "field":"angle",
        "primary":false,
        "required":false,
        "type":"integer",
        "value":0
      }
    ],
    [
      {
        "description":"Value for the textbox",
        "field":"text",
        "primary":true,
        "required":true,
        "type":"string",
        "value":"ينا الألم. في بعض الأحيان ونظراً للالتزامات التي يفرضها علينا الواجب والعمل سنتنازل غالباً ونرفض الشعور"
      },
      {
        "description":"Text color",
        "field":"fill",
        "primary":false,
        "required":false,
        "type":"string",
        "value":"rgba(0, 0, 0, 1)"
      },
      {
        "description":"Object identifier",
        "field":"name",
        "primary":false,
        "required":true,
        "type":"string",
        "value":"text_5"
      },
      {
        "description":"Angle of the object",
        "field":"angle",
        "primary":false,
        "required":false,
        "type":"integer",
        "value":0
      }
    ]
  ],
  "created_at":"2021-05-22T05:00:44Z",
  "id":"10dee897-cc28-4ae1-bf8e-f1bc1c551fe3",
  "name":"Test2",
  "project_id":"f2eb2dab-a861-4960-b5f4-d54c61552f7d",
  "self":"http://localhost:4000/api/v1/templates/10dee897-cc28-4ae1-bf8e-f1bc1c551fe3",
  "signed_image_base":"Hts6NWUuvtXbmGaQbM2kGM",
  "starred":false,
  "updated_at":"2021-05-22T05:00:59Z"
}

Response

available_modification object

Property

Description

description

Description of the property

field

Field unique identifier

value

Value of the field

required

Indicate that the value must be specified

type

The type of value i.e. Integer requires number to be specified

signed_image_base

The rests of the fields are self explanatory.

PreviousProjectsNextImages

Last updated 3 years ago

Was this helpful?

after and before are related to pagination. Please see page for more information

Base ID for secure signed image. See for more information.

pagination
Secure Signed Image