messages

Embed
Preview of the card
<a href="https://hermeticor.com/docs/ref-messages"><img src="https://hermeticor.com/docs/_api/public/orgs/5fcd8b3c-a27c-4688-972f-de710125592f/spaces/caf5dc05-15f7-4e0c-bdb8-ab29ede6211e/pages/8cc4dc4a-a73d-4367-99ad-799da94a79e7/social-card.svg?v=3e7ae33eec8b" alt="messages" width="600" height="315"></a>
GEThttps://hermeticor.com/v1/messages

Parameters

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

Code samples

cURL
curl -X GET "https://hermeticor.com/v1/messages" \
  -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
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/messages

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

Parameters

idstringpathrequired

Code samples

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

Responses

200 Default Response
Example
{
  "job": {
    "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"
  },
  "attempts": [
    {
      "id": "string",
      "jobId": "string",
      "n": 0,
      "status": "string",
      "errorClass": "string",
      "startedAt": "2024-01-01T00:00:00Z",
      "finishedAt": "2024-01-01T00:00:00Z"
    }
  ],
  "events": [
    {
      "id": "string",
      "jobId": "string",
      "profileId": "string",
      "kind": "string",
      "source": "string",
      "connectionId": "string",
      "url": "string",
      "ua": "string",
      "isMachine": true,
      "occurredAt": "2024-01-01T00:00:00Z"
    }
  ],
  "decisionLog": [
    {
      "stage": "string",
      "outcome": "allow",
      "reason": "string",
      "at": "2024-01-01T00:00:00Z"
    }
  ]
}
Schema
jobobjectrequired
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
attemptsobject[]required
Show child parameters
idstringrequired
jobIdstringrequired
nintegerrequired
statusstringrequired
errorClassstringrequired
startedAtstringrequired
finishedAtstringrequired
eventsobject[]required
Show child parameters
idstringrequired
jobIdstringrequired
profileIdstringrequired
kindstringrequired
sourcestringrequired
connectionIdstringrequired
urlstringrequired
uastringrequired
isMachinebooleanrequired
occurredAtstringrequired
decisionLogDecisionLogItem[]required
Show child parameters
stagestringrequired
outcomestringrequired
allow | block | defer
reasonstring
atstring
4XX Default Response

Same as 4XX · GET /v1/messages

5XX Default Response

Same as 4XX · GET /v1/messages

POSThttps://hermeticor.com/v1/messages/send

Send one message through the full consent/suppression/quiet-hours pipeline (idempotent on idempotencyKey). Purpose transactional/operational is a separate stream that still reaches people who unsubscribed from marketing, so it refuses (400) a template in a preference topic or used by a campaign, a topicId, and copy with {{ unsubscribe_url }}: send those as marketing

Request body

application/json
purposestringrequired
marketing | prospecting | transactional | operational
channelstringrequired
email | sms | whatsapp | push | postcard
profileIdstringrequired
templateIdstringrequired
versionIdstring
routeobjectrequired
Show child parameters
connectionIdstring
poolIdstring
routePolicyIdstring
idempotencyKeystring
topicIdstring
scheduledForstring
varsobject
{
  "purpose": "marketing",
  "channel": "email",
  "profileId": "string",
  "templateId": "string",
  "versionId": "string",
  "route": {
    "connectionId": "string",
    "poolId": "string",
    "routePolicyId": "string"
  },
  "idempotencyKey": "string",
  "topicId": "string",
  "scheduledFor": "2024-01-01T00:00:00Z",
  "vars": {}
}

Code samples

cURL
curl -X POST "https://hermeticor.com/v1/messages/send" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"purpose":"marketing","channel":"email","profileId":"string","templateId":"string","versionId":"string","route":{"connectionId":"string","poolId":"string","routePolicyId":"string"},"idempotencyKey":"string","topicId":"string","scheduledFor":"2024-01-01T00:00:00Z","vars":{}}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

202 Default Response
Example
{
  "jobId": "string",
  "status": "queued",
  "reason": "string"
}
Schema
jobIdstringrequired
statusstringrequired
queued | blocked | deferred | duplicate
reasonstring
4XX Default Response

Same as 4XX · GET /v1/messages

5XX Default Response

Same as 4XX · GET /v1/messages

DELETEhttps://hermeticor.com/v1/profiles/{id}/engagement

Delete a person's open and/or click history (privacy request); deliveries, bounces and consent stay

Parameters

kindstringquery
open | click | both = both
idstringpathrequired

Code samples

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

Responses

200 Default Response
Example
{
  "removed": 0
}
Schema
removednumberrequired
4XX Default Response

Same as 4XX · GET /v1/messages

5XX Default Response

Same as 4XX · GET /v1/messages

POSThttps://hermeticor.com/v1/admin/messages/{id}/retry

Replay a dead-lettered message; re-runs every policy stage

Parameters

idstringpathrequired

Code samples

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

Responses

200 Default Response
Example
{
  "jobId": "string",
  "status": "string"
}
Schema
jobIdstringrequired
statusstringrequired
4XX Default Response

Same as 4XX · GET /v1/messages

5XX Default Response

Same as 4XX · GET /v1/messages

Updated