campaigns

Embed
Preview of the card
<a href="https://hermeticor.com/docs/ref-campaigns"><img src="https://hermeticor.com/docs/_api/public/orgs/5fcd8b3c-a27c-4688-972f-de710125592f/spaces/caf5dc05-15f7-4e0c-bdb8-ab29ede6211e/pages/7b5e5778-2701-4b75-820c-3417186ab185/social-card.svg?v=3e7ae33eec8b" alt="campaigns" width="600" height="315"></a>
POSThttps://hermeticor.com/v1/campaigns/{id}/messages

Parameters

idstringpathrequired

Request body

application/json
channelstring
email | sms | whatsapp | push | postcard
labelstring
subjectstring
previewTextstring
fromNamestring
replyTostring
templateIdstring
templateVersionIdstring
imageAssetIdstring
renderOptionsobject
sendAtstring
{
  "channel": "email",
  "label": "string",
  "subject": "string",
  "previewText": "string",
  "fromName": "string",
  "replyTo": "string",
  "templateId": "string",
  "templateVersionId": "string",
  "imageAssetId": "string",
  "renderOptions": {},
  "sendAt": "2024-01-01T00:00:00Z"
}

Code samples

cURL
curl -X POST "https://hermeticor.com/v1/campaigns/{id}/messages" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"channel":"email","label":"string","subject":"string","previewText":"string","fromName":"string","replyTo":"string","templateId":"string","templateVersionId":"string","imageAssetId":"string","renderOptions":{},"sendAt":"2024-01-01T00:00:00Z"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201 Default Response
Example
{
  "id": "string",
  "campaignId": "string",
  "position": 0,
  "channel": "email",
  "label": "string",
  "subject": "string",
  "previewText": "string",
  "fromName": "string",
  "replyTo": "string",
  "templateId": "string",
  "templateVersionId": "string",
  "imageAssetId": "string",
  "renderOptions": {},
  "sendAt": "2024-01-01T00:00:00Z"
}
Schema
idstringrequired
campaignIdstringrequired
positionintegerrequired
channelstringrequired
email | sms | whatsapp | push | postcard
labelstringrequired
subjectstringrequired
previewTextstringrequired
fromNamestringrequired
replyTostringrequired
templateIdstringrequired
templateVersionIdstringrequired
imageAssetIdstringrequired
renderOptionsobjectrequired
sendAtstring
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/campaigns/{id}/messages

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

Parameters

idstringpathrequired
messageIdstringpathrequired

Code samples

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

Responses

200 Default Response

Same as 201 · POST /v1/campaigns/{id}/messages

4XX Default Response

Same as 4XX · POST /v1/campaigns/{id}/messages

5XX Default Response

Same as 4XX · POST /v1/campaigns/{id}/messages

DELETEhttps://hermeticor.com/v1/campaigns/{id}/messages/{messageId}

Parameters

idstringpathrequired
messageIdstringpathrequired

Code samples

cURL
curl -X DELETE "https://hermeticor.com/v1/campaigns/{id}/messages/{messageId}" \
  -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/campaigns/{id}/messages

5XX Default Response

Same as 4XX · POST /v1/campaigns/{id}/messages

PATCHhttps://hermeticor.com/v1/campaigns/{id}/messages/{messageId}

Parameters

idstringpathrequired
messageIdstringpathrequired

Request body

application/json
labelstring
subjectstring
previewTextstring
fromNamestring
replyTostring
templateIdstring
templateVersionIdstring
imageAssetIdstring
renderOptionsobject
sendAtstring
{
  "label": "string",
  "subject": "string",
  "previewText": "string",
  "fromName": "string",
  "replyTo": "string",
  "templateId": "string",
  "templateVersionId": "string",
  "imageAssetId": "string",
  "renderOptions": {},
  "sendAt": "2024-01-01T00:00:00Z"
}

Code samples

cURL
curl -X PATCH "https://hermeticor.com/v1/campaigns/{id}/messages/{messageId}" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"label":"string","subject":"string","previewText":"string","fromName":"string","replyTo":"string","templateId":"string","templateVersionId":"string","imageAssetId":"string","renderOptions":{},"sendAt":"2024-01-01T00:00:00Z"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response

Same as 201 · POST /v1/campaigns/{id}/messages

4XX Default Response

Same as 4XX · POST /v1/campaigns/{id}/messages

5XX Default Response

Same as 4XX · POST /v1/campaigns/{id}/messages

POSThttps://hermeticor.com/v1/campaigns/{id}/messages/{messageId}/clone

Parameters

idstringpathrequired
messageIdstringpathrequired

Code samples

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

Responses

201 Default Response

Same as 201 · POST /v1/campaigns/{id}/messages

4XX Default Response

Same as 4XX · POST /v1/campaigns/{id}/messages

5XX Default Response

Same as 4XX · POST /v1/campaigns/{id}/messages

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

Parameters

idstringpathrequired

Code samples

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

Responses

200 Default Response
Example
{
  "messageId": "string",
  "source": "template",
  "templateId": "string",
  "templateVersionId": "string",
  "html": "string",
  "plainText": "string",
  "blocks": {}
}
Schema
messageIdstringrequired
sourcestringrequired
template | html | blocks | none
templateIdstringrequired
templateVersionIdstringrequired
htmlstringrequired
plainTextstringrequired
blocksrequired
4XX Default Response

Same as 4XX · POST /v1/campaigns/{id}/messages

5XX Default Response

Same as 4XX · POST /v1/campaigns/{id}/messages

PUThttps://hermeticor.com/v1/campaigns/{id}/content

Parameters

idstringpathrequired

Request body

application/json
templateobject
Show child parameters
templateIdstringrequired
versionIdstring
htmlstring
urlstring
blocksobject
plainTextstring
{
  "template": {
    "templateId": "string",
    "versionId": "string"
  },
  "html": "string",
  "url": "string",
  "blocks": {},
  "plainText": "string"
}

Code samples

cURL
curl -X PUT "https://hermeticor.com/v1/campaigns/{id}/content" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"template":{"templateId":"string","versionId":"string"},"html":"string","url":"string","blocks":{},"plainText":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response

Same as 200 · GET /v1/campaigns/{id}/content

4XX Default Response

Same as 4XX · POST /v1/campaigns/{id}/messages

5XX Default Response

Same as 4XX · POST /v1/campaigns/{id}/messages

POSThttps://hermeticor.com/v1/campaigns/{id}/recipient-estimations

Parameters

idstringpathrequired

Code samples

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

Responses

202 Default Response
Example
{
  "id": "string",
  "campaignId": "string",
  "status": "queued",
  "createdAt": "2024-01-01T00:00:00Z",
  "completedAt": "2024-01-01T00:00:00Z",
  "result": {
    "audience": 0,
    "suppressed": 0,
    "unconsented": 0,
    "estimated": 0,
    "included": 0,
    "excludedBy": [
      {
        "kind": "segment",
        "id": "string",
        "removed": 0
      }
    ],
    "reasons": {}
  }
}
Schema
idstringrequired
campaignIdstringrequired
statusstringrequired
queued | complete | failed
createdAtstringrequired
completedAtstringrequired
resultobjectrequired
Show child parameters
audiencenumberrequired
suppressednumberrequired
unconsentednumberrequired
estimatednumberrequired
includednumber
excludedByExcludedByItem[]
Show child parameters
kindstringrequired
segment | list | tag
idstringrequired
removednumberrequired
reasonsobject
4XX Default Response

Same as 4XX · POST /v1/campaigns/{id}/messages

5XX Default Response

Same as 4XX · POST /v1/campaigns/{id}/messages

GEThttps://hermeticor.com/v1/campaigns/{id}/recipient-estimations/{jobId}

Parameters

idstringpathrequired
jobIdstringpathrequired

Code samples

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

Responses

4XX Default Response

Same as 4XX · POST /v1/campaigns/{id}/messages

5XX Default Response

Same as 4XX · POST /v1/campaigns/{id}/messages

Updated