HydraCore
API by router

Whatsapp templates

List Templates

GET
/v1/instances/{instance_id}/channels/whatsapp/templates

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

instance_id*Instance Id
Formatuuid

Query Parameters

status?string|null
category?string|null

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

application/json
  1. response
templates*array<>
total*Total
Example Request
curl -X GET 'https://example.com/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/channels/whatsapp/templates'
Example Response
{  "templates": [    {      "approved_at": "2019-08-24T14:15:22Z",      "body_text": "string",      "buttons": [        null      ],      "category": "string",      "channel_endpoint_id": "e494f620-7b8a-476d-9811-395c5fa96a10",      "created_at": "2019-08-24T14:15:22Z",      "footer_text": "string",      "header_text": "string",      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "language": "string",      "meta_template_id": "string",      "name": "string",      "rejection_reason": "string",      "sample_values": {},      "status": "string",      "submitted_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z"    }  ],  "total": 0}

Create Template

POST
/v1/instances/{instance_id}/channels/whatsapp/templates

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

instance_id*Instance Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Request Body

application/json
  1. body
body_text*Body Text

Template body with {{1}}, {{2}} placeholders

buttons?array<>|null
category*Category

One of: ('utility', 'marketing', 'authentication')

footer_text?|null
header_text?|null
language?Language
Lengthlength <= 10
Default"en_US"
name*Name

Template name (lowercase, underscores)

Lengthlength <= 512
sample_values?|

Sample values for placeholders during Meta review

Response Body

Successful Response

application/json
  1. response
approved_at?|null
body_text*Body Text
buttons?array<unknown>|null
category*Category
channel_endpoint_id*Channel Endpoint Id
Formatuuid
created_at*Created At
Formatdate-time
footer_text?string|null
header_text?string|null
id*Id
Formatuuid
language*Language
meta_template_id?string|null
name*Name
rejection_reason?string|null
sample_values?|null
status*Status
submitted_at?|null
updated_at*Updated At
Formatdate-time
Example Request
curl -X POST 'https://example.com/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/channels/whatsapp/templates' \  -H 'Content-Type: application/json' \  -d '{  "body_text": "string",  "category": "string",  "name": "string"}'
Example Response
{  "approved_at": "2019-08-24T14:15:22Z",  "body_text": "string",  "buttons": [    null  ],  "category": "string",  "channel_endpoint_id": "e494f620-7b8a-476d-9811-395c5fa96a10",  "created_at": "2019-08-24T14:15:22Z",  "footer_text": "string",  "header_text": "string",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "language": "string",  "meta_template_id": "string",  "name": "string",  "rejection_reason": "string",  "sample_values": {},  "status": "string",  "submitted_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}

Update Template

PATCH
/v1/instances/{instance_id}/channels/whatsapp/templates/{template_id}

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

instance_id*Instance Id
Formatuuid
template_id*Template Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Request Body

application/json
  1. body
body_text?string|null
buttons?array<>|null
footer_text?string|null
header_text?string|null
sample_values?|null

Response Body

Successful Response

application/json
  1. response
approved_at?|null
body_text*Body Text
buttons?array<unknown>|null
category*Category
channel_endpoint_id*Channel Endpoint Id
Formatuuid
created_at*Created At
Formatdate-time
footer_text?string|null
header_text?string|null
id*Id
Formatuuid
language*Language
meta_template_id?string|null
name*Name
rejection_reason?string|null
sample_values?|null
status*Status
submitted_at?|null
updated_at*Updated At
Formatdate-time
Example Request
curl -X PATCH 'https://example.com/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/channels/whatsapp/templates/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "approved_at": "2019-08-24T14:15:22Z",  "body_text": "string",  "buttons": [    null  ],  "category": "string",  "channel_endpoint_id": "e494f620-7b8a-476d-9811-395c5fa96a10",  "created_at": "2019-08-24T14:15:22Z",  "footer_text": "string",  "header_text": "string",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "language": "string",  "meta_template_id": "string",  "name": "string",  "rejection_reason": "string",  "sample_values": {},  "status": "string",  "submitted_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}

Delete Template

DELETE
/v1/instances/{instance_id}/channels/whatsapp/templates/{template_id}

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

instance_id*Instance Id
Formatuuid
template_id*Template Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

Example Request
curl -X DELETE 'https://example.com/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/channels/whatsapp/templates/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
Empty

Submit Template

POST
/v1/instances/{instance_id}/channels/whatsapp/templates/{template_id}/submit

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

instance_id*Instance Id
Formatuuid
template_id*Template Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

application/json
  1. response
approved_at?|null
body_text*Body Text
buttons?array<unknown>|null
category*Category
channel_endpoint_id*Channel Endpoint Id
Formatuuid
created_at*Created At
Formatdate-time
footer_text?string|null
header_text?string|null
id*Id
Formatuuid
language*Language
meta_template_id?string|null
name*Name
rejection_reason?string|null
sample_values?|null
status*Status
submitted_at?|null
updated_at*Updated At
Formatdate-time
Example Request
curl -X POST 'https://example.com/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/channels/whatsapp/templates/497f6eca-6276-4993-bfeb-53cbbbba6f08/submit'
Example Response
{  "approved_at": "2019-08-24T14:15:22Z",  "body_text": "string",  "buttons": [    null  ],  "category": "string",  "channel_endpoint_id": "e494f620-7b8a-476d-9811-395c5fa96a10",  "created_at": "2019-08-24T14:15:22Z",  "footer_text": "string",  "header_text": "string",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "language": "string",  "meta_template_id": "string",  "name": "string",  "rejection_reason": "string",  "sample_values": {},  "status": "string",  "submitted_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}