API reference
Templates
Read approved WhatsApp message templates.
x-tenant-id and an API key or OAuth token. Channel IDs are copied from Settings → Developer in the app. See Authentication.List templates
/api/public/v1/templatesReturns a paginated, filterable, sortable list of WhatsApp templates for the authenticated tenant. DRAFT templates are never returned.
Query parameters
pageintegerDefault
1limitintegerDefault
25sortstringnamestatuscategorylanguagelastSyncedAtupdatedAtcreatedAtDefault
"updatedAt"orderstringascdescDefault
"desc"categorystringMARKETINGUTILITYAUTHENTICATIONlanguagestringLanguage code, e.g. "en" or "en_US".
statusstringApproval status (DRAFT is never exposed).
APPROVEDPENDINGREJECTEDPAUSEDDISABLEDIN_APPEALDELETEDsearchstringCase-insensitive template name search.
channelIdstringChannel id from Settings → Developer → Channels, to narrow by channel.
createdAfterstring (date-time)createdBeforestring (date-time)updatedAfterstring (date-time)updatedBeforestring (date-time)fieldsstring
Response 200Paginated list of templates
successbooleandataobject[]16 child fields
idstringnamestringcategorystring | nullOne of
MARKETINGUTILITYAUTHENTICATIONnulllanguagestring | nullstatusstring | nullOne of
APPROVEDPENDINGREJECTEDPAUSEDDISABLEDIN_APPEALDELETEDnulltemplateTypestring | nullparameterFormatstring | nullheaderTypestring | nullhasButtonsbooleancomponentsobject | null5 child fields
headerobject | null4 child fields
formatstring | nulltextstring | nullfilenamestring | nullmimeTypestring | null
bodyobject | null1 child field
textstring | null
footerobject | null1 child field
textstring | null
buttonsobject[] | null4 child fields
typestring | nulltextstring | nullurlstring | nullphoneNumberstring | null
carouselobject | null
examplesobject | array | nullvariablesobject | nullqualityScoreobject | null2 child fields
scorestring | number | nulldatestring (date-time) | null
rejectionReasonstring | nullcreatedAtstring (date-time) | nullupdatedAtstring (date-time) | null
paginationobject8 child fields
pageintegerlimitintegertotalintegertotalPagesintegerhasNextPagebooleanhasPrevPagebooleannextCursorstring | nullprevCursorstring | null
metaobject1 child field
apiVersionstring
requestIdstring | nulltimestampstring (date-time)
Errors
400Malformed request or missing tenant context401Missing or invalid API key403Forbidden - developer platform disabled, key expired/disabled, or tenant mismatch422Validation failed (invalid filters, sort, status, language, or date range)429Too many requests - rate limit exceeded500Unexpected server error
curl -X GET "https://api.inaiy.com/api/public/v1/templates" \
-H "x-tenant-id: demo" \
-H "x-api-key: wp_live_xxxxxxxxxxxxxxxxxxxx"{
"success": true,
"data": [
{
"id": "6650a1b2c3d4e5f6a7b8c9d0",
"name": "order_update",
"category": "UTILITY",
"language": "en_US",
"status": "APPROVED",
"templateType": "STANDARD",
"parameterFormat": "POSITIONAL",
"headerType": "TEXT",
"hasButtons": true,
"components": {
"header": {
"format": "TEXT",
"text": "Order {{1}} update",
"filename": null,
"mimeType": null
},
"body": {
"text": "Hi {{1}}, your order is {{2}}."
},
"footer": {
"text": "Reply STOP to unsubscribe"
},
"buttons": [
{
"type": "URL",
"text": "Track order",
"url": "https://example.com/track/{{1}}",
"phoneNumber": null
}
],
"carousel": null
},
"examples": null,
"variables": {
"parameterFormat": "POSITIONAL",
"body": [
"1",
"2"
],
"header": {
"type": "text",
"keys": [
"1"
]
},
"buttons": [
{
"index": 0,
"type": "URL",
"keys": [
"1"
]
}
]
},
"qualityScore": {
"score": "GREEN",
"date": "2026-07-10T09:30:00.000Z"
},
"rejectionReason": null,
"createdAt": "2026-07-01T09:30:00.000Z",
"updatedAt": "2026-07-10T09:31:00.000Z"
}
],
"pagination": {
"page": 1,
"limit": 25,
"total": 42,
"totalPages": 2,
"hasNextPage": true,
"hasPrevPage": false,
"nextCursor": null,
"prevCursor": null
},
"meta": {
"apiVersion": "v1",
"sort": {
"field": "createdAt",
"order": "desc"
}
},
"requestId": "a1f4c2e0-9b6d-4a1e-8c3f-2d7e5b9a0c11",
"timestamp": "2026-07-12T09:30:00.000Z"
}Get template(s) by id or name
/api/public/v1/templates/{idOrName}When the path value is a 24-char ObjectId, returns the single matching template (a local DRAFT is treated as 404). Otherwise the value is treated as an exact template name and a LIST of all matching templates (all languages, or narrowed by ?language=) is returned.
Path parameters
idOrNamestringrequiredEither a 24-char template ObjectId (returns a single template) or a template name (returns a list of all matching templates across languages).
Query parameters
languagestringNarrow by language when looking up by name (ignored for id lookups).
pageintegerDefault
1limitintegerDefault
25fieldsstring
Response 200A single template (id lookup) or a list of templates (name lookup)
successbooleandataobject16 child fields
idstringnamestringcategorystring | nullOne of
MARKETINGUTILITYAUTHENTICATIONnulllanguagestring | nullstatusstring | nullOne of
APPROVEDPENDINGREJECTEDPAUSEDDISABLEDIN_APPEALDELETEDnulltemplateTypestring | nullparameterFormatstring | nullheaderTypestring | nullhasButtonsbooleancomponentsobject | null5 child fields
headerobject | null4 child fields
formatstring | nulltextstring | nullfilenamestring | nullmimeTypestring | null
bodyobject | null1 child field
textstring | null
footerobject | null1 child field
textstring | null
buttonsobject[] | null4 child fields
typestring | nulltextstring | nullurlstring | nullphoneNumberstring | null
carouselobject | null
examplesobject | array | nullvariablesobject | nullqualityScoreobject | null2 child fields
scorestring | number | nulldatestring (date-time) | null
rejectionReasonstring | nullcreatedAtstring (date-time) | nullupdatedAtstring (date-time) | null
metaobject1 child field
apiVersionstring
requestIdstring | nulltimestampstring (date-time)
Errors
400Malformed request or missing tenant context401Missing or invalid API key403Forbidden - developer platform disabled, key expired/disabled, or tenant mismatch404Template not found422Validation failed (invalid filters, sort, status, language, or date range)429Too many requests - rate limit exceeded500Unexpected server error
curl -X GET "https://api.inaiy.com/api/public/v1/templates/6650a1b2c3d4e5f6a7b8c9d0" \
-H "x-tenant-id: demo" \
-H "x-api-key: wp_live_xxxxxxxxxxxxxxxxxxxx"{
"success": true,
"data": {
"id": "6650a1b2c3d4e5f6a7b8c9d0",
"name": "order_update",
"category": "UTILITY",
"language": "en_US",
"status": "APPROVED",
"templateType": "STANDARD",
"parameterFormat": "POSITIONAL",
"headerType": "TEXT",
"hasButtons": true,
"components": {
"header": {
"format": "TEXT",
"text": "Order {{1}} update",
"filename": null,
"mimeType": null
},
"body": {
"text": "Hi {{1}}, your order is {{2}}."
},
"footer": {
"text": "Reply STOP to unsubscribe"
},
"buttons": [
{
"type": "URL",
"text": "Track order",
"url": "https://example.com/track/{{1}}",
"phoneNumber": null
}
],
"carousel": null
},
"examples": null,
"variables": {
"parameterFormat": "POSITIONAL",
"body": [
"1",
"2"
],
"header": {
"type": "text",
"keys": [
"1"
]
},
"buttons": [
{
"index": 0,
"type": "URL",
"keys": [
"1"
]
}
]
},
"qualityScore": {
"score": "GREEN",
"date": "2026-07-10T09:30:00.000Z"
},
"rejectionReason": null,
"createdAt": "2026-07-01T09:30:00.000Z",
"updatedAt": "2026-07-10T09:31:00.000Z"
},
"meta": {
"apiVersion": "v1"
},
"requestId": "a1f4c2e0-9b6d-4a1e-8c3f-2d7e5b9a0c11",
"timestamp": "2026-07-12T09:30:00.000Z"
}