---
title: "Push multiple templates from CLI"
method: POST
path: "/v1/templates/push/batch"
tags: ["templates"]
---

# Push multiple templates from CLI

`POST /v1/templates/push/batch`

## Request

- Base URL: `https://api.wraps.dev`
- URL: `https://api.wraps.dev/v1/templates/push/batch`
- Auth: HTTP bearer

Batch upsert templates compiled from React Email source.

## Request body

- object
  - `templates` object[], required
    - `slug` string, required
    - `source` string, required
    - `compiledHtml` string, required
    - `compiledText` string, required
    - `subject` string, required
    - `previewText` string
    - `emailType` union, required
      - string
      - string
    - `channel` union
      - string
      - string
    - `variables` object[], required
      - `name` string, required
      - `fallback` string
    - `sourceHash` string, required
    - `sesTemplateName` string, required
    - `cliProjectPath` string
    - `force` boolean

## Response `200`

## Other responses

- `400`: Malformed request — unparseable body or an invalid parameter.
- `401`: Missing, malformed, or revoked credentials. Send `Authorization: Bearer <api key>`.
- `403`: Authenticated, but the resource belongs to another organization.
- `404`: No such route, or no such resource in this organization.
- `422`: The request parsed but failed schema validation.
- `429`: Rate limit exceeded. Wait for the window named by the RateLimit headers.
- `500`: Unexpected server failure. Safe to retry with backoff; quote `requestId` if it persists.

---

[API](https://skmtc.dev/wraps/apis/wraps-platform-api.md) · [All operations](https://skmtc.dev/wraps/apis/wraps-platform-api/llms.txt) · [OpenAPI document](https://skmtc.dev/wraps/apis/wraps-platform-api/revisions/12116fb21af7?raw)
