whatsapp

Embed
Preview of the card
<a href="https://hermeticor.com/docs/ref-whatsapp"><img src="https://hermeticor.com/docs/_api/public/orgs/5fcd8b3c-a27c-4688-972f-de710125592f/spaces/caf5dc05-15f7-4e0c-bdb8-ab29ede6211e/pages/434c5d81-ce24-486b-89b5-b60c6bdc2596/social-card.svg?v=3e7ae33eec8b" alt="whatsapp" width="600" height="315"></a>
POSThttps://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
connectionIdstringrequired
namestringrequired
languagestringrequired
categorystringrequired
marketing | utility | authentication
bodystringrequired
variablesstring[]
= []
providerTemplateIdstring
submitboolean
= false
headerobject
Show child parameters
formatstringrequired
text | image | video | document
textstring
urlstring
handlestring
footerstring
buttonsButtonsItem2[]
= []
{
  "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
idstringrequired
connectionIdstringrequired
contentTemplateIdstringrequired
namestringrequired
languagestringrequired
categorystringrequired
marketing | utility | authentication
bodystringrequired
variablesstring[]required
statusstringrequired
draft | pending | approved | rejected | paused | disabled
providerTemplateIdstringrequired
headerobjectrequired
Show child parameters
formatstringrequired
text | image | video | document
textstring
urlstring
handlestring
footerstringrequired
buttonsButtonsItem[]required
rejectionReasonstringrequired
lastSyncedAtstringrequired
createdAtstringrequired
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/whatsapp/templates

GEThttps://hermeticor.com/v1/whatsapp/templates/{id}

One registered template with its approval status (refresh=true pulls the latest status from the provider first)

Parameters

refreshstringquery
true | false
idstringpathrequired

Code 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

200 Default Response

Same as 201 · POST /v1/whatsapp/templates

4XX Default Response

Same as 4XX · POST /v1/whatsapp/templates

5XX Default Response

Same as 4XX · POST /v1/whatsapp/templates

DELETEhttps://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

localOnlystringquery
true | false = false
idstringpathrequired

Code 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
okbooleanrequired
true
4XX Default Response

Same as 4XX · POST /v1/whatsapp/templates

5XX Default Response

Same as 4XX · POST /v1/whatsapp/templates

PATCHhttps://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

idstringpathrequired

Request body

application/json
bodystring
variablesstring[]
categorystring
marketing | utility | authentication
languagestring
headerobject
Show child parameters
formatstringrequired
text | image | video | document
textstring
urlstring
handlestring
footerstring
buttonsButtonsItem2[]
{
  "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

200 Default Response

Same as 201 · POST /v1/whatsapp/templates

4XX Default Response

Same as 4XX · POST /v1/whatsapp/templates

5XX Default Response

Same as 4XX · POST /v1/whatsapp/templates

POSThttps://hermeticor.com/v1/whatsapp/templates/{id}/submit

Send a draft or rejected template to the provider for approval

Parameters

idstringpathrequired

Code 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

200 Default Response

Same as 201 · POST /v1/whatsapp/templates

4XX Default Response

Same as 4XX · POST /v1/whatsapp/templates

5XX Default Response

Same as 4XX · POST /v1/whatsapp/templates

POSThttps://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
updatedintegerrequired
importedintegerrequired
4XX Default Response

Same as 4XX · POST /v1/whatsapp/templates

5XX Default Response

Same as 4XX · POST /v1/whatsapp/templates

GEThttps://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

fromstringquery
tostringquery

Code 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[]required
Show child parameters
acceptedintegerrequired
deliveredintegerrequired
failedintegerrequired
blockedintegerrequired
repliesintegerrequired
daystringrequired
totalsobjectrequired
Show child parameters
acceptedintegerrequired
deliveredintegerrequired
failedintegerrequired
blockedintegerrequired
repliesintegerrequired
blockReasonsBlockReasonsItem[]required
Show child parameters
reasonstringrequired
countintegerrequired
4XX Default Response

Same as 4XX · POST /v1/whatsapp/templates

5XX Default Response

Same as 4XX · POST /v1/whatsapp/templates

POSThttps://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
connectionIdstringrequired
phonestringrequired
templateIdstring
textstring
ownNumberConfirmedbooleanrequired
true
optInConfirmedbooleanrequired
true
idempotencyKeystring
{
  "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
jobIdstringrequired
statusstringrequired
queued | blocked | deferred | duplicate
reasonstring
4XX Default Response

Same as 4XX · POST /v1/whatsapp/templates

5XX Default Response

Same as 4XX · POST /v1/whatsapp/templates

Updated