templates

Embed
Preview of the card
<a href="https://hermeticor.com/docs/ref-templates"><img src="https://hermeticor.com/docs/_api/public/orgs/5fcd8b3c-a27c-4688-972f-de710125592f/spaces/caf5dc05-15f7-4e0c-bdb8-ab29ede6211e/pages/9c29e4ff-ee5d-4be6-9133-6951bf2d35cb/social-card.svg?v=3e7ae33eec8b" alt="templates" width="600" height="315"></a>
GEThttps://hermeticor.com/v1/templates/{id}

Parameters

idstringpathrequired

Code samples

cURL
curl -X GET "https://hermeticor.com/v1/templates/{id}" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "id": "string",
  "workspaceId": "string",
  "channel": "email",
  "name": "string",
  "kind": "blocks",
  "folder": "string",
  "tags": [
    "string"
  ],
  "currentVersionId": "string",
  "archived": true,
  "folderId": "string",
  "brandKitId": "string",
  "isDefault": false,
  "topicId": null,
  "createdBy": null,
  "createdAt": "2024-01-01T00:00:00Z",
  "updatedAt": "2024-01-01T00:00:00Z",
  "currentVersion": {
    "id": "string",
    "templateId": "string",
    "workspaceId": "string",
    "body": {
      "kind": "blocks",
      "doc": {
        "version": 1,
        "width": 600,
        "background": "string",
        "blocks": [
          {}
        ],
        "translations": {}
      }
    },
    "subject": "string",
    "preheader": "string",
    "fromNameOverride": "string",
    "textBody": "string",
    "approvalStatus": "none",
    "reviewComment": "string",
    "createdBy": "string",
    "createdAt": "2024-01-01T00:00:00Z",
    "approvedBy": "string",
    "approvedAt": "2024-01-01T00:00:00Z",
    "fromEmail": null,
    "replyTo": null,
    "cc": []
  }
}
Schema
idstringrequired
workspaceIdstringrequired
channelstringrequired
email | sms | whatsapp | push | postcard
namestringrequired
kindstringrequired
blocks | html | text | sms
folderstringrequired
tagsstring[]required
currentVersionIdstringrequired
archivedbooleanrequired
folderIdstringrequired
brandKitIdstringrequired
isDefaultbooleanrequired
= false
topicIdstringrequired
= null
createdBystringrequired
= null
createdAtstringrequired
updatedAtstringrequired
currentVersionobjectrequired
Show child parameters
idstringrequired
templateIdstringrequired
workspaceIdstringrequired
bodyBodyVariant3 | BodyVariant4 | objectrequired
subjectstringrequired
preheaderstringrequired
fromNameOverridestringrequired
textBodystringrequired
approvalStatusstringrequired
none | pending | approved | rejected
reviewCommentstringrequired
createdBystringrequired
createdAtstringrequired
approvedBystringrequired
approvedAtstringrequired
fromEmailstringrequired
= null
replyTostringrequired
= null
ccstring[]required
= []
4XX Default Response
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
detailsobject
5XX Default Response

Same as 4XX · GET /v1/templates/{id}

DELETEhttps://hermeticor.com/v1/templates/{id}

Archive a template (reversible; stored versions stay renderable)

Parameters

forcestringquery
true | false
idstringpathrequired

Code samples

cURL
curl -X DELETE "https://hermeticor.com/v1/templates/{id}" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "id": "string",
  "workspaceId": "string",
  "channel": "email",
  "name": "string",
  "kind": "blocks",
  "folder": "string",
  "tags": [
    "string"
  ],
  "currentVersionId": "string",
  "archived": true,
  "folderId": "string",
  "brandKitId": "string",
  "isDefault": false,
  "topicId": null,
  "createdBy": null,
  "createdAt": "2024-01-01T00:00:00Z",
  "updatedAt": "2024-01-01T00:00:00Z"
}
Schema
idstringrequired
workspaceIdstringrequired
channelstringrequired
email | sms | whatsapp | push | postcard
namestringrequired
kindstringrequired
blocks | html | text | sms
folderstringrequired
tagsstring[]required
currentVersionIdstringrequired
archivedbooleanrequired
folderIdstringrequired
brandKitIdstringrequired
isDefaultbooleanrequired
= false
topicIdstringrequired
= null
createdBystringrequired
= null
createdAtstringrequired
updatedAtstringrequired
4XX Default Response

Same as 4XX · GET /v1/templates/{id}

5XX Default Response

Same as 4XX · GET /v1/templates/{id}

PATCHhttps://hermeticor.com/v1/templates/{id}

Parameters

idstringpathrequired

Request body

application/json
namestring
folderstring
tagsstring[]
archivedboolean
folderIdstring
brandKitIdstring
topicIdstring
isDefaultboolean
{
  "name": "string",
  "folder": "string",
  "tags": [
    "string"
  ],
  "archived": true,
  "folderId": "string",
  "brandKitId": "string",
  "topicId": "string",
  "isDefault": true
}

Code samples

cURL
curl -X PATCH "https://hermeticor.com/v1/templates/{id}" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","folder":"string","tags":["string"],"archived":true,"folderId":"string","brandKitId":"string","topicId":"string","isDefault":true}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response

Same as 200 · DELETE /v1/templates/{id}

4XX Default Response

Same as 4XX · GET /v1/templates/{id}

5XX Default Response

Same as 4XX · GET /v1/templates/{id}

GEThttps://hermeticor.com/v1/templates/{id}/default-content

The fill-in parts of the current version: each block of a block design, or each marked region of HTML

Parameters

idstringpathrequired

Code samples

cURL
curl -X GET "https://hermeticor.com/v1/templates/{id}/default-content" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "versionId": "string",
  "subject": "string",
  "regions": [
    {
      "key": "string",
      "kind": "string",
      "content": "string"
    }
  ]
}
Schema
versionIdstringrequired
subjectstringrequired
regionsobject[]required
Show child parameters
keystringrequired
kindstringrequired
contentstringrequired
4XX Default Response

Same as 4XX · GET /v1/templates/{id}

5XX Default Response

Same as 4XX · GET /v1/templates/{id}

GEThttps://hermeticor.com/v1/templates/{id}/versions

Parameters

limitintegerquery
= 50
cursorstringquery
idstringpathrequired

Code samples

cURL
curl -X GET "https://hermeticor.com/v1/templates/{id}/versions" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "items": [
    {
      "id": "string",
      "templateId": "string",
      "workspaceId": "string",
      "body": {
        "kind": "blocks",
        "doc": {
          "version": 1,
          "width": 600,
          "background": "string",
          "blocks": [
            {}
          ],
          "translations": {}
        }
      },
      "subject": "string",
      "preheader": "string",
      "fromNameOverride": "string",
      "textBody": "string",
      "approvalStatus": "none",
      "reviewComment": "string",
      "createdBy": "string",
      "createdAt": "2024-01-01T00:00:00Z",
      "approvedBy": "string",
      "approvedAt": "2024-01-01T00:00:00Z",
      "fromEmail": null,
      "replyTo": null,
      "cc": []
    }
  ],
  "nextCursor": "string"
}
Schema
itemsItemsItem31[]required
Show child parameters
idstringrequired
templateIdstringrequired
workspaceIdstringrequired
bodyBodyVariant3 | BodyVariant4 | objectrequired
subjectstringrequired
preheaderstringrequired
fromNameOverridestringrequired
textBodystringrequired
approvalStatusstringrequired
none | pending | approved | rejected
reviewCommentstringrequired
createdBystringrequired
createdAtstringrequired
approvedBystringrequired
approvedAtstringrequired
fromEmailstringrequired
= null
replyTostringrequired
= null
ccstring[]required
= []
nextCursorstringrequired
4XX Default Response

Same as 4XX · GET /v1/templates/{id}

5XX Default Response

Same as 4XX · GET /v1/templates/{id}

POSThttps://hermeticor.com/v1/templates/{id}/versions

Parameters

idstringpathrequired

Request body

application/json
bodyBodyVariant | BodyVariant2 | objectrequired
subjectstring
= null
preheaderstring
= null
fromNameOverridestring
= null
textBodystring
= null
fromEmailstring
replyTostring
ccstring[]
{
  "body": {
    "kind": "blocks",
    "doc": {
      "version": 1,
      "width": 600,
      "background": "string",
      "blocks": [
        {}
      ],
      "translations": {}
    }
  },
  "subject": null,
  "preheader": null,
  "fromNameOverride": null,
  "textBody": null,
  "fromEmail": "string",
  "replyTo": "string",
  "cc": [
    "string"
  ]
}

Code samples

cURL
curl -X POST "https://hermeticor.com/v1/templates/{id}/versions" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"body":{"kind":"blocks","doc":{"version":1,"width":600,"background":"string","blocks":[{}],"translations":{}}},"subject":null,"preheader":null,"fromNameOverride":null,"textBody":null,"fromEmail":"string","replyTo":"string","cc":["string"]}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201 Default Response
Example
{
  "id": "string",
  "templateId": "string",
  "workspaceId": "string",
  "body": {
    "kind": "blocks",
    "doc": {
      "version": 1,
      "width": 600,
      "background": "string",
      "blocks": [
        {}
      ],
      "translations": {}
    }
  },
  "subject": "string",
  "preheader": "string",
  "fromNameOverride": "string",
  "textBody": "string",
  "approvalStatus": "none",
  "reviewComment": "string",
  "createdBy": "string",
  "createdAt": "2024-01-01T00:00:00Z",
  "approvedBy": "string",
  "approvedAt": "2024-01-01T00:00:00Z",
  "fromEmail": null,
  "replyTo": null,
  "cc": []
}
Schema
idstringrequired
templateIdstringrequired
workspaceIdstringrequired
bodyBodyVariant3 | BodyVariant4 | objectrequired
subjectstringrequired
preheaderstringrequired
fromNameOverridestringrequired
textBodystringrequired
approvalStatusstringrequired
none | pending | approved | rejected
reviewCommentstringrequired
createdBystringrequired
createdAtstringrequired
approvedBystringrequired
approvedAtstringrequired
fromEmailstringrequired
= null
replyTostringrequired
= null
ccstring[]required
= []
4XX Default Response

Same as 4XX · GET /v1/templates/{id}

5XX Default Response

Same as 4XX · GET /v1/templates/{id}

Updated