HydraCore
API by router

Whatsapp templates

List Templates

GET
/v1/instances/{instance_id}/channels/whatsapp/templates
AuthorizationBearer <token>

In: header

Path Parameters

instance_idInstance Id
Formatuuid

Query Parameters

status?Status
category?Category

Header Parameters

X-Api-Key?X-Api-Key

Response Body

curl -X GET "https://loading/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/channels/whatsapp/templates?status=string&category=string" \  -H "X-Api-Key: string"
{
  "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
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Create Template

POST
/v1/instances/{instance_id}/channels/whatsapp/templates
AuthorizationBearer <token>

In: header

Path Parameters

instance_idInstance Id
Formatuuid

Header Parameters

X-Api-Key?X-Api-Key
body_textBody Text

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

buttons?Buttons
categoryCategory

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

footer_text?Footer Text
header_text?Header Text
language?Language
Default"en_US"
Lengthlength <= 10
nameName

Template name (lowercase, underscores)

Lengthlength <= 512
sample_values?Sample Values

Sample values for placeholders during Meta review

Response Body

curl -X POST "https://loading/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/channels/whatsapp/templates" \  -H "X-Api-Key: string" \  -H "Content-Type: application/json" \  -d '{    "body_text": "string",    "category": "string",    "name": "string"  }'
{
  "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"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Update Template

PATCH
/v1/instances/{instance_id}/channels/whatsapp/templates/{template_id}
AuthorizationBearer <token>

In: header

Path Parameters

instance_idInstance Id
Formatuuid
template_idTemplate Id
Formatuuid

Header Parameters

X-Api-Key?X-Api-Key
body_text?Body Text
buttons?Buttons
footer_text?Footer Text
header_text?Header Text
sample_values?Sample Values

Response Body

curl -X PATCH "https://loading/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/channels/whatsapp/templates/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "X-Api-Key: string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "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"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Delete Template

DELETE
/v1/instances/{instance_id}/channels/whatsapp/templates/{template_id}
AuthorizationBearer <token>

In: header

Path Parameters

instance_idInstance Id
Formatuuid
template_idTemplate Id
Formatuuid

Header Parameters

X-Api-Key?X-Api-Key

Response Body

curl -X DELETE "https://loading/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/channels/whatsapp/templates/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "X-Api-Key: string"
Empty
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Submit Template

Submit a draft template to Meta for approval.

Calls the Meta Graph API to create the template. Meta reviews asynchronously — webhook callback updates status to approved/rejected.

POST
/v1/instances/{instance_id}/channels/whatsapp/templates/{template_id}/submit
AuthorizationBearer <token>

In: header

Path Parameters

instance_idInstance Id
Formatuuid
template_idTemplate Id
Formatuuid

Header Parameters

X-Api-Key?X-Api-Key

Response Body

curl -X POST "https://loading/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/channels/whatsapp/templates/497f6eca-6276-4993-bfeb-53cbbbba6f08/submit" \  -H "X-Api-Key: string"
{
  "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"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}