Back to top

API Documentation

Template

Overview

Rechat’s Marketing Center and promotional Collateral revolve around the concept of “Templates”. So Templates are the original copies provided by Rechat.

Each time a user saves a template for himself, we call that copy a Template Instance.

Create a template

Create a template
POST/templates

This endpoint adds a new template to the system so users can use it. If you want to save and endpoint for users and render them, look at instantiation.

Example URI

POST /templates
Request
HideShow
Body
{
  "name": "Test Template 0.9557087702242153",
  "variant": "Test Variant 0.7179357470474172",
  "template_type": "JustListed",
  "medium": "Email",
  "mjml": false,
  "title": "Template Title",
  "description": "Template Description",
  "tags": [
    "rechat",
    "test"
  ],
  "html": "HTML {{ user.first_name }} {{ listing.property.address.state }}",
  "brands": [
    "bb643f07-70a4-4670-8def-b871c958d556"
  ]
}
Response  200
HideShow
Body
{
  "code": "OK",
  "data": {
    "id": "d1d59416-27e2-4b88-a805-dbce8356ee0f",
    "origin": null,
    "name": "Test Template 0.9557087702242153",
    "title": "Template Title",
    "description": "Template Description",
    "template_type": "JustListed",
    "medium": "Email",
    "variant": "Test Variant 0.7179357470474172",
    "inputs": [
      "listing"
    ],
    "mjml": false,
    "video": false,
    "url": "https://test.cloudfront.net/marketing/templates/Test Template 0.9557087702242153/90eba0d0-c4d7-11f1-89da-fb554657817f/Test Variant 0.7179357470474172",
    "is_shared": false,
    "variables": [
      "user.first_name",
      "listing.property.address.state",
      "user",
      "listing"
    ],
    "tags": [
      "rechat",
      "test"
    ],
    "deleted_at": null,
    "type": "template",
    "created_at": 1791656555.361772,
    "updated_at": 1791656555.361772
  }
}

Update an existing template

Update an existing template
PUT/templates/:id

Example URI

PUT /templates/:id
URI Parameters
HideShow
id
string (required) Example: d1d59416-27e2-4b88-a805-dbce8356ee0f
Request
HideShow
Body
{
  "html": "Updated HTML {{ user.first_name }} {{ listing.property.address.state }}",
  "name": "Test Template 0.9557087702242153",
  "variant": "Test Variant 0.7179357470474172",
  "template_type": "JustListed",
  "medium": "Email",
  "mjml": false,
  "title": "Updated Title",
  "description": "Updated Description",
  "tags": [
    "rechat",
    "test"
  ]
}
Response  200
HideShow
Body
{
  "code": "OK",
  "data": {
    "id": "d1d59416-27e2-4b88-a805-dbce8356ee0f",
    "origin": null,
    "name": "Test Template 0.9557087702242153",
    "title": "Updated Title",
    "description": "Updated Description",
    "template_type": "JustListed",
    "medium": "Email",
    "variant": "Test Variant 0.7179357470474172",
    "inputs": [
      "listing"
    ],
    "mjml": false,
    "video": false,
    "url": "https://test.cloudfront.net/marketing/templates/Test Template 0.9557087702242153/92a22a70-c4d7-11f1-89da-fb554657817f/Test Variant 0.7179357470474172",
    "is_shared": false,
    "variables": [
      "user.first_name",
      "listing.property.address.state",
      "user",
      "listing"
    ],
    "tags": [
      "rechat",
      "test"
    ],
    "deleted_at": null,
    "type": "template",
    "created_at": 1791656555.361772,
    "updated_at": 1791656555.361772
  }
}

Get a template

Get a template
GET/brands/:brand/templates/:id

brand (uuid) ID of the brand id (uuid) ID of the template

Example URI

GET /brands/:brand/templates/:id
URI Parameters
HideShow
brand
string (required) Example: bb643f07-70a4-4670-8def-b871c958d556
id
string (required) Example: d1d59416-27e2-4b88-a805-dbce8356ee0f
Response  200
HideShow
Body
{
  "code": "OK",
  "data": {
    "id": "d1d59416-27e2-4b88-a805-dbce8356ee0f",
    "origin": null,
    "name": "Test Template 0.9557087702242153",
    "title": "Template Title",
    "description": "Template Description",
    "template_type": "JustListed",
    "medium": "Email",
    "variant": "Test Variant 0.7179357470474172",
    "inputs": [
      "listing"
    ],
    "mjml": false,
    "video": false,
    "url": "https://test.cloudfront.net/marketing/templates/Test Template 0.9557087702242153/90eba0d0-c4d7-11f1-89da-fb554657817f/Test Variant 0.7179357470474172",
    "is_shared": false,
    "variables": [
      "user.first_name",
      "listing.property.address.state",
      "user",
      "listing"
    ],
    "tags": [
      "rechat",
      "test",
      "newtag"
    ],
    "deleted_at": null,
    "type": "template",
    "created_at": 1791656555.361772,
    "updated_at": 1791656555.361772
  }
}

Get all templates

Get all templates
GET/brands/:brand/templates

brand (uuid) ID of the brand

medium (Array) Applicable mediums

type (Array) Applicable template types

Example URI

GET /brands/:brand/templates
URI Parameters
HideShow
brand
string (required) Example: bb643f07-70a4-4670-8def-b871c958d556
types
string (required) Example: JustListed
mediums
string (required) Example: Email
Response  200
HideShow
Body
{
  "code": "OK",
  "data": [
    {
      "id": "7c2e0a92-39c8-4f07-bcd4-9f0dfa1605bc",
      "template": {
        "id": "d1d59416-27e2-4b88-a805-dbce8356ee0f",
        "origin": null,
        "name": "Test Template 0.9557087702242153",
        "title": "Template Title",
        "description": "Template Description",
        "template_type": "JustListed",
        "medium": "Email",
        "variant": "Test Variant 0.7179357470474172",
        "inputs": [
          "listing"
        ],
        "mjml": false,
        "video": false,
        "url": "https://test.cloudfront.net/marketing/templates/Test Template 0.9557087702242153/90eba0d0-c4d7-11f1-89da-fb554657817f/Test Variant 0.7179357470474172",
        "is_shared": false,
        "variables": [
          "user.first_name",
          "listing.property.address.state",
          "user",
          "listing"
        ],
        "tags": [
          "rechat",
          "test"
        ],
        "deleted_at": null,
        "type": "template",
        "created_at": 1791656555.361772,
        "updated_at": 1791656555.361772
      },
      "brand": "bb643f07-70a4-4670-8def-b871c958d556",
      "deleted_at": null,
      "created_at": 1791656555.361772,
      "thumbnail": null,
      "preview": null,
      "thumbnail_requested_at": "2026-10-10T18:22:34.727Z",
      "thumbnail_rendered_at": null,
      "is_thumbnail_ready": false,
      "updated_at": 1791656555.361772,
      "ord": 1,
      "favorited": false,
      "type": "brand_template"
    }
  ],
  "info": {
    "count": 1,
    "total": 0
  }
}

Favorite a template

Favorite a template
POST/brands/:brand/templates/:id/favorite

Marks a template as a favorite of a brand, so that it is listed first for the brand’s users.

Favorites are scoped to the brand, not to the user who set them. Every user of the brand sees the same favorites, and a favorite set on a parent brand is inherited by its child brands. favorited_by only records which user favorited it.

Favoriting is idempotent: favoriting an already favorited template just refreshes favorited_at / favorited_by, and a template that was unfavorited before can be favorited again.

brand (uuid) ID of the brand id (uuid) ID of the template

Responds with 204 No Content.

Favorites in the template listing

Every item returned by GET /brands/:brand/templates (see Get all templates above), and by GET /brands/:brand/templates/filter, carries a favorited boolean. Favorited templates are ordered first, then newest first. Unfavoriting a template flips the flag back to false; the template itself stays in the listing.

Example URI

POST /brands/:brand/templates/:id/favorite
URI Parameters
HideShow
brand
string (required) Example: bb643f07-70a4-4670-8def-b871c958d556
id
string (required) Example: d1d59416-27e2-4b88-a805-dbce8356ee0f
Response  204

Unfavorite a template

Unfavorite a template
DELETE/brands/:brand/templates/:id/favorite

Removes a template from a brand’s favorites. This is a soft delete — the template itself is untouched and keeps appearing in the listing, only its favorited flag flips back to false.

Only the brand that set a favorite can remove it. An inherited favorite (see Favorite a template above) belongs to the parent brand, so unfavoriting it from a child brand fails with 409 Conflict and nothing is deleted — the template stays favorited for the child brand.

Unfavoriting a template that is not favorited by anyone is a no-op and still responds 204.

brand (uuid) ID of the brand id (uuid) ID of the template

Responds with 204 No Content, or 409 Conflict when the favorite is inherited from a parent brand.

Example URI

DELETE /brands/:brand/templates/:id/favorite
URI Parameters
HideShow
brand
string (required) Example: bb643f07-70a4-4670-8def-b871c958d556
id
string (required) Example: d1d59416-27e2-4b88-a805-dbce8356ee0f
Response  204
Response  409
HideShow
Body
{
  "trace": false,
  "http": 409,
  "message": "Template is favorited by a parent brand and cannot be unfavorited for this brand",
  "code": "Conflict"
}

Get all categories

Get all categories
GET/templates/categories

Example URI

GET /templates/categories
Response  200
HideShow
Body
{
  "code": "OK",
  "data": [
    {
      "template_type": "Agent",
      "label": "Agent",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "AsSeenIn",
      "label": "As Seen In",
      "section": "Properties",
      "type": "template_category"
    },
    {
      "template_type": "BackToSchool",
      "label": "Back To School",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "Birthday",
      "label": "Birthday",
      "section": "Celebrations",
      "type": "template_category"
    },
    {
      "template_type": "Blank",
      "label": "Build Your Own",
      "section": "Newsletters",
      "type": "template_category"
    },
    {
      "template_type": "Blog",
      "label": "Blog Content",
      "section": "Newsletters",
      "type": "template_category"
    },
    {
      "template_type": "BoxingDay",
      "label": "Boxing Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "Brand",
      "label": "Brand Campaigns",
      "section": "Brand",
      "type": "template_category"
    },
    {
      "template_type": "ChineseNewYear",
      "label": "Lunar New Year",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "Christmas",
      "label": "Christmas",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "CMA",
      "label": "CMA",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "ColumbusDay",
      "label": "Columbus Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "ComingSoon",
      "label": "Coming Soon",
      "section": "Properties",
      "type": "template_category"
    },
    {
      "template_type": "Contact",
      "label": "Contact",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "CrmOpenHouse",
      "label": "Open House Registration",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "DaylightSaving",
      "label": "Daylight Saving",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "Diwali",
      "label": "Diwali",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "Easter",
      "label": "Easter",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "EidalFitr",
      "label": "Eid al-Fitr",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "Event",
      "label": "Events",
      "section": "Newsletters",
      "type": "template_category"
    },
    {
      "template_type": "FathersDay",
      "label": "Father's Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "FourthOfJuly",
      "label": "Fourth of July",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "Halloween",
      "label": "Halloween",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "Hanukkah",
      "label": "Hanukkah",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "HomeAnniversary",
      "label": "Home Anniversary",
      "section": "Celebrations",
      "type": "template_category"
    },
    {
      "template_type": "IndependenceDay",
      "label": "Independence Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "JustListed",
      "label": "Just Listed",
      "section": "Properties",
      "type": "template_category"
    },
    {
      "template_type": "JustSold",
      "label": "Just Sold",
      "section": "Properties",
      "type": "template_category"
    },
    {
      "template_type": "JustRented",
      "label": "Just Rented",
      "section": "Properties",
      "type": "template_category"
    },
    {
      "template_type": "ForRent",
      "label": "For Rent",
      "section": "Properties",
      "type": "template_category"
    },
    {
      "template_type": "Kwanzaa",
      "label": "Kwanzaa",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "LaborDay",
      "label": "Labor Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "Layout",
      "label": "Layout",
      "section": "Blank Layouts",
      "type": "template_category"
    },
    {
      "template_type": "Listing",
      "label": " Listing Website",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "ListingLayout",
      "label": "Blank Listing Layouts",
      "section": "Blank Layouts",
      "type": "template_category"
    },
    {
      "template_type": "Listings",
      "label": "Multi Properties",
      "section": "Properties",
      "type": "template_category"
    },
    {
      "template_type": "MarketReport",
      "label": "Market Reports",
      "section": "Market Reports",
      "type": "template_category"
    },
    {
      "template_type": "ListingReport",
      "label": "Seller Report",
      "section": "Seller Report",
      "type": "template_category"
    },
    {
      "template_type": "MemorialDay",
      "label": "Memorial Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "MLKDay",
      "label": "Martin Luther King Jr. Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "MothersDay",
      "label": "Mother's Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "NewAgent",
      "label": "New Agent",
      "section": "Brand",
      "type": "template_category"
    },
    {
      "template_type": "Recruiting",
      "label": "Recruiting",
      "section": "Brand",
      "type": "template_category"
    },
    {
      "template_type": "News",
      "label": "Brand News",
      "section": "Brand",
      "type": "template_category"
    },
    {
      "template_type": "Newsletter",
      "label": "Newsletters",
      "section": "Newsletters",
      "type": "template_category"
    },
    {
      "template_type": "NewYear",
      "label": "New Year",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "OpenHouse",
      "label": "Open House",
      "section": "Properties",
      "type": "template_category"
    },
    {
      "template_type": "OtherHoliday",
      "label": "Others",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "Passover",
      "label": "Passover",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "PatriotsDay",
      "label": "Patriots' Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "PriceImprovement",
      "label": "New Price",
      "section": "Properties",
      "type": "template_category"
    },
    {
      "template_type": "Ramadan",
      "label": "Ramadan",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "Recruitment",
      "label": "Recruitment",
      "section": "Newsletters",
      "type": "template_category"
    },
    {
      "template_type": "RoshHashanah",
      "label": "Rosh Hashanah",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "September11",
      "label": "September 11",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "StPatrick",
      "label": "St. Patrick's Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "Thanksgiving",
      "label": "Thanksgiving",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "Testimonial",
      "label": "Testimonial",
      "section": "Brand",
      "type": "template_category"
    },
    {
      "template_type": "UnderContract",
      "label": "Under Contract",
      "section": "Properties",
      "type": "template_category"
    },
    {
      "template_type": "NewDevelopment",
      "label": "New Development",
      "section": "Properties",
      "type": "template_category"
    },
    {
      "template_type": "Valentines",
      "label": "Valentine's Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "VeteransDay",
      "label": "Veterans Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "WeddingAnniversary",
      "label": "Wedding Anniversary",
      "section": "Celebrations",
      "type": "template_category"
    },
    {
      "template_type": "WomansDay",
      "label": "International Women's Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "JuneTeenth",
      "label": "JuneTeenth",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "FirstDayOfSummer",
      "label": "Summer",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "Pride",
      "label": "Pride",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "AsianAmericanAndPacificIslanderHeritageMonth",
      "label": "Asian American & Pacific Islander Heritage Month",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "NativeAmericanHeritageMonth",
      "label": "Native American Heritage Month",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "BlackHistoryMonth",
      "label": "Black History Month",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "EarthDay",
      "label": "Earth Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "FirstDayOfSpring",
      "label": "Spring",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "CincoDeMayo",
      "label": "Cinco De Mayo",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "FirstDayOfFall",
      "label": "Fall",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "FirstDayOfWinter",
      "label": "Winter",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "YomKippur",
      "label": "Yom Kippur",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "Announcements",
      "label": "Announcements",
      "section": "Brand",
      "type": "template_category"
    },
    {
      "template_type": "DonutDay",
      "label": "Donut Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "EmojiDay",
      "label": "Emoji Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "GetToKnowYourCustomersDay",
      "label": "Get to know your Customers day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "SMoresDay",
      "label": "S'mores Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "HomeMatchMaker",
      "label": "Home Match Maker",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "NationalIceCreamDay",
      "label": "National Ice cream day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "NationalBubbleBathDay",
      "label": "National Bubble Bath Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "NationalCleanOffYourDeskDay",
      "label": "National Clean Off Your Desk Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "NationalHouseplantAppreciationDay",
      "label": "National Houseplant Appreciation Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "NationalStickerDay",
      "label": "National Sticker Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "OrganizeYourHomeDay",
      "label": "Organize Your Home Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "NationalPizzaDay",
      "label": "National Pizza Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "InventorsDay",
      "label": "Inventors Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "ActsOfKindnessDay",
      "label": "Acts of Kindness Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "NationalLoveYourPetDay",
      "label": "National Love Your Pet Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "WomenHistoryMonth",
      "label": "Women's History Month",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "AwkwardMomentsDay",
      "label": "Awkward Moments Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "InternationalDayOfHappiness",
      "label": "International Day of Happiness",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "NationalPetDay",
      "label": "National Pet Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "NationalGardeningDay",
      "label": "National Gardening Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "NationalTaxDay",
      "label": "National Tax Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "MilitaryAppreciationMonth",
      "label": "Military Appreciation Month",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "NationalLoyaltyDay",
      "label": "National Loyalty Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "NewHomeownersDay",
      "label": "New Homeowners Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "StarWarsDay",
      "label": "Star Wars Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "ApplePieDay",
      "label": "Apple Pie Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "NationalHomeOwnershipMonth",
      "label": "National Homeownership Month",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "GreatOutdoorsMonth",
      "label": "Great Outdoors Month",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "SummerSolstice",
      "label": "Summer Solstice",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "SocialMediaDay",
      "label": "Social Media Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "InternationalHappinessMonth",
      "label": "International Happiness Month",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "911RemembranceDay",
      "label": "911 Remembrance Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "HispanicHeritageMonth",
      "label": "Hispanic Heritage Month",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "WorldGratitudeDay",
      "label": "World Gratitude Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "AskAStupidQuestionDay",
      "label": "Ask a Stupid Question Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "NationalGoodNeighborDay",
      "label": "National Good Neighbor Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "NationalFamilyDay",
      "label": "National Family Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "BreastCancerAwarenessMonth",
      "label": "Breast Cancer Awareness Month",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "NationalCoffeeDay",
      "label": "National Coffee Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "WorldSmileDay",
      "label": "World Smile Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "NationalMakeADifferenceDay",
      "label": "National Make a Difference Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "NationalNachoDay",
      "label": "National Nacho Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "NationalPickleDay",
      "label": "National Pickle Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "CleanOutYourRefrigeratorDay",
      "label": "Clean Out Your Refrigerator Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "TakeHikeDay",
      "label": "Take a Hike Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "NationalBrownieDay",
      "label": "National Brownie Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "NationalSalespersonDay",
      "label": "National Salesperson Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "NationalPoinsettiaDay",
      "label": "National Poinsettia Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "GingerbreadHouseDay",
      "label": "Gingerbread House Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "NationalUnderdogDay",
      "label": "National Underdog Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "DeviceAppreciationDay",
      "label": "Device Appreciation Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "WinterSolstice",
      "label": "Winter Solstice",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "CrosswordPuzzleDay",
      "label": "Crossword Puzzle Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "PrivateExclusive",
      "label": "Private Exclusive",
      "section": "Properties",
      "type": "template_category"
    },
    {
      "template_type": "Awards",
      "label": "Awards",
      "section": "Celebrations",
      "type": "template_category"
    },
    {
      "template_type": "CanadaDay",
      "label": "Canada Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "BCDay",
      "label": "BC Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "FamilyDay",
      "label": "Family Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "VictoriaDay",
      "label": "Victoria Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "RemembranceDay",
      "label": "Remembrance Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "TruthAndReconciliation",
      "label": "Truth and Reconciliation",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "WomenEntrepreneurshipDay",
      "label": "Women Entrepreneurship Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "LabourDay",
      "label": "Labour Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "ThanksgivingCA",
      "label": "Thanksgiving (Canada)",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "BackToSchoolCA",
      "label": "Back To School",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "IndigenousPeoples",
      "label": "Indigenous Peoples Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "InEscrow",
      "label": "In Escrow",
      "section": "Properties",
      "type": "template_category"
    },
    {
      "template_type": "ForSale",
      "label": "For Sale",
      "section": "Properties",
      "type": "template_category"
    },
    {
      "template_type": "AgentTemplates",
      "label": "Agent Templates",
      "section": "Brand",
      "type": "template_category"
    },
    {
      "template_type": "BrandCollateral",
      "label": "Brand Collateral",
      "section": "Brand",
      "type": "template_category"
    },
    {
      "template_type": "PresidentDay",
      "label": "Presidents' Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "MentalHealthAwarenessDay",
      "label": "Mental Health Awareness Day",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "DiaDeLosMuertos",
      "label": "Dia De Los Muertos",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "HappyHolidays",
      "label": "Happy Holidays",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "FairHousingMonth",
      "label": "Fair Housing Month",
      "section": "Holidays",
      "type": "template_category"
    },
    {
      "template_type": "GoodFriday",
      "label": "Good Friday",
      "section": "Holidays",
      "type": "template_category"
    }
  ],
  "info": {
    "count": 153,
    "total": 0
  }
}

Get available categories for brand

Get available categories for brand
GET/brands/:brand/templates/categories{?mediums}

brand (uuid) ID of the brand

mediums (Array) Applicable mediums

types (Array) Applicable template types

filter (string) template | asset | undefined

tags (string[]) optional filter by tags

term (string) optional filter by name or description

Example URI

GET /brands/:brand/templates/categories?mediums=Email
URI Parameters
HideShow
brand
string (required) Example: bb643f07-70a4-4670-8def-b871c958d556
mediums
string (required) Example: Email
filter
string (required) Example: template
Response  200
HideShow
Body
{
  "code": "OK",
  "data": [
    {
      "template_type": "JustListed",
      "label": "Just Listed",
      "section": "Properties",
      "restricted": false,
      "type": "template_type",
      "medium_stats": {
        "Email": 1
      }
    }
  ],
  "info": {
    "count": 1,
    "total": 0
  }
}

Create a template instance

Create a template instance
POST/templates/:id/instances

This would accept an incoming source code (html or mjml), render a screenshot of it, and save it as a template instance which can be linked to other entities like email campaigns, social posts, etc.

Example URI

POST /templates/:id/instances
URI Parameters
HideShow
id
string (required) Example: d1d59416-27e2-4b88-a805-dbce8356ee0f
Request
HideShow
Body
{
  "html": "SOME HTML",
  "deals": [
    "43e0ad69-c92c-4570-bd93-7d812a424dd7"
  ],
  "listings": [
    "edb5195a-f7ec-11e4-bc76-0a95648eeb58"
  ],
  "contacts": []
}
Response  200
HideShow
Body
{
  "code": "OK",
  "data": {
    "id": "8114a7c6-10f0-42ed-874d-5b4370f99d0e",
    "created_at": 1791656554.727619,
    "html": "SOME HTML",
    "file": {
      "id": "be262f43-0b7f-4469-997e-c5c1c69589e1",
      "created_at": 1791656557.029877,
      "updated_at": 1791656557.029877,
      "deleted_at": null,
      "created_by": "d5280059-4fdc-4e62-9e3b-28684cd6dc77",
      "path": "templates/instances/91ea7330-c4d7-11f1-89da-fb554657817f.png",
      "name": "image.png",
      "public": true,
      "type": "file",
      "url": "https://test.cloudfront.net/templates/instances/91ea7330-c4d7-11f1-89da-fb554657817f.png",
      "preview_url": "https://test.cloudfront.net/templates/instances/91ea7330-c4d7-11f1-89da-fb554657817f.png",
      "mime": "image/png"
    },
    "created_by": "d5280059-4fdc-4e62-9e3b-28684cd6dc77",
    "branch": "http://mock-branch-url",
    "updated_at": 1791656554.727619,
    "deleted_at": null,
    "type": "template_instance"
  },
  "info": {}
}

Get template instance stats

Get template instance stats
GET/templates/instances/stats

brand (uuid) listing ID

Example URI

GET /templates/instances/stats
Response  200
HideShow
Body
{
  "type": "template_instance_stats",
  "Email": 2
}

Render a template using variables

Render a template using variables
POST/templates/:id/render

This compile a source code of a template with the provided variables and return rendered source (html or mjml) as a string.

Example URI

POST /templates/:id/render
URI Parameters
HideShow
id
string (required) Example: d1d59416-27e2-4b88-a805-dbce8356ee0f
Request
HideShow
Body
{
  "variables": {
    "user.first_name": "FIRST_NAME",
    "listing.property.address.state": "STATE"
  }
}
Response  200

Share

Share
POST/templates/instances/:instance/share

This endpoints sends a template instance with a text to a selection of recipients So they can use their mobile phones to share it on social networks

Example URI

POST /templates/instances/:instance/share
URI Parameters
HideShow
instance
string (required) Example: 8114a7c6-10f0-42ed-874d-5b4370f99d0e
Request
HideShow
Body
{
  "text": "Please share this",
  "recipients": [
    "+14243828604"
  ]
}
Response  200
HideShow
Body
{
  "code": "OK",
  "data": {
    "id": "8114a7c6-10f0-42ed-874d-5b4370f99d0e",
    "created_at": 1791656554.727619,
    "html": "SOME HTML",
    "file": {
      "id": "be262f43-0b7f-4469-997e-c5c1c69589e1",
      "created_at": 1791656557.029877,
      "updated_at": 1791656557.029877,
      "deleted_at": null,
      "created_by": "d5280059-4fdc-4e62-9e3b-28684cd6dc77",
      "path": "templates/instances/91ea7330-c4d7-11f1-89da-fb554657817f.png",
      "name": "image.png",
      "public": true,
      "type": "file",
      "url": "https://test.cloudfront.net/templates/instances/91ea7330-c4d7-11f1-89da-fb554657817f.png",
      "preview_url": "https://test.cloudfront.net/templates/instances/91ea7330-c4d7-11f1-89da-fb554657817f.png",
      "mime": "image/png"
    },
    "created_by": "d5280059-4fdc-4e62-9e3b-28684cd6dc77",
    "branch": "http://mock-branch-url",
    "updated_at": 1791656554.727619,
    "deleted_at": null,
    "type": "template_instance"
  }
}

Delete a saved instance

Delete a saved instance
DELETE/templates/instances/:instance

Example URI

DELETE /templates/instances/:instance
URI Parameters
HideShow
instance
string (required) Example: 8114a7c6-10f0-42ed-874d-5b4370f99d0e
Response  204

History

History
GET/templates/instances

Returns a collection of instances that my user has saved before

Example URI

GET /templates/instances
Response  200
HideShow
Body
{
  "code": "OK",
  "data": [
    {
      "id": "8114a7c6-10f0-42ed-874d-5b4370f99d0e",
      "created_at": 1791656554.727619,
      "html": "SOME HTML",
      "file": {
        "id": "be262f43-0b7f-4469-997e-c5c1c69589e1",
        "created_at": 1791656557.029877,
        "updated_at": 1791656557.029877,
        "deleted_at": null,
        "created_by": "d5280059-4fdc-4e62-9e3b-28684cd6dc77",
        "path": "templates/instances/91ea7330-c4d7-11f1-89da-fb554657817f.png",
        "name": "image.png",
        "public": true,
        "type": "file",
        "url": "https://test.cloudfront.net/templates/instances/91ea7330-c4d7-11f1-89da-fb554657817f.png",
        "preview_url": "https://test.cloudfront.net/templates/instances/91ea7330-c4d7-11f1-89da-fb554657817f.png",
        "mime": "image/png"
      },
      "created_by": "d5280059-4fdc-4e62-9e3b-28684cd6dc77",
      "branch": "http://mock-branch-url",
      "updated_at": 1791656554.727619,
      "deleted_at": null,
      "type": "template_instance"
    }
  ],
  "info": {
    "count": 1,
    "total": 1
  }
}

Upload as asset

Upload as asset
POST/templates/assets

Upload a template asset

This is a multipart endpont. file that must be uploaded should be posted to this along with:

  • 'template' (required) ID of the template

  • 'listing' (optional) ID of the listing

  • 'contact' (optional) ID of the contact

Example URI

POST /templates/assets
Response  200
HideShow
Body
{
  "code": "OK",
  "data": {
    "id": "6def5cdd-9d29-4e2c-a681-47296d2b7698",
    "created_at": 1791656554.727619,
    "template": "d1d59416-27e2-4b88-a805-dbce8356ee0f",
    "created_by": "d5280059-4fdc-4e62-9e3b-28684cd6dc77",
    "listing": "edb5195a-f7ec-11e4-bc76-0a95648eeb58",
    "contact": null,
    "file": {
      "id": "d990dc20-fcbd-403a-86bb-5c262ef75529",
      "created_at": 1791656558.273661,
      "updated_at": 1791656558.273661,
      "deleted_at": null,
      "created_by": "d5280059-4fdc-4e62-9e3b-28684cd6dc77",
      "path": "templates/assets/92a86c00-c4d7-11f1-89da-fb554657817f.png",
      "name": "logo.png",
      "public": true,
      "type": "file",
      "url": "https://test.cloudfront.net/templates/assets/92a86c00-c4d7-11f1-89da-fb554657817f.png",
      "preview_url": "https://test.cloudfront.net/templates/assets/92a86c00-c4d7-11f1-89da-fb554657817f.png",
      "mime": "image/png"
    },
    "type": "template_asset",
    "updated_at": 1791656554.727619
  }
}

Add assets to a template

Add assets to a template
POST/templates/{id}/assets

Upload one or more assets into a template’s own directory, so they can be referenced by a relative path from the template.

This is a multipart endpoint. One or more files may be uploaded in a single request.

An optional path form field is the asset’s relative path within the template’s own directory (e.g. images/logo.png → <template>/images/logo.png). Without it, the uploaded filename is used at the template root. Paths containing .. are rejected so an asset can’t escape the template’s directory.

Example URI

POST /templates/d1d59416-27e2-4b88-a805-dbce8356ee0f/assets
URI Parameters
HideShow
id
string (required) Example: d1d59416-27e2-4b88-a805-dbce8356ee0f
Response  200
HideShow
Body
{
  "code": "OK",
  "data": [
    {
      "file": {
        "id": "3499ec6a-436f-4a35-980f-73b1a1803455",
        "created_at": 1791656555.454255,
        "updated_at": 1791656555.454255,
        "deleted_at": null,
        "created_by": null,
        "path": "marketing/templates/Test Template 0.9557087702242153/90eba0d0-c4d7-11f1-89da-fb554657817f/Test Variant 0.7179357470474172/images/logo.png",
        "name": "logo.png",
        "public": true,
        "type": "file",
        "url": "https://test.cloudfront.net/marketing/templates/Test Template 0.9557087702242153/90eba0d0-c4d7-11f1-89da-fb554657817f/Test Variant 0.7179357470474172/images/logo.png",
        "preview_url": "https://test.cloudfront.net/marketing/templates/Test Template 0.9557087702242153/90eba0d0-c4d7-11f1-89da-fb554657817f/Test Variant 0.7179357470474172/images/logo.png",
        "mime": "image/png"
      }
    }
  ],
  "info": {
    "count": 1,
    "total": 0
  }
}

Generated by aglio on 10 Oct 2026