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}/versions/{versionId}

Parameters

idstringpathrequired
versionIdstringpathrequired

Code samples

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

Responses

200 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
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
detailsobject
DELETEhttps://hermeticor.com/v1/templates/{id}/versions/{versionId}

Not the current version and not an approved one

Parameters

idstringpathrequired
versionIdstringpathrequired

Code samples

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

Responses

200 Default Response
Example
{
  "ok": true
}
Schema
okbooleanrequired
true
POSThttps://hermeticor.com/v1/templates/{id}/preview

Parameters

idstringpathrequired

Request body

application/json
versionIdstring
brandKitIdstring
strictboolean
= false
profileobject
varsobject
profileIdstring
segmentIdsstring[]
darkModeboolean
= false
purposestring
marketing | prospecting | transactional | operational
{
  "versionId": "string",
  "brandKitId": "string",
  "strict": false,
  "profile": {},
  "vars": {},
  "profileId": "string",
  "segmentIds": [
    "string"
  ],
  "darkMode": false,
  "purpose": "marketing"
}

Code samples

cURL
curl -X POST "https://hermeticor.com/v1/templates/{id}/preview" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"versionId":"string","brandKitId":"string","strict":false,"profile":{},"vars":{},"profileId":"string","segmentIds":["string"],"darkMode":false,"purpose":"marketing"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "channel": "email",
  "subject": "string",
  "preheader": "string",
  "html": "string",
  "text": "string",
  "links": [
    {
      "url": "string",
      "position": 0
    }
  ],
  "warnings": [
    "string"
  ],
  "sms": {
    "segments": 0,
    "encoding": "GSM-7"
  },
  "lint": {
    "errors": [
      {
        "code": "string",
        "message": "string"
      }
    ],
    "warnings": [
      {
        "code": "string",
        "message": "string"
      }
    ]
  },
  "qa": {
    "clipping": {
      "bytes": 0,
      "limit": 0,
      "percent": 0,
      "clipped": true
    },
    "accessibility": [
      {
        "code": "string",
        "message": "string"
      }
    ],
    "spam": {
      "score": 0,
      "hits": [
        {
          "code": "string",
          "message": "string",
          "points": 0
        }
      ]
    },
    "css": []
  }
}
Schema
channelstringrequired
email | sms | whatsapp | push | postcard
subjectstringrequired
preheaderstringrequired
htmlstringrequired
textstringrequired
linksobject[]required
Show child parameters
urlstringrequired
positionnumberrequired
warningsstring[]required
smsobjectrequired
Show child parameters
segmentsnumberrequired
encodingstringrequired
GSM-7 | UCS-2
lintobjectrequired
Show child parameters
errorsobject[]required
Show child parameters
codestringrequired
messagestringrequired
warningsobject[]required
Show child parameters
codestringrequired
messagestringrequired
qaobject
Show child parameters
clippingobjectrequired
Show child parameters
bytesnumberrequired
limitnumberrequired
percentnumberrequired
clippedbooleanrequired
accessibilityobject[]required
Show child parameters
codestringrequired
messagestringrequired
spamobjectrequired
Show child parameters
scorenumberrequired
hitsobject[]required
cssobject[]required
= []
Show child parameters
codestringrequired
messagestringrequired
GEThttps://hermeticor.com/v1/snippets

Parameters

limitintegerquery
= 50
cursorstringquery

Code samples

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

Responses

200 Default Response
Example
{
  "items": [
    {
      "id": "string",
      "workspaceId": "string",
      "key": "string",
      "channel": "email",
      "body": "string",
      "locked": true,
      "createdAt": "2024-01-01T00:00:00Z",
      "updatedAt": "2024-01-01T00:00:00Z"
    }
  ],
  "nextCursor": "string"
}
Schema
itemsItemsItem32[]required
Show child parameters
idstringrequired
workspaceIdstringrequired
keystringrequired
channelstringrequired
email | sms | whatsapp | push | postcard
bodystringrequired
lockedbooleanrequired
createdAtstringrequired
updatedAtstringrequired
nextCursorstringrequired
PUThttps://hermeticor.com/v1/snippets

Create or update a snippet by key

Request body

application/json
keystringrequired
channelstringrequired
email | sms | whatsapp | push | postcard
bodystringrequired
{
  "key": "string",
  "channel": "email",
  "body": "string"
}

Code samples

cURL
curl -X PUT "https://hermeticor.com/v1/snippets" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"key":"string","channel":"email","body":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "id": "string",
  "workspaceId": "string",
  "key": "string",
  "channel": "email",
  "body": "string",
  "locked": true,
  "createdAt": "2024-01-01T00:00:00Z",
  "updatedAt": "2024-01-01T00:00:00Z"
}
Schema
idstringrequired
workspaceIdstringrequired
keystringrequired
channelstringrequired
email | sms | whatsapp | push | postcard
bodystringrequired
lockedbooleanrequired
createdAtstringrequired
updatedAtstringrequired
POSThttps://hermeticor.com/v1/snippets

Request body

application/json
keystringrequired
channelstringrequired
email | sms | whatsapp | push | postcard
bodystringrequired
{
  "key": "string",
  "channel": "email",
  "body": "string"
}

Code samples

cURL
curl -X POST "https://hermeticor.com/v1/snippets" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"key":"string","channel":"email","body":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201 Default Response

Same as 200 · PUT /v1/snippets

GEThttps://hermeticor.com/v1/snippets/{id}

Parameters

idstringpathrequired

Code samples

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

Responses

200 Default Response

Same as 200 · PUT /v1/snippets

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

Parameters

idstringpathrequired

Code samples

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

Responses

Updated