campaigns
POST
https://hermeticor.com /v1/campaigns/{id}/drafts/decide Approve (send) or reject the selected drafts
Parameters
idstringpathrequiredRequest body
application/json
idsstring[]requiredactionstringrequired{
"ids": [
"string"
],
"action": "approve"
}Code samples
cURL
curl -X POST "https://hermeticor.com/v1/campaigns/{id}/drafts/decide" \
-H "Authorization: Bearer $HERMETICOR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"ids":["string"],"action":"approve"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"decided": 0,
"failed": 0
}Schema
decidedintegerrequiredfailedintegerrequired4XX Default Response
Example
{
"error": {
"code": "string",
"message": "string",
"details": {}
}
}Schema
errorobjectrequiredShow child parameters
codestringrequiredmessagestringrequireddetailsobjectGET
https://hermeticor.com /v1/campaign-folders/{id}/budgets Parameters
limitintegerqueryPage size; omitted returns the whole list
cursorstringqueryOpaque: the
nextCursor of the previous pageidstringpathrequiredCode samples
cURL
curl -X GET "https://hermeticor.com/v1/campaign-folders/{id}/budgets" \
-H "Authorization: Bearer $HERMETICOR_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"items": [
{
"id": "string",
"name": "string",
"currency": "string",
"amountMinor": 0,
"spentMinor": 0,
"remainingMinor": 0,
"overBudget": true,
"folderId": "string"
}
],
"nextCursor": "string"
}Schema
itemsPutV1BudgetsByIdFolderResponse[]requiredShow child parameters
idstringrequirednamestringrequiredcurrencystringrequiredamountMinorintegerrequiredspentMinorintegerrequiredremainingMinorintegerrequiredoverBudgetbooleanrequiredfolderIdstringrequirednextCursorstringrequiredGET
https://hermeticor.com /v1/emails Campaigns as one email list: state, type, channel, created/updated/scheduled ranges, archived and sort
Parameters
statestringquerychannelstringquerytypestringqueryqstringquerycreatedFromstringquerycreatedTostringqueryupdatedFromstringqueryupdatedTostringqueryscheduledFromstringqueryscheduledTostringqueryarchivedstringquerysortstringqueryorderstringquerylimitintegerquerycursorstringqueryCode samples
cURL
curl -X GET "https://hermeticor.com/v1/emails" \
-H "Authorization: Bearer $HERMETICOR_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"items": [
{
"id": "string",
"name": "string",
"state": "string",
"channel": "string",
"type": "string",
"archived": true,
"scheduledAt": "string",
"createdAt": "string",
"updatedAt": "string"
}
],
"nextCursor": "string"
}Schema
itemsobject[]requiredShow child parameters
idstringrequirednamestringrequiredstatestringrequiredchannelstringrequiredtypestringrequiredarchivedbooleanrequiredscheduledAtstringrequiredcreatedAtstringrequiredupdatedAtstringrequirednextCursorstringrequiredGET
https://hermeticor.com /v1/emails/{id}/draft The editable content of an email that has not been sent
Parameters
idstringpathrequiredCode samples
cURL
curl -X GET "https://hermeticor.com/v1/emails/{id}/draft" \
-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
messageIdstringrequiredsourcestringrequiredtemplateIdstringrequiredtemplateVersionIdstringrequiredhtmlstringrequiredplainTextstringrequiredblocksrequiredPATCH
https://hermeticor.com /v1/emails/{id}/draft Edit the draft; refused once the email is sending or sent
Parameters
idstringpathrequiredRequest body
application/json
templateobjectShow child parameters
templateIdstringrequiredversionIdstringhtmlstringurlstringblocksobjectplainTextstring{
"template": {
"templateId": "string",
"versionId": "string"
},
"html": "string",
"url": "string",
"blocks": {},
"plainText": "string"
}Code samples
cURL
curl -X PATCH "https://hermeticor.com/v1/emails/{id}/draft" \
-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
GET
https://hermeticor.com /v1/emails/statistics/list Totals for up to 50 emails (comma separated ids) in a date window, plus their sum
Parameters
idsstringqueryrequiredfromstringquerytostringqueryCode samples
cURL
curl -X GET "https://hermeticor.com/v1/emails/statistics/list?ids=<ids>" \
-H "Authorization: Bearer $HERMETICOR_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"window": {
"from": "string",
"to": "string"
},
"items": [
{
"id": "string",
"totals": {}
}
],
"aggregate": {}
}Schema
windowobjectrequiredShow child parameters
fromstringrequiredtostringrequireditemsobject[]requiredShow child parameters
idstringrequiredtotalsobjectrequiredaggregateobjectrequiredGET
https://hermeticor.com /v1/emails/statistics/histogram Sent, delivered, bounced, opened and clicked for one email per day, week or month between start and end
Parameters
idstringqueryrequiredstartstringqueryendstringqueryintervalstringquerydaysintegerqueryCode samples
cURL
curl -X GET "https://hermeticor.com/v1/emails/statistics/histogram?id=<id>" \
-H "Authorization: Bearer $HERMETICOR_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"id": "string",
"start": "string",
"end": "string",
"interval": "day",
"items": [
{
"day": "string",
"sent": 0,
"delivered": 0,
"bounced": 0,
"opens": 0,
"clicks": 0
}
]
}Schema
idstringrequiredstartstringrequiredendstringrequiredintervalstringrequireditemsobject[]requiredShow child parameters
daystringrequiredsentnumberrequireddeliverednumberrequiredbouncednumberrequiredopensnumberrequiredclicksnumberrequiredGET
https://hermeticor.com /v1/campaigns/{id}/postcard Parameters
idstringpathrequiredCode samples
cURL
curl -X GET "https://hermeticor.com/v1/campaigns/{id}/postcard" \
-H "Authorization: Bearer $HERMETICOR_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"messageId": "string",
"design": {
"size": "6x4",
"front": "string",
"back": "string"
}
}Schema
messageIdstringrequireddesignobjectrequiredShow child parameters
sizestringrequiredfrontstringrequiredbackstringrequiredUpdated