# CRM - Message Templates

Part of AppEngine API Documentation. Full index: https://appengine.appmint.io/documentation.md
## POST /crm/message-template/whatsapp/submit/{templateId}

**Submit a template for WhatsApp approval**

`operationId: MessageTemplateWhatsAppController_submit`

Builds Twilio Content from the template (body with {{1}} variables, data.whatsapp header/footer/buttons) and asks WhatsApp to approve it. Saves data.whatsapp.contentSid and approval {status: pending}. A changed template gets new Content and goes back to pending; an unchanged pending/approved one is left as is. Optional body `samples` = {"1": "Ada"} gives Meta sample values. Returns the data.whatsapp block.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `orgid` | header | string | yes | Organization ID |
| `templateId` | path | string | yes | message_template sk |

### Responses

| Status | Meaning |
| --- | --- |
| `201` |  |

## GET /crm/message-template/whatsapp/status/{templateId}

**WhatsApp approval status of a template**

`operationId: MessageTemplateWhatsAppController_status`

Asks Twilio, saves and returns data.whatsapp.approval {status draft|pending|approved|rejected, reason, updatedAt}.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `orgid` | header | string | yes | Organization ID |
| `templateId` | path | string | yes | message_template sk |

### Responses

| Status | Meaning |
| --- | --- |
| `200` |  |

