---
title: "Templates · REST reference"
description: "The Templates routes. Every body is JSON, and an error always comes back as an object with a code and a message."
lang: "en-US"
canonical: "https://zaiped.com/en/developers/docs/reference/templates"
alternate: "https://zaiped.com/developers/docs/reference/templates"
---

# Templates · REST reference

## GET /v1/templates

List message templates

Local drafts and the mirror of the WABA's templates, with the status Meta gave each one.

**Response (object[])**

- `id` · string (Required): Zaiped id (templates)
- `name` · string (Required)
- `language` · string (Required)
- `category` · string (Required)
- `status` · string
- `metaTemplateId` · string
- `components` · any[] (Required)
- `parameterFormat` · string
- `ttlSeconds` · number
- `variables` · string[] (Required)
- `body` · string (Required)
- `rejectedReason` · string
- `qualityScore` · string

```
curl -X GET "https://zaiped.com/v1/templates" \
  -H "Authorization: Bearer zp_..."
```

## POST /v1/templates

Create a template

Creates the template with Meta's `components` format and, by default, submits it for review right away. Header media is added in the console.

**Request body**

- `name` · string (Required)
- `language` · string (Required)
- `category` · "UTILITY" | "MARKETING" | "AUTHENTICATION" (Required)
- `components` · any[] (Required)
- `ttlSeconds` · number
- `submit` · boolean

**Response (object)**

- `id` · string (Required): Zaiped id (templates)
- `name` · string (Required)
- `language` · string (Required)
- `category` · string (Required)
- `status` · string
- `metaTemplateId` · string
- `components` · any[] (Required)
- `parameterFormat` · string
- `ttlSeconds` · number
- `variables` · string[] (Required)
- `body` · string (Required)
- `rejectedReason` · string
- `qualityScore` · string

```
curl -X POST "https://zaiped.com/v1/templates" \
  -H "Authorization: Bearer zp_..." \
  -H "Content-Type: application/json" \
  -d '{
  "name": "…",
  "language": "…",
  "category": "UTILITY",
  "components": []
}'
```

## GET /v1/templates/{templateId}

Get a template

**Path parameters**

- `templateId` · string (Required): The template id, as returned by list_templates.

**Response (object)**

- `id` · string (Required): Zaiped id (templates)
- `name` · string (Required)
- `language` · string (Required)
- `category` · string (Required)
- `status` · string
- `metaTemplateId` · string
- `components` · any[] (Required)
- `parameterFormat` · string
- `ttlSeconds` · number
- `variables` · string[] (Required)
- `body` · string (Required)
- `rejectedReason` · string
- `qualityScore` · string

```
curl -X GET "https://zaiped.com/v1/templates/YOUR_TEMPLATE_ID" \
  -H "Authorization: Bearer zp_..."
```

## PUT /v1/templates/{templateId}

Edit a submitted template

Meta accepts edits on APPROVED, REJECTED and PAUSED templates and reviews again.

**Path parameters**

- `templateId` · string (Required): The template id.

**Request body**

- `category` · "UTILITY" | "MARKETING" | "AUTHENTICATION" (Required)
- `components` · any[] (Required)
- `ttlSeconds` · number

**Response (object)**

- `ok` · true (Required)

```
curl -X PUT "https://zaiped.com/v1/templates/YOUR_TEMPLATE_ID" \
  -H "Authorization: Bearer zp_..." \
  -H "Content-Type: application/json" \
  -d '{
  "category": "UTILITY",
  "components": []
}'
```

## DELETE /v1/templates/{templateId}

Delete a template

Deletes it locally and, if submitted, in the WABA. Meta blocks the name for 30 days after deleting an approved template.

**Path parameters**

- `templateId` · string (Required): The template id.

**Response (object)**

- `ok` · true (Required)

```
curl -X DELETE "https://zaiped.com/v1/templates/YOUR_TEMPLATE_ID" \
  -H "Authorization: Bearer zp_..."
```

## POST /v1/templates/{templateId}/unpause

Unpause a template paused for quality

**Path parameters**

- `templateId` · string (Required): The template id.

**Response (object)**

- `success` · boolean (Required)
- `reason` · string

```
curl -X POST "https://zaiped.com/v1/templates/YOUR_TEMPLATE_ID/unpause" \
  -H "Authorization: Bearer zp_..."
```

## POST /v1/templates/sync

Sync templates from the WABA

Re-reads every template from Meta, including ones created in WhatsApp Manager.

**Response (object)**

- `ok` · true (Required)

```
curl -X POST "https://zaiped.com/v1/templates/sync" \
  -H "Authorization: Bearer zp_..."
```