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/translations/export

Export translations as importable JSON

Parameters

limitintegerquery
= 50
cursorstringquery
resourceTypestringquery
template | saved_section | form | sms | workflow_message | campaign_variant
resourceIdstringquery
localestringquery
statusstringquery
draft | approved
templateIdstringquery

Code samples

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

Responses

200 Default Response
Example
{
  "items": [
    {
      "resourceType": "template",
      "resourceId": "string",
      "locale": "string",
      "status": "draft",
      "content": {}
    }
  ]
}
Schema
itemsobject[]required
Show child parameters
resourceTypestringrequired
template | saved_section | form | sms | workflow_message | campaign_variant
resourceIdstringrequired
localestringrequired
statusstringrequired
draft | approved = draft
contentobjectrequired
= {}
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/translations/export

POSThttps://hermeticor.com/v1/translations/import

Request body

application/json
itemsPostV1TranslationsBody[]required
Show child parameters
resourceTypestringrequired
template | saved_section | form | sms | workflow_message | campaign_variant
resourceIdstringrequired
localestringrequired
statusstring
draft | approved = draft
contentobject
= {}
overwriteboolean
= true
{
  "items": [
    {
      "resourceType": "template",
      "resourceId": "string",
      "locale": "string",
      "status": "draft",
      "content": {}
    }
  ],
  "overwrite": true
}

Code samples

cURL
curl -X POST "https://hermeticor.com/v1/translations/import" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"items":[{"resourceType":"template","resourceId":"string","locale":"string","status":"draft","content":{}}],"overwrite":true}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "created": 0,
  "updated": 0,
  "skipped": 0
}
Schema
creatednumberrequired
updatednumberrequired
skippednumberrequired
4XX Default Response

Same as 4XX · GET /v1/translations/export

5XX Default Response

Same as 4XX · GET /v1/translations/export

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

Parameters

idstringpathrequired

Code samples

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

Responses

200 Default Response
Example
{
  "resourceType": "template",
  "resourceId": "string",
  "locale": "string",
  "status": "draft",
  "content": {},
  "id": "string",
  "createdAt": "2024-01-01T00:00:00Z",
  "updatedAt": "2024-01-01T00:00:00Z"
}
Schema
resourceTypestringrequired
template | saved_section | form | sms | workflow_message | campaign_variant
resourceIdstringrequired
localestringrequired
statusstringrequired
draft | approved = draft
contentobjectrequired
= {}
idstringrequired
createdAtstringrequired
updatedAtstringrequired
4XX Default Response

Same as 4XX · GET /v1/translations/export

5XX Default Response

Same as 4XX · GET /v1/translations/export

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

Parameters

idstringpathrequired

Code samples

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

Responses

200 Default Response
Example
{
  "ok": true
}
Schema
okbooleanrequired
true
4XX Default Response

Same as 4XX · GET /v1/translations/export

5XX Default Response

Same as 4XX · GET /v1/translations/export

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

Parameters

idstringpathrequired

Request body

application/json
statusstring
draft | approved
contentobject
{
  "status": "draft",
  "content": {}
}

Code samples

cURL
curl -X PATCH "https://hermeticor.com/v1/translations/{id}" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status":"draft","content":{}}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response

Same as 200 · GET /v1/translations/{id}

4XX Default Response

Same as 4XX · GET /v1/translations/export

5XX Default Response

Same as 4XX · GET /v1/translations/export

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

Blocked (412) while a scheduled campaign or live workflow uses it, unless force=true

Parameters

forcestringquery
true | false
idstringpathrequired

Code samples

cURL
curl -X POST "https://hermeticor.com/v1/templates/{id}/archive" \
  -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/translations/export

5XX Default Response

Same as 4XX · GET /v1/translations/export

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

Parameters

idstringpathrequired

Code samples

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

Responses

200 Default Response

Same as 200 · POST /v1/templates/{id}/archive

4XX Default Response

Same as 4XX · GET /v1/translations/export

5XX Default Response

Same as 4XX · GET /v1/translations/export

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

One-way copy into the other format: a block template into a new HTML template, an HTML template into a new drag-and-drop template

Parameters

idstringpathrequired

Request body

application/json
namestring
tostring
html | blocks
{
  "name": "string",
  "to": "html"
}

Code samples

cURL
curl -X POST "https://hermeticor.com/v1/templates/{id}/convert" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","to":"html"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201 Default Response

Same as 200 · POST /v1/templates/{id}/archive

4XX Default Response

Same as 4XX · GET /v1/translations/export

5XX Default Response

Same as 4XX · GET /v1/translations/export

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

Render a template by id with merge variables (no send, no tracking)

Parameters

idstringpathrequired

Request body

application/json
versionIdstring
varsobject
profileobject
localestring
strictboolean
= false
{
  "versionId": "string",
  "vars": {},
  "profile": {},
  "locale": "string",
  "strict": false
}

Code samples

cURL
curl -X POST "https://hermeticor.com/v1/templates/{id}/render" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"versionId":"string","vars":{},"profile":{},"locale":"string","strict":false}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "subject": "string",
  "preheader": "string",
  "html": "string",
  "text": "string",
  "warnings": [
    "string"
  ]
}
Schema
subjectstringrequired
preheaderstringrequired
htmlstringrequired
textstringrequired
warningsstring[]required
4XX Default Response

Same as 4XX · GET /v1/translations/export

5XX Default Response

Same as 4XX · GET /v1/translations/export

Updated