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>
GEThttps://hermeticor.com/v1/whatsapp/window/{id}

Is the 24-hour session window open for this contact (can free text be sent)?

Parameters

idstringpathrequired

Code samples

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

Responses

200 Default Response
Example
{
  "open": true,
  "closesAt": "2024-01-01T00:00:00Z"
}
Schema
openbooleanrequired
closesAtstringrequired
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/whatsapp/window/{id}

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

Send one WhatsApp message: an approved template, or free text inside the 24-hour window. Consent, suppression and the window are enforced; needs an idempotencyKey (body) or Idempotency-Key header

Request body

application/json
profileIdstringrequired
connectionIdstring
templateIdstring
textstring
idempotencyKeystring
{
  "profileId": "string",
  "connectionId": "string",
  "templateId": "string",
  "text": "string",
  "idempotencyKey": "string"
}

Code samples

cURL
curl -X POST "https://hermeticor.com/v1/whatsapp/send" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"profileId":"string","connectionId":"string","templateId":"string","text":"string","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 · GET /v1/whatsapp/window/{id}

5XX Default Response

Same as 4XX · GET /v1/whatsapp/window/{id}

GEThttps://hermeticor.com/v1/whatsapp/connections/{connectionId}/account

Business and phone-number status, messaging-limit tier and the raw quality rating, read live from Meta

Parameters

connectionIdstringpathrequired

Code samples

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

Responses

200 Default Response
Example
{
  "displayPhoneNumber": "string",
  "verifiedName": "string",
  "qualityRating": "string",
  "messagingLimitTier": "string",
  "phoneStatus": "string",
  "nameStatus": "string",
  "accountReviewStatus": "string",
  "businessVerificationStatus": "string"
}
Schema
displayPhoneNumberstringrequired
verifiedNamestringrequired
qualityRatingstringrequired
messagingLimitTierstringrequired
phoneStatusstringrequired
nameStatusstringrequired
accountReviewStatusstringrequired
businessVerificationStatusstringrequired
4XX Default Response

Same as 4XX · GET /v1/whatsapp/window/{id}

5XX Default Response

Same as 4XX · GET /v1/whatsapp/window/{id}

GEThttps://hermeticor.com/v1/whatsapp/flows

WhatsApp Flows

Parameters

limitintegerquery
Page size; omitted returns the whole list
cursorstringquery
Opaque: the nextCursor of the previous page

Code samples

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

Responses

200 Default Response
Example
{
  "items": [
    {
      "connectionId": "string",
      "name": "string",
      "categories": [
        "OTHER"
      ],
      "flowJson": {},
      "firstScreen": "string",
      "cta": "string",
      "body": "string",
      "header": "string",
      "templateName": "string",
      "templateLanguage": "string",
      "id": "string",
      "externalId": "string",
      "status": "draft",
      "validationErrors": [
        "string"
      ],
      "lastError": "string",
      "createdAt": "string"
    }
  ],
  "nextCursor": "string"
}
Schema
itemsItemsItem136[]required
Show child parameters
connectionIdstringrequired
namestringrequired
categoriesstring[]required
= ["OTHER"]
flowJsonobjectrequired
firstScreenstringrequired
ctastringrequired
bodystringrequired
headerstringrequired
templateNamestringrequired
templateLanguagestringrequired
idstringrequired
externalIdstringrequired
statusstringrequired
draft | published | deprecated | error
validationErrorsstring[]required
lastErrorstringrequired
createdAtstringrequired
nextCursorstringrequired
4XX Default Response

Same as 4XX · GET /v1/whatsapp/window/{id}

5XX Default Response

Same as 4XX · GET /v1/whatsapp/window/{id}

POSThttps://hermeticor.com/v1/whatsapp/flows

Create a Flow (draft) from its Flow JSON

Request body

application/json
connectionIdstringrequired
namestringrequired
categoriesstring[]
= ["OTHER"]
flowJsonobjectrequired
firstScreenstringrequired
ctastringrequired
bodystringrequired
headerstring
templateNamestring
templateLanguagestring
{
  "connectionId": "string",
  "name": "string",
  "categories": [
    "OTHER"
  ],
  "flowJson": {},
  "firstScreen": "string",
  "cta": "string",
  "body": "string",
  "header": "string",
  "templateName": "string",
  "templateLanguage": "string"
}

Code samples

cURL
curl -X POST "https://hermeticor.com/v1/whatsapp/flows" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"connectionId":"string","name":"string","categories":["OTHER"],"flowJson":{},"firstScreen":"string","cta":"string","body":"string","header":"string","templateName":"string","templateLanguage":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201 Default Response
Example
{
  "connectionId": "string",
  "name": "string",
  "categories": [
    "OTHER"
  ],
  "flowJson": {},
  "firstScreen": "string",
  "cta": "string",
  "body": "string",
  "header": "string",
  "templateName": "string",
  "templateLanguage": "string",
  "id": "string",
  "externalId": "string",
  "status": "draft",
  "validationErrors": [
    "string"
  ],
  "lastError": "string",
  "createdAt": "string"
}
Schema
connectionIdstringrequired
namestringrequired
categoriesstring[]required
= ["OTHER"]
flowJsonobjectrequired
firstScreenstringrequired
ctastringrequired
bodystringrequired
headerstringrequired
templateNamestringrequired
templateLanguagestringrequired
idstringrequired
externalIdstringrequired
statusstringrequired
draft | published | deprecated | error
validationErrorsstring[]required
lastErrorstringrequired
createdAtstringrequired
4XX Default Response

Same as 4XX · GET /v1/whatsapp/window/{id}

5XX Default Response

Same as 4XX · GET /v1/whatsapp/window/{id}

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

One Flow

Parameters

idstringpathrequired

Code samples

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

Responses

200 Default Response

Same as 201 · POST /v1/whatsapp/flows

4XX Default Response

Same as 4XX · GET /v1/whatsapp/window/{id}

5XX Default Response

Same as 4XX · GET /v1/whatsapp/window/{id}

PATCHhttps://hermeticor.com/v1/whatsapp/flows/{id}

Edit a Flow (its JSON only before publishing)

Parameters

idstringpathrequired

Request body

application/json
connectionIdstring
namestring
categoriesstring[]
flowJsonobject
firstScreenstring
ctastring
bodystring
headerstring
templateNamestring
templateLanguagestring
{
  "connectionId": "string",
  "name": "string",
  "categories": [
    "SIGN_UP"
  ],
  "flowJson": {},
  "firstScreen": "string",
  "cta": "string",
  "body": "string",
  "header": "string",
  "templateName": "string",
  "templateLanguage": "string"
}

Code samples

cURL
curl -X PATCH "https://hermeticor.com/v1/whatsapp/flows/{id}" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"connectionId":"string","name":"string","categories":["SIGN_UP"],"flowJson":{},"firstScreen":"string","cta":"string","body":"string","header":"string","templateName":"string","templateLanguage":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response

Same as 201 · POST /v1/whatsapp/flows

4XX Default Response

Same as 4XX · GET /v1/whatsapp/window/{id}

5XX Default Response

Same as 4XX · GET /v1/whatsapp/window/{id}

POSThttps://hermeticor.com/v1/whatsapp/flows/{id}/publish

Upload the Flow JSON to Meta and publish it (validation errors are returned on the flow)

Parameters

idstringpathrequired

Code samples

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

Responses

200 Default Response

Same as 201 · POST /v1/whatsapp/flows

4XX Default Response

Same as 4XX · GET /v1/whatsapp/window/{id}

5XX Default Response

Same as 4XX · GET /v1/whatsapp/window/{id}

POSThttps://hermeticor.com/v1/whatsapp/flows/{id}/deprecate

Deprecate a published Flow at Meta (it can no longer be sent)

Parameters

idstringpathrequired

Code samples

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

Responses

200 Default Response

Same as 201 · POST /v1/whatsapp/flows

4XX Default Response

Same as 4XX · GET /v1/whatsapp/window/{id}

5XX Default Response

Same as 4XX · GET /v1/whatsapp/window/{id}

Updated