---
title: "Send a batch of email using templates."
method: POST
path: "/email/batchWithTemplates"
tags: ["Sending API", "Templates API"]
---

# Send a batch of email using templates.

`POST /email/batchWithTemplates`

## Headers

- `X-Postmark-Server-Token` string, required

## Request body

- SendEmailTemplatedBatchRequest
  - `Messages` EmailWithTemplateRequest[]
    - `TemplateId` integer, required — Required if 'TemplateAlias' is not specified.
    - `TemplateAlias` string, required — Required if 'TemplateId' is not specified.
    - `TemplateModel` object, required
    - `InlineCss` boolean
    - `From` string, email, required
    - `To` string, email, required
    - `Cc` string, email
    - `Bcc` string, email
    - `Tag` string
    - `ReplyTo` string
    - `Headers` MessageHeader[]
      - `Name` string — The header's name.
      - `Value` string — The header's value.
    - `TrackOpens` boolean — Activate open tracking for this email.
    - `TrackLinks` 'None' | 'HtmlAndText' | 'HtmlOnly' | 'TextOnly' — Replace links in content to enable "click tracking" stats. Default is 'null', which uses the server's LinkTracking setting'.
    - `Attachments` Attachment[]
      - `Name` string
      - `Content` string
      - `ContentType` string
      - `ContentID` string

## Response `200`

OK

- SendEmailResponse[]
  - `To` string
  - `SubmittedAt` string, date-time
  - `MessageID` string
  - `ErrorCode` integer
  - `Message` string

## Other responses

- `422` — An error was generated due to incorrect use of the API. See the Message associated with this response for more information.
- `500` — Indicates an internal server error occurred.

---

[API](https://skmtc.dev/postmarkapp/apis/postmark-api.md) · [All operations](https://skmtc.dev/postmarkapp/apis/postmark-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/postmarkapp/postmark-api/revisions/fdae25f55e2e/schema)
