MetaTemplate
Stored in the metatemplates collection. createdAt and updatedAt are maintained automatically.
Returned by GET /template/whatsapp, GET /template/whatsapp/:id, POST /template/whatsapp/generate-ai.
| Field | Type | Notes |
|---|---|---|
app | ObjectId -> MetaApp | required |
name | string | required |
category | string | default UTILITY · one of UTILITY, MARKETING, AUTHENTICATION |
appCategory | string | |
language | string | required |
headerType | string | default None · one of None, Text, Image, Video, Document |
headerText | string | |
headerFile | ObjectId | |
bodyText | string | |
frontendBodyText | string | |
footerText | string | |
variables | object[] | default [] |
variables.name | string | required |
variables.example | string | required |
variables.required | boolean | default false |
variables.dateType | string | one of dd/mm/yyyy hh:mm a, dd/mm/yyyy |
frontendVariables | object[] | default [] |
frontendVariables.name | string | required |
frontendVariables.example | string | required |
frontendVariables.required | boolean | default false |
frontendVariables.dateType | string | one of dd/mm/yyyy hh:mm a, dd/mm/yyyy |
buttons | object[] | default [] |
buttons.type | string | required · one of Reply, Copy, Phone, URL |
buttons.text | string | |
buttons.code | string | |
buttons.number | string | |
buttons.url | string | |
buttons.example | string | |
buttons.isURLDynamic | boolean | |
expiry | number | |
ttl | number | |
addSecurity | boolean | |
copyCodeText | string | |
status | string | default PENDING · one of PENDING, APPROVED, REJECTED, PAUSED |
reason | string | |
tid | string | required |
lastSyncedAt | date | |
companyID | ObjectId | |
_id | ObjectId | default "6a95712f932657988a91c069" |
createdAt | date | set once |
updatedAt | date |