Integration API
Base URL: heyhomie.me/api/integration/v1
Authentication
All endpoints require API key authentication via the X-API-Key header.
Header Example
X-API-Key: your_api_keyNote: API keys are store-specific and must be generated through the HeyHomie dashboard. The store must be on a premium plan and connected to WhatsApp API.
Endpoints
GET
/templatesRetrieve a list of WhatsApp templates for your store.
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| limit | string | No | 50 | Maximum number of templates to return |
| complete | string | No | false | If true, returns full template details including components |
Request Example
curl --location 'https://heyhomie.me/api/integration/v1/templates?limit=50&complete=false' \
--header 'X-API-Key: your_api_key' \
--header 'Accept: application/json'Response Example
complete=false
{
"data": [
{
"id": "1234567890123456",
"name": "sample_shipping_confirmation",
"category": "UTILITY",
"language": "en",
"status": "APPROVED",
"isCarousel": false
}
],
"paging": {
"cursors": { "before": null, "after": "cursor_token" }
},
"total": 25
}GET
/templates/:idRetrieve detailed information about a specific template.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Template ID |
Request Example
curl --location 'https://heyhomie.me/api/integration/v1/templates/1234567890123456' \
--header 'X-API-Key: your_api_key' \
--header 'Accept: application/json'Response Example
{
"id": "1234567890123456",
"name": "sample_shipping_confirmation",
"category": "UTILITY",
"language": "en",
"status": "APPROVED",
"components": [
{
"type": "HEADER",
"format": "TEXT",
"text": "Order Confirmation"
},
{
"type": "BODY",
"text": "Your order #{{1}} will be delivered in {{2}} days.",
"example": {
"body_text": [["ORD123", "6-7"]]
}
}
]
}POST
/send-messageSend a WhatsApp message.
Request Body Schema
| Field | Type | Required | Description |
|---|---|---|---|
| to | string | Yes | Recipient phone number with country code |
| type | string | Yes | Must be "template" |
| templateId | string | Yes | Template ID |
| template | object | Yes | Template object with name, language, components |
Request Example
curl --location 'https://heyhomie.me/api/integration/v1/send-message' \
--header 'X-API-Key: your_api_key' \
--header 'Content-Type: application/json' \
--data '{
"to": "919649409088",
"type": "template",
"templateId": "1234567890123456",
"template": {
"name": "sample_shipping_confirmation",
"language": {
"code": "en",
"policy": "deterministic"
},
"components": [
{
"type": "BODY",
"parameters": [
{ "type": "text", "text": "ORD123" },
{ "type": "text", "text": "6-7" }
]
}
]
}
}'Response Example
{
"messaging_product": "whatsapp",
"contacts": [{ "input": "919649409088", "wa_id": "919649409088" }],
"messages": [{ "id": "wamid.HBgMOTE5NjQ5NDA5MDg4FQIAERgSRjMyRjVCNzE5QjE2RkYwOUI2AA==" }]
}Error Codes
| Status Code | Description |
|---|---|
| 400 | Invalid request body or template parameters |
| 401 | Invalid or missing API key, or store not on premium plan |
| 404 | Template not found |
| 429 | Too many requests (Rate limit exceeded) |
| 500 | Internal server error |
