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>
POSThttps://hermeticor.com/v1/transactional/send

Transactional send to raw email/phone recipients: inline or template content, per-recipient vars, tags, metadata, attachments. Suppression still applies; idempotent on the key (per recipient). 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.

Request body

application/json
channelstring
email | sms | whatsapp | push | postcard = email
toToItem[]required
Show child parameters
profileIdstring
externalIdstring
emailstring
phonestring
namestring
varsobject
consentstring
record_optin | require
templateIdstring
versionIdstring
subjectstring
htmlstring
textstring
varsobject
fromobject
Show child parameters
emailstringrequired
namestring
replyTostring
inReplyToIdstring
throttleobject
Show child parameters
keystringrequired
windowMinutesintegerrequired
headersobject
attachmentsAttachmentsItem[]
Show child parameters
filenamestringrequired
contentTypestringrequired
contentBase64stringrequired
cidstring
ccstring[]
bccstring[]
templateContentobject[]
Show child parameters
namestringrequired
contentstringrequired
attachmentUrlsobject[]
Show child parameters
urlstringrequired
filenamestring
cidstring
messageVersionsobject[]
Show child parameters
toToItem[]required
Show child parameters
profileIdstring
externalIdstring
emailstring
phonestring
namestring
varsobject
consentstring
record_optin | require
subjectstring
templateIdstring
replyTostring
varsobject
inlineCssboolean
urlStripQsboolean
preserveRecipientsboolean
viewContentLinkboolean
googleAnalyticsDomainsstring[]
googleAnalyticsCampaignstring
mergeLanguagestring
liquid | mailchimp | handlebars
recipientMetadataobject[]
Show child parameters
rcptstringrequired
valuesobjectrequired
importantboolean
subaccountstring
trackingDomainstring
signingDomainstring
returnPathDomainstring
tagsstring[]
metadataobject
trackingobject
Show child parameters
opensboolean
clicksboolean
scheduledForstring
routeobject
Show child parameters
connectionIdstring
poolIdstring
routePolicyIdstring
idempotencyKeystring
batchIdstring
{
  "channel": "email",
  "to": [
    {
      "profileId": "string",
      "externalId": "string",
      "email": "string",
      "phone": "string",
      "name": "string",
      "vars": {},
      "consent": "record_optin"
    }
  ],
  "templateId": "string",
  "versionId": "string",
  "subject": "string",
  "html": "string",
  "text": "string",
  "vars": {},
  "from": {
    "email": "string",
    "name": "string"
  },
  "replyTo": "string",
  "inReplyToId": "string",
  "throttle": {
    "key": "string",
    "windowMinutes": 0
  },
  "headers": {},
  "attachments": [
    {
      "filename": "string",
      "contentType": "string",
      "contentBase64": "string",
      "cid": "string"
    }
  ],
  "cc": [
    "string"
  ],
  "bcc": [
    "string"
  ],
  "templateContent": [
    {
      "name": "string",
      "content": "string"
    }
  ],
  "attachmentUrls": [
    {
      "url": "string",
      "filename": "string",
      "cid": "string"
    }
  ],
  "messageVersions": [
    {
      "to": [
        {
          "profileId": "string",
          "externalId": "string",
          "email": "string",
          "phone": "string",
          "name": "string",
          "vars": {},
          "consent": "record_optin"
        }
      ],
      "subject": "string",
      "templateId": "string",
      "replyTo": "string",
      "vars": {}
    }
  ],
  "inlineCss": true,
  "urlStripQs": true,
  "preserveRecipients": true,
  "viewContentLink": true,
  "googleAnalyticsDomains": [
    "string"
  ],
  "googleAnalyticsCampaign": "string",
  "mergeLanguage": "liquid",
  "recipientMetadata": [
    {
      "rcpt": "string",
      "values": {}
    }
  ],
  "important": true,
  "subaccount": "string",
  "trackingDomain": "string",
  "signingDomain": "string",
  "returnPathDomain": "string",
  "tags": [
    "string"
  ],
  "metadata": {},
  "tracking": {
    "opens": true,
    "clicks": true
  },
  "scheduledFor": "2024-01-01T00:00:00Z",
  "route": {
    "connectionId": "string",
    "poolId": "string",
    "routePolicyId": "string"
  },
  "idempotencyKey": "string",
  "batchId": "string"
}

Code samples

cURL
curl -X POST "https://hermeticor.com/v1/transactional/send" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"channel":"email","to":[{"profileId":"string","externalId":"string","email":"string","phone":"string","name":"string","vars":{},"consent":"record_optin"}],"templateId":"string","versionId":"string","subject":"string","html":"string","text":"string","vars":{},"from":{"email":"string","name":"string"},"replyTo":"string","inReplyToId":"string","throttle":{"key":"string","windowMinutes":0},"headers":{},"attachments":[{"filename":"string","contentType":"string","contentBase64":"string","cid":"string"}],"cc":["string"],"bcc":["string"],"templateContent":[{"name":"string","content":"string"}],"attachmentUrls":[{"url":"string","filename":"string","cid":"string"}],"messageVersions":[{"to":[{"profileId":"string","externalId":"string","email":"string","phone":"string","name":"string","vars":{},"consent":"record_optin"}],"subject":"string","templateId":"string","replyTo":"string","vars":{}}],"inlineCss":true,"urlStripQs":true,"preserveRecipients":true,"viewContentLink":true,"googleAnalyticsDomains":["string"],"googleAnalyticsCampaign":"string","mergeLanguage":"liquid","recipientMetadata":[{"rcpt":"string","values":{}}],"important":true,"subaccount":"string","trackingDomain":"string","signingDomain":"string","returnPathDomain":"string","tags":["string"],"metadata":{},"tracking":{"opens":true,"clicks":true},"scheduledFor":"2024-01-01T00:00:00Z","route":{"connectionId":"string","poolId":"string","routePolicyId":"string"},"idempotencyKey":"string","batchId":"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
4XX Default Response
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
detailsobject
5XX Default Response

Same as 4XX · POST /v1/transactional/send

POSThttps://hermeticor.com/v1/transactional/send-raw

Send a complete RFC 5322 (MIME) message; From must be a verified sender

Request body

application/json
rawMimestringrequired
tostring[]
fromEmailstring
fromNamestring
returnPathDomainstring
importantboolean
viewContentLinkboolean
subaccountstring
tagsstring[]
metadataobject
trackingobject
Show child parameters
opensboolean
clicksboolean
scheduledForstring
routeobject
Show child parameters
connectionIdstring
poolIdstring
routePolicyIdstring
idempotencyKeystring
batchIdstring
{
  "rawMime": "string",
  "to": [
    "string"
  ],
  "fromEmail": "string",
  "fromName": "string",
  "returnPathDomain": "string",
  "important": true,
  "viewContentLink": true,
  "subaccount": "string",
  "tags": [
    "string"
  ],
  "metadata": {},
  "tracking": {
    "opens": true,
    "clicks": true
  },
  "scheduledFor": "2024-01-01T00:00:00Z",
  "route": {
    "connectionId": "string",
    "poolId": "string",
    "routePolicyId": "string"
  },
  "idempotencyKey": "string",
  "batchId": "string"
}

Code samples

cURL
curl -X POST "https://hermeticor.com/v1/transactional/send-raw" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"rawMime":"string","to":["string"],"fromEmail":"string","fromName":"string","returnPathDomain":"string","important":true,"viewContentLink":true,"subaccount":"string","tags":["string"],"metadata":{},"tracking":{"opens":true,"clicks":true},"scheduledFor":"2024-01-01T00:00:00Z","route":{"connectionId":"string","poolId":"string","routePolicyId":"string"},"idempotencyKey":"string","batchId":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

202 Default Response

Same as 202 · POST /v1/transactional/send

4XX Default Response

Same as 4XX · POST /v1/transactional/send

5XX Default Response

Same as 4XX · POST /v1/transactional/send

GEThttps://hermeticor.com/v1/messages/{id}/content

Rendered subject/body/headers of a sent message, while inside the retention window

Parameters

idstringpathrequired

Code samples

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

Responses

200 Default Response
Example
{
  "jobId": "string",
  "subject": "string",
  "text": "string",
  "html": "string",
  "headers": {},
  "attachments": [
    {
      "filename": "string",
      "contentType": "string",
      "size": 0,
      "cid": "string"
    }
  ],
  "expiresAt": "2024-01-01T00:00:00Z"
}
Schema
jobIdstringrequired
subjectstringrequired
textstringrequired
htmlstringrequired
headersobjectrequired
attachmentsobject[]required
Show child parameters
filenamestringrequired
contentTypestringrequired
sizenumberrequired
cidstring
expiresAtstringrequired
4XX Default Response

Same as 4XX · POST /v1/transactional/send

5XX Default Response

Same as 4XX · POST /v1/transactional/send

DELETEhttps://hermeticor.com/v1/messages/{id}/content

Erase the stored body, headers and attachments of one message now; the delivery record and reporting stay

Parameters

idstringpathrequired

Code samples

cURL
curl -X DELETE "https://hermeticor.com/v1/messages/{id}/content" \
  -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 · POST /v1/transactional/send

5XX Default Response

Same as 4XX · POST /v1/transactional/send

Updated