Skip to main content

Create

POST /v1/template

Create a template.

Form Data Parameters

name
string
Required

The name of the template.

size
string
Required

The size of the template, one of:

  • self_mailer_6x18 - self mailer with the size of 6in x 18in
  • self_mailer_12x9 - self mailer with the size of 12in x 9in
  • postcard_6x11 - postcard with the size of 6in x 11in
  • postcard_6x9 - postcard with the size of 6in x 9in
  • postcard_4x6 - postcard with the size of 4in x 6in
  • letter - letter with the size of 8.5in x 11in
designs
array
Required

The designs of the template, should be HMTL, one for letters two for other types.

description
string
Optional

The description of the template.

meta_data[][key]
string
Optional

The key of the additional information to store with the template. For examples check the Making Requests page.

meta_data[][value]
string
Optional

The value of the additional information to store with the template. For examples check the Making Requests page.

Example Request
curl -X POST https://api.realmailers.com/v1/template \
-H 'Authorization: Bearer YOUR_API_KEY' \
-F "name"="My Template" \
-F "size"="postcard_4x6" \
-F "designs[]"="<html>...</html>" \
-F "designs[]"="<html>...</html>"
Response Schema
{
created_at: Timestamp(ISO8601)
updated_at: Timestamp(ISO8601)
variable_names: Array(String)
designs: Array(String)
description: String
size: String
name: STring
id: Number

meta_data: {
key: String
}
}