POST
https://hermeticor.com /v1/whatsapp/templates Register a WhatsApp template (already approved: give its provider id; otherwise it is submitted for approval) and create the Hermeticor template campaigns and flows use
Request body
application/json
connectionIdstringrequirednamestringrequiredlanguagestringrequiredcategorystringrequiredbodystringrequiredvariablesstring[]providerTemplateIdstringsubmitbooleanheaderobjectShow child parameters
formatstringrequiredtextstringurlstringhandlestringfooterstringbuttonsButtonsItem2[]{
"connectionId": "string",
"name": "string",
"language": "string",
"category": "marketing",
"body": "string",
"variables": [],
"providerTemplateId": "string",
"submit": false,
"header": {
"format": "text",
"text": "string",
"url": "string",
"handle": "string"
},
"footer": "string",
"buttons": []
}Code samples
cURL
curl -X POST "https://hermeticor.com/v1/whatsapp/templates" \
-H "Authorization: Bearer $HERMETICOR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"connectionId":"string","name":"string","language":"string","category":"marketing","body":"string","variables":[],"providerTemplateId":"string","submit":false,"header":{"format":"text","text":"string","url":"string","handle":"string"},"footer":"string","buttons":[]}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
201 Default Response
Example
{
"id": "string",
"connectionId": "string",
"contentTemplateId": "string",
"name": "string",
"language": "string",
"category": "marketing",
"body": "string",
"variables": [
"string"
],
"status": "draft",
"providerTemplateId": "string",
"header": {
"format": "text",
"text": "string",
"url": "string",
"handle": "string"
},
"footer": "string",
"buttons": [
{
"type": "quick_reply",
"text": "string"
}
],
"rejectionReason": "string",
"lastSyncedAt": "2024-01-01T00:00:00Z",
"createdAt": "2024-01-01T00:00:00Z"
}Schema
idstringrequiredconnectionIdstringrequiredcontentTemplateIdstringrequirednamestringrequiredlanguagestringrequiredcategorystringrequiredbodystringrequiredvariablesstring[]requiredstatusstringrequiredproviderTemplateIdstringrequiredheaderobjectrequiredShow child parameters
formatstringrequiredtextstringurlstringhandlestringfooterstringrequiredbuttonsButtonsItem[]requiredrejectionReasonstringrequiredlastSyncedAtstringrequiredcreatedAtstringrequired4XX Default Response
Example
{
"error": {
"code": "string",
"message": "string",
"details": {}
}
}Schema
errorobjectrequiredShow child parameters
codestringrequiredmessagestringrequireddetailsobjectGET
https://hermeticor.com /v1/whatsapp/templates/{id} One registered template with its approval status (refresh=true pulls the latest status from the provider first)
Parameters
refreshstringqueryidstringpathrequiredCode samples
cURL
curl -X GET "https://hermeticor.com/v1/whatsapp/templates/{id}" \
-H "Authorization: Bearer $HERMETICOR_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
DELETE
https://hermeticor.com /v1/whatsapp/templates/{id} Delete a template at the provider and here (localOnly=true skips the provider call); the linked Hermeticor template is archived
Parameters
localOnlystringqueryidstringpathrequiredCode samples
cURL
curl -X DELETE "https://hermeticor.com/v1/whatsapp/templates/{id}" \
-H "Authorization: Bearer $HERMETICOR_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"ok": true
}Schema
okbooleanrequiredPATCH
https://hermeticor.com /v1/whatsapp/templates/{id} Edit a draft or rejected template (any field) or an approved one (merge values only); the linked Hermeticor template follows
Parameters
idstringpathrequiredRequest body
application/json
bodystringvariablesstring[]categorystringlanguagestringheaderobjectShow child parameters
formatstringrequiredtextstringurlstringhandlestringfooterstringbuttonsButtonsItem2[]{
"body": "string",
"variables": [
"string"
],
"category": "marketing",
"language": "string",
"header": {
"format": "text",
"text": "string",
"url": "string",
"handle": "string"
},
"footer": "string",
"buttons": [
{
"type": "quick_reply",
"text": "string"
}
]
}Code samples
cURL
curl -X PATCH "https://hermeticor.com/v1/whatsapp/templates/{id}" \
-H "Authorization: Bearer $HERMETICOR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"body":"string","variables":["string"],"category":"marketing","language":"string","header":{"format":"text","text":"string","url":"string","handle":"string"},"footer":"string","buttons":[{"type":"quick_reply","text":"string"}]}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
POST
https://hermeticor.com /v1/whatsapp/templates/{id}/submit Send a draft or rejected template to the provider for approval
Parameters
idstringpathrequiredCode samples
cURL
curl -X POST "https://hermeticor.com/v1/whatsapp/templates/{id}/submit" \
-H "Authorization: Bearer $HERMETICOR_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
POST
https://hermeticor.com /v1/whatsapp/templates/sync Pull approval status from the provider into the registered templates
Request body
application/json
connectionIdstringrequired{
"connectionId": "string"
}Code samples
cURL
curl -X POST "https://hermeticor.com/v1/whatsapp/templates/sync" \
-H "Authorization: Bearer $HERMETICOR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"connectionId":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"updated": 0,
"imported": 0
}Schema
updatedintegerrequiredimportedintegerrequiredGET
https://hermeticor.com /v1/whatsapp/stats WhatsApp delivery numbers per day (accepted, delivered, failed, blocked, replies) with the reasons messages were blocked; default last 30 days
Parameters
fromstringquerytostringqueryCode samples
cURL
curl -X GET "https://hermeticor.com/v1/whatsapp/stats" \
-H "Authorization: Bearer $HERMETICOR_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"days": [
{
"accepted": 0,
"delivered": 0,
"failed": 0,
"blocked": 0,
"replies": 0,
"day": "string"
}
],
"totals": {
"accepted": 0,
"delivered": 0,
"failed": 0,
"blocked": 0,
"replies": 0
},
"blockReasons": [
{
"reason": "string",
"count": 0
}
]
}Schema
daysobject[]requiredShow child parameters
acceptedintegerrequireddeliveredintegerrequiredfailedintegerrequiredblockedintegerrequiredrepliesintegerrequireddaystringrequiredtotalsobjectrequiredShow child parameters
acceptedintegerrequireddeliveredintegerrequiredfailedintegerrequiredblockedintegerrequiredrepliesintegerrequiredblockReasonsBlockReasonsItem[]requiredShow child parameters
reasonstringrequiredcountintegerrequiredPOST
https://hermeticor.com /v1/whatsapp/test-send Send a test to your own number. Requires both confirmations; records the opt-in as given by the person who clicked; STOP and suppression still win
Request body
application/json
connectionIdstringrequiredphonestringrequiredtemplateIdstringtextstringownNumberConfirmedbooleanrequiredoptInConfirmedbooleanrequiredidempotencyKeystring{
"connectionId": "string",
"phone": "string",
"templateId": "string",
"text": "string",
"ownNumberConfirmed": true,
"optInConfirmed": true,
"idempotencyKey": "string"
}Code samples
cURL
curl -X POST "https://hermeticor.com/v1/whatsapp/test-send" \
-H "Authorization: Bearer $HERMETICOR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"connectionId":"string","phone":"string","templateId":"string","text":"string","ownNumberConfirmed":true,"optInConfirmed":true,"idempotencyKey":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
202 Default Response
Example
{
"jobId": "string",
"status": "queued",
"reason": "string"
}Schema
jobIdstringrequiredstatusstringrequiredreasonstringUpdated