---
title: "Render + validate"
method: POST
path: "/templates/{id}/render"
tags: ["Templates"]
---

# Render + validate

`POST /templates/{id}/render`

## Request

- Base URL: `https://rcs-templates-api-dot-msg2ai-server.ue.r.appspot.com/api/agent`
- URL: `https://rcs-templates-api-dot-msg2ai-server.ue.r.appspot.com/api/agent/templates/{id}/render`
- Auth: HTTP bearer

Try before you send: render with sample variables and inspect the validated rich payload plus the mandatory SMS fallback.

## Path parameters

- `id` string, required

## Request body

- object
  - `variables` object: Merge fields ({{key}} -> value) to bind into the preview.

## Response `200`

Success.

- object

## Other responses

- `400`: Arguments failed validation.
- `401`: Missing or invalid agent key.
- `403`: Key does not hold the templates:read scope.
- `429`: Rate limited.

---

[API](https://skmtc.dev/wa-campaigns/apis/whatsapp-campaigns-agent-gateway.md) · [All operations](https://skmtc.dev/wa-campaigns/apis/whatsapp-campaigns-agent-gateway/llms.txt) · [OpenAPI document](https://skmtc.dev/wa-campaigns/apis/whatsapp-campaigns-agent-gateway/revisions/24503d56cc7b?raw)
