> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zavu.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Template Approval Process

> Understand how WhatsApp templates are reviewed and approved by Meta

All WhatsApp templates must be approved by Meta before they can be used to send messages. This guide explains the approval process, common rejection reasons, and how to track template status.

## Approval Workflow

```mermaid theme={null}
stateDiagram-v2
    [*] --> draft: Create template
    draft --> pending: Submit for approval
    pending --> approved: Meta approves
    pending --> rejected: Meta rejects
    rejected --> draft: Edit and fix
    approved --> [*]: Ready to use
```

## Submitting for Approval

### Via Dashboard

1. Go to **Senders** > Select sender > **Templates** tab
2. Find the template with "Draft" status
3. Click the **...** menu and select **Submit for Approval**
4. The status will change to "Pending"

### Via API

<CodeGroup>
  ```typescript TypeScript theme={null}
  // Submit a draft template for approval
  await zavu.templates.submit({
    templateId: 'tmpl_abc123',
  });
  ```

  ```python Python theme={null}
  # Submit a draft template for approval
  client.templates.submit(template_id="tmpl_abc123")
  ```

  ```ruby Ruby theme={null}
  # Submit a draft template for approval
  client.templates.submit(template_id: "tmpl_abc123")
  ```

  ```go Go theme={null}
  // Submit a draft template for approval
  _, err := client.Templates.Submit(context.TODO(), "tmpl_abc123", zavudev.TemplateSubmitParams{})
  ```

  ```php PHP theme={null}
  // Submit a draft template for approval
  $client->templates->submit('tmpl_abc123');
  ```

  ```bash cURL theme={null}
  curl -X POST https://api.zavu.dev/v1/templates/tmpl_abc123/submit \
    -H "Authorization: Bearer $ZAVU_API_KEY"
  ```
</CodeGroup>

## Template Status

| Status     | Description                     | Can Send? |
| ---------- | ------------------------------- | --------- |
| `draft`    | Not yet submitted to Meta       | No        |
| `pending`  | Submitted, awaiting Meta review | No        |
| `approved` | Approved by Meta                | Yes       |
| `rejected` | Rejected by Meta                | No        |

## Approval Timeline

* **Typical review time:** 24-48 hours
* **Complex templates:** Up to 72 hours
* **Peak periods:** May take longer during high volume

<Info>
  Meta reviews templates for compliance with their [Business Messaging Policy](https://www.whatsapp.com/legal/business-policy/). Ensure your templates follow these guidelines before submitting.
</Info>

## Tracking Status Changes

### Webhooks

Configure webhooks to receive real-time notifications when template status changes:

```json theme={null}
{
  "id": "evt_1702000000000_abc123",
  "type": "template.status_changed",
  "timestamp": 1702000000000,
  "senderId": "sender_xyz",
  "projectId": "proj_abc",
  "data": {
    "templateId": "tmpl_123",
    "name": "order_confirmation",
    "previousStatus": "pending",
    "currentStatus": "approved",
    "rejectionReason": null
  }
}
```

**Enable the webhook event:**

1. Go to **Senders** > Select sender > **Webhooks** tab
2. Add `template.status_changed` to your webhook events

### Polling

Check template status via API:

```typescript theme={null}
const template = await zavu.templates.get({
  templateId: 'tmpl_abc123'
});

console.log('Status:', template.whatsappStatus);
if (template.rejectionReason) {
  console.log('Rejection reason:', template.rejectionReason);
}
```

## Common Rejection Reasons

### Content Policy Violations

<Warning>
  Templates that violate Meta's policies will be rejected. Common violations include:

  * Misleading content
  * Prohibited products/services
  * Spammy language
  * Missing opt-out information for marketing
</Warning>

### Formatting Issues

| Issue                       | Solution                                |
| --------------------------- | --------------------------------------- |
| Invalid variable format     | Use `{{1}}`, `{{2}}` format             |
| Too many variables          | Limit to 10 variables per component     |
| Variable in wrong position  | Variables can't be at start of template |
| Button URL without variable | Dynamic URLs must include variables     |

### Category Mismatch

Templates may be rejected if the category doesn't match the content:

* **UTILITY** templates shouldn't contain promotional content
* **MARKETING** templates need clear opt-out language
* **AUTHENTICATION** templates should only contain OTP/verification content

### Language Issues

* Template body must match the declared language
* Special characters may cause issues in some languages
* Emojis should be used sparingly

## Fixing Rejected Templates

When a template is rejected:

1. **Check the rejection reason** in the dashboard or API response
2. **Edit the template** to fix the issues
3. **Resubmit** for approval

```typescript theme={null}
// Update a rejected template
await zavu.templates.update({
  templateId: 'tmpl_abc123',
  body: 'Updated message content that addresses the rejection reason'
});

// Resubmit for approval
await zavu.templates.submit({
  templateId: 'tmpl_abc123',
});
```

<Note>
  Editing an approved template will reset its status to "draft" and require re-approval.
</Note>

## Best Practices for Approval

<CardGroup cols={2}>
  <Card title="Be Clear and Specific" icon="bullseye">
    Vague templates are more likely to be rejected. Be specific about the purpose.
  </Card>

  <Card title="Match Category to Content" icon="tags">
    Ensure your template category accurately reflects the message type.
  </Card>

  <Card title="Avoid Promotional Language in UTILITY" icon="ban">
    UTILITY templates should be purely transactional without marketing content.
  </Card>

  <Card title="Include Opt-Out for MARKETING" icon="door-open">
    Marketing templates should include clear unsubscribe instructions.
  </Card>
</CardGroup>

## Template Examples

### Good UTILITY Template

```
Hi {{1}}, your order #{{2}} has shipped!

Tracking number: {{3}}
Estimated delivery: {{4}}

Track your package: https://example.com/track/{{2}}
```

### Good MARKETING Template

```
Hi {{1}}!

We have a special offer just for you: {{2}}% off your next purchase!

Use code: {{3}}
Valid until: {{4}}

Reply STOP to unsubscribe.
```

### Good AUTHENTICATION Template

```
Your verification code is {{1}}.

This code expires in 10 minutes. Do not share this code with anyone.
```

## Rate Limits

| Action             | Limit      |
| ------------------ | ---------- |
| Submit templates   | 100/minute |
| Templates per WABA | 250 total  |

## Next Steps

<CardGroup cols={2}>
  <Card title="Send Template Messages" icon="paper-plane" href="/guides/whatsapp/templates/sending">
    Learn how to send messages using approved templates
  </Card>

  <Card title="Configure Webhooks" icon="webhook" href="/guides/receiving-messages/webhooks">
    Set up webhooks to receive template status updates
  </Card>
</CardGroup>
