transactional

Embed
Preview of the card
<a href="https://hermeticor.com/docs/ref-transactional"><img src="https://hermeticor.com/docs/_api/public/orgs/5fcd8b3c-a27c-4688-972f-de710125592f/spaces/caf5dc05-15f7-4e0c-bdb8-ab29ede6211e/pages/3cb76e64-a1f1-4ede-8c35-73d2172e4bf2/social-card.svg?v=3e7ae33eec8b" alt="transactional" width="600" height="315"></a>
PATCHhttps://hermeticor.com/v1/transactional/definitions/{id}

Parameters

idstringpathrequired

Request body

application/json
namestring
descriptionstring
templateIdstring
settingsobject
Show child parameters
subjectstring
fromEmailstring
fromNamestring
replyTostring
ccstring[]
bccstring[]
tagsstring[]
trackingobject
Show child parameters
opensboolean
clicksboolean
routeobject
Show child parameters
connectionIdstring
poolIdstring
routePolicyIdstring
statusstring
active | archived
{
  "name": "string",
  "description": "string",
  "templateId": "string",
  "settings": {
    "subject": "string",
    "fromEmail": "string",
    "fromName": "string",
    "replyTo": "string",
    "cc": [
      "string"
    ],
    "bcc": [
      "string"
    ],
    "tags": [
      "string"
    ],
    "tracking": {
      "opens": true,
      "clicks": true
    },
    "route": {
      "connectionId": "string",
      "poolId": "string",
      "routePolicyId": "string"
    }
  },
  "status": "active"
}

Code samples

cURL
curl -X PATCH "https://hermeticor.com/v1/transactional/definitions/{id}" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","description":"string","templateId":"string","settings":{"subject":"string","fromEmail":"string","fromName":"string","replyTo":"string","cc":["string"],"bcc":["string"],"tags":["string"],"tracking":{"opens":true,"clicks":true},"route":{"connectionId":"string","poolId":"string","routePolicyId":"string"}},"status":"active"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "id": "string",
  "name": "string",
  "description": "string",
  "channel": "email",
  "templateId": "string",
  "settings": {
    "subject": "string",
    "fromEmail": "string",
    "fromName": "string",
    "replyTo": "string",
    "cc": [
      "string"
    ],
    "bcc": [
      "string"
    ],
    "tags": [
      "string"
    ],
    "tracking": {
      "opens": true,
      "clicks": true
    },
    "route": {
      "connectionId": "string",
      "poolId": "string",
      "routePolicyId": "string"
    }
  },
  "status": "string",
  "createdAt": "2024-01-01T00:00:00Z",
  "updatedAt": "2024-01-01T00:00:00Z"
}
Schema
idstringrequired
namestringrequired
descriptionstringrequired
channelstringrequired
email | sms | whatsapp | push | postcard
templateIdstringrequired
settingsobjectrequired
Show child parameters
subjectstring
fromEmailstring
fromNamestring
replyTostring
ccstring[]
bccstring[]
tagsstring[]
trackingobject
Show child parameters
opensboolean
clicksboolean
routeobject
Show child parameters
connectionIdstring
poolIdstring
routePolicyIdstring
statusstringrequired
createdAtstringrequired
updatedAtstringrequired
4XX Default Response
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
detailsobject
POSThttps://hermeticor.com/v1/transactional/definitions/{id}/send

Send a transactional definition by id: recipients and data in, template and settings from the definition. Merge tags (Liquid, strict): `{{ vars.<key> }}` reads the call-level `vars` merged with the recipient's own `vars`; `{{ vars.recipient.email }}`, `{{ vars.recipient.phone }}` and `{{ vars.recipient.name }}` are the recipient as given; `{{ profile.<field> }}` is the contact (firstName, lastName, emailPrimary, phonePrimary, timezone, locale, country, city, region, or a custom attribute). Bare names such as `{{ name }}` are not defined (except with mergeLanguage handlebars). A `vars.*` tag the send does not supply comes back per recipient as `invalid` before anything is queued. Transactional stream: this route still reaches people who unsubscribed from marketing, so it refuses (400) marketing content: a template in a preference topic or used by a campaign, and copy with `{{ unsubscribe_url }}` (or `*|UNSUB|*`). Send those through /v1/messages/send with purpose marketing.

Parameters

idstringpathrequired

Request body

application/json
toToItem[]required
Show child parameters
profileIdstring
externalIdstring
emailstring
phonestring
namestring
varsobject
consentstring
record_optin | require
varsobject
tagsstring[]
metadataobject
scheduledForstring
batchIdstring
attachmentsAttachmentsItem[]
Show child parameters
filenamestringrequired
contentTypestringrequired
contentBase64stringrequired
cidstring
idempotencyKeystring
{
  "to": [
    {
      "profileId": "string",
      "externalId": "string",
      "email": "string",
      "phone": "string",
      "name": "string",
      "vars": {},
      "consent": "record_optin"
    }
  ],
  "vars": {},
  "tags": [
    "string"
  ],
  "metadata": {},
  "scheduledFor": "2024-01-01T00:00:00Z",
  "batchId": "string",
  "attachments": [
    {
      "filename": "string",
      "contentType": "string",
      "contentBase64": "string",
      "cid": "string"
    }
  ],
  "idempotencyKey": "string"
}

Code samples

cURL
curl -X POST "https://hermeticor.com/v1/transactional/definitions/{id}/send" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"to":[{"profileId":"string","externalId":"string","email":"string","phone":"string","name":"string","vars":{},"consent":"record_optin"}],"vars":{},"tags":["string"],"metadata":{},"scheduledFor":"2024-01-01T00:00:00Z","batchId":"string","attachments":[{"filename":"string","contentType":"string","contentBase64":"string","cid":"string"}],"idempotencyKey":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

202 Default Response
Example
{
  "results": [
    {
      "recipient": "string",
      "jobId": "string",
      "status": "queued",
      "reason": "string"
    }
  ]
}
Schema
resultsResultsItem[]required
Show child parameters
recipientstringrequired
jobIdstringrequired
statusstringrequired
queued | scheduled | rejected | invalid | duplicate
reasonstring
GEThttps://hermeticor.com/v1/transactional/definitions/{id}/deliveries

Messages sent through this definition

Parameters

limitintegerquery
= 50
cursorstringquery
sortstringquery
createdAt | sentAt | status | destination
profileIdstringquery
statusstringquery
queued | deferred | blocked | sending | accepted | delivered | bounced | complained | failed | cancelled | needs_reconcile
qstringquery
objectTypestringquery
objectIdstringquery
orderstringquery
asc | desc = desc
tagstringquery
metadatastringquery
senderIdentityIdstringquery
templateIdstringquery
channelstringquery
email | sms | whatsapp | push | postcard
fromstringquery
tostringquery
varsstringquery
eventKindstringquery
idstringpathrequired

Code samples

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

Responses

200 Default Response
Example
{
  "items": [
    {
      "id": "string",
      "idempotencyKey": "string",
      "purpose": "marketing",
      "channel": "email",
      "profileId": "string",
      "destination": "string",
      "connectionId": "string",
      "senderIdentityId": "string",
      "sourceKind": "campaign",
      "sourceId": "string",
      "stepKey": "string",
      "templateVersionId": "string",
      "variantKey": "string",
      "status": "queued",
      "blockReason": "string",
      "errorClass": "string",
      "decisionLog": [
        {
          "stage": "string",
          "outcome": "allow",
          "reason": "string",
          "at": "2024-01-01T00:00:00Z"
        }
      ],
      "scheduledFor": "2024-01-01T00:00:00Z",
      "sentAt": "2024-01-01T00:00:00Z",
      "providerMessageId": "string",
      "subject": "string",
      "tags": [
        "string"
      ],
      "metadata": {},
      "createdAt": "2024-01-01T00:00:00Z",
      "updatedAt": "2024-01-01T00:00:00Z"
    }
  ],
  "nextCursor": "string"
}
Schema
itemsItemsItem42[]required
Show child parameters
idstringrequired
idempotencyKeystringrequired
purposestringrequired
marketing | prospecting | transactional | operational
channelstringrequired
email | sms | whatsapp | push | postcard
profileIdstringrequired
destinationstringrequired
connectionIdstringrequired
senderIdentityIdstringrequired
sourceKindstringrequired
campaign | workflow | sequence | api
sourceIdstringrequired
stepKeystringrequired
templateVersionIdstringrequired
variantKeystringrequired
statusstringrequired
queued | deferred | blocked | sending | accepted | delivered | bounced | complained | failed | cancelled | needs_reconcile
blockReasonstringrequired
errorClassstringrequired
decisionLogDecisionLogItem[]required
Show child parameters
stagestringrequired
outcomestringrequired
allow | block | defer
reasonstring
atstring
scheduledForstringrequired
sentAtstringrequired
providerMessageIdstringrequired
subjectstringrequired
tagsstring[]required
metadataobjectrequired
createdAtstringrequired
updatedAtstringrequired
nextCursorstringrequired
GEThttps://hermeticor.com/v1/transactional/definitions/{id}/links

Parameters

limitintegerquery
Page size; omitted returns the whole list
cursorstringquery
Opaque: the nextCursor of the previous page
idstringpathrequired

Code samples

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

Responses

200 Default Response
Example
{
  "items": [
    {
      "url": "string",
      "clicks": 0,
      "uniqueClickers": 0
    }
  ],
  "nextCursor": "string"
}
Schema
itemsobject[]required
Show child parameters
urlstringrequired
clicksintegerrequired
uniqueClickersintegerrequired
nextCursorstringrequired
GEThttps://hermeticor.com/v1/transactional/definitions/{id}/translations

Parameters

limitintegerquery
Page size; omitted returns the whole list
cursorstringquery
Opaque: the nextCursor of the previous page
idstringpathrequired

Code samples

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

Responses

200 Default Response
Example
{
  "items": [
    {
      "id": "string",
      "locale": "string",
      "status": "string",
      "content": {}
    }
  ],
  "nextCursor": "string"
}
Schema
itemsItemsItem49[]required
Show child parameters
idstringrequired
localestringrequired
statusstringrequired
contentobjectrequired
nextCursorstringrequired

Updated