Postmark Templates API

The Templates API API from Postmark — 6 operation(s) for templates api.

Operations 9

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

PUT /templates/push Copy templates from one server to another · Postmark Push templates from one server to another #
Ask an LLM
“How do I copy my templates from staging to production?”
“Can I preview which templates would change before pushing them to another server?”
Tell an agent
Push templates from server {source_server} to server {destination_server}.
Dry-run a template push from {source_server} to {destination_server} with perform changes set to {perform_changes}.
POST /email/withTemplate Send one email from a saved template · Postmark Send an email using a Template #
Ask an LLM
“How do I send a single message based on a template I've stored?”
“Can I reference a template by its alias instead of its numeric ID when sending?”
Tell an agent
Send template {template_alias} to {to} from {from} using model {model}.
Email {to} with template {template_id} and inline the CSS.
POST /email/batchWithTemplates Send many templated emails at once · Postmark Send a batch of email using templates #
Ask an LLM
“Can I send a whole list of template-based emails in one request?”
“What's the way to bulk-send personalized messages from templates?”
Tell an agent
Batch-send these template messages: {messages}.
Send each templated email in {messages} in a single request.
GET /templates List the server's templates · Postmark Get the Templates associated with this Server #
Ask an LLM
“Which email templates exist on this server?”
“Can I page through my templates to find an alias?”
Tell an agent
List the first {count} templates.
Show my templates, skipping {offset}.
POST /templates Create a template · Postmark Create a Template #
Ask an LLM
“How do I create a new email template on my server?”
“Can I give a new template an alias so I can send by name?”
Tell an agent
Create a template named {name} with subject {subject}.
Create template {name} with alias {alias}, subject {subject} and HTML {html_body}.
GET /templates/{templateIdOrAlias} Get a template · Postmark Get a Template #
Ask an LLM
“What does the HTML and subject of one of my templates look like?”
“Can I fetch a template by its alias?”
Tell an agent
Get template {template}.
Show the subject, HTML and text body of template {template}.
PUT /templates/{templateIdOrAlias} Edit a template · Postmark Update a Template #
Ask an LLM
“How do I change the subject line of an existing template?”
“Can I rename a template or give it a new alias?”
Tell an agent
Change the subject of template {template} to {subject}.
Replace the HTML body of template {template} with {html_body}.
DELETE /templates/{templateIdOrAlias} Delete a template · Postmark Delete a Template #
Ask an LLM
“How do I remove a template I no longer use?”
“Can I delete a template by its alias?”
Tell an agent destructive · confirm first
Delete template {template}.
Remove the template with ID or alias {template}.
POST /templates/validate Validate and preview template content · Postmark Test Template Content #
Ask an LLM
“Will my template syntax render correctly before I save it?”
“Can I preview a template's output with sample data?”
Tell an agent
Validate this template subject {subject} and HTML {html_body}.
Test-render text body {text_body} with model {render_model}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/postmark:postmark-templates-api-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

postmark-templates-api-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Postmark Templates API
  version: '1.0'
  description: 'Operations tagged Templates API across 2 of this provider''s published API definitions: postmark-account-openapi-original.yml, postmark-server-openapi-original.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: //api.postmarkapp.com/
- url: https://api.postmarkapp.com/
tags:
- name: Templates API
paths:
  /templates/push:
    put:
      tags:
      - Templates API
      summary: Postmark Push templates from one server to another
      operationId: pushTemplates
      parameters:
      - name: X-Postmark-Account-Token
        in: header
        description: The token associated with the Account on which this request will operate.
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TemplatesPushModel'
        required: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplatesPushResponse'
        '422':
          description: An error was generated due to incorrect use of the API. See the Message associated with this response for more information.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardPostmarkResponse'
        '500':
          description: Indicates an internal server error occurred.
          content: {}
      x-codegen-request-body-name: body
    servers:
    - url: //api.postmarkapp.com/
  /email/withTemplate:
    post:
      operationId: sendEmailWithTemplate
      tags:
      - Templates API
      summary: Postmark Send an email using a Template
      parameters:
      - name: X-Postmark-Server-Token
        required: true
        description: The token associated with the Server on which this request will operate.
        in: header
        schema:
          type: string
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SendEmailResponse'
        422:
          $ref: '#/components/responses/422'
        500:
          $ref: '#/components/responses/500'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmailWithTemplateRequest'
        required: true
    servers:
    - url: https://api.postmarkapp.com/
  /email/batchWithTemplates:
    post:
      operationId: sendEmailBatchWithTemplates
      tags:
      - Templates API
      summary: Postmark Send a batch of email using templates
      parameters:
      - name: X-Postmark-Server-Token
        required: true
        description: The token associated with the Server on which this request will operate.
        in: header
        schema:
          type: string
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SendEmailBatchResponse'
        422:
          $ref: '#/components/responses/422'
        500:
          $ref: '#/components/responses/500'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendEmailTemplatedBatchRequest'
        required: true
    servers:
    - url: https://api.postmarkapp.com/
  /templates:
    get:
      operationId: listTemplates
      summary: Postmark Get the Templates associated with this Server
      parameters:
      - name: X-Postmark-Server-Token
        required: true
        description: The token associated with the Server on which this request will operate.
        in: header
        schema:
          type: string
      - name: Count
        in: query
        description: The number of Templates to return
        required: true
        schema:
          type: number
          format: int
      - name: Offset
        in: query
        description: The number of Templates to "skip" before returning results.
        required: true
        schema:
          type: number
          format: int
      tags:
      - Templates API
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateListingResponse'
        422:
          $ref: '#/components/responses/422'
        500:
          $ref: '#/components/responses/500'
    post:
      summary: Postmark Create a Template
      tags:
      - Templates API
      parameters:
      - name: X-Postmark-Server-Token
        required: true
        description: The token associated with the Server on which this request will operate.
        in: header
        schema:
          type: string
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateRecordResponse'
        422:
          $ref: '#/components/responses/422'
        500:
          $ref: '#/components/responses/500'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTemplateRequest'
        required: true
      operationId: postTemplates
      x-operation-id-source: derived
    servers:
    - url: https://api.postmarkapp.com/
  /templates/{templateIdOrAlias}:
    get:
      operationId: getSingleTemplate
      summary: Postmark Get a Template
      parameters:
      - name: X-Postmark-Server-Token
        required: true
        description: The token associated with the Server on which this request will operate.
        in: header
        schema:
          type: string
      - name: templateIdOrAlias
        in: path
        required: true
        description: The 'TemplateID' or 'Alias' value for the Template you wish to retrieve.
        schema:
          type: string
      tags:
      - Templates API
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateDetailResponse'
        422:
          $ref: '#/components/responses/422'
        500:
          $ref: '#/components/responses/500'
    put:
      operationId: updateTemplate
      summary: Postmark Update a Template
      parameters:
      - name: X-Postmark-Server-Token
        required: true
        description: The token associated with the Server on which this request will operate.
        in: header
        schema:
          type: string
      - name: templateIdOrAlias
        in: path
        required: true
        description: The 'TemplateID' or 'Alias' value for the Template you wish to update.
        schema:
          type: string
      tags:
      - Templates API
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateRecordResponse'
        422:
          $ref: '#/components/responses/422'
        500:
          $ref: '#/components/responses/500'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EditTemplateRequest'
        required: true
    delete:
      operationId: deleteTemplate
      summary: Postmark Delete a Template
      parameters:
      - name: X-Postmark-Server-Token
        required: true
        description: The token associated with the Server on which this request will operate.
        in: header
        schema:
          type: string
      - name: templateIdOrAlias
        in: path
        required: true
        description: The 'TemplateID' or 'Alias' value for the Template you wish to delete.
        schema:
          type: string
      tags:
      - Templates API
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateDetailResponse'
        422:
          $ref: '#/components/responses/422'
        500:
          $ref: '#/components/responses/500'
    servers:
    - url: https://api.postmarkapp.com/
  /templates/validate:
    post:
      operationId: testTemplateContent
      summary: Postmark Test Template Content
      tags:
      - Templates API
      parameters:
      - name: X-Postmark-Server-Token
        required: true
        description: The token associated with the Server on which this request will operate.
        in: header
        schema:
          type: string
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateValidationResponse'
        422:
          $ref: '#/components/responses/422'
        500:
          $ref: '#/components/responses/500'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TemplateValidationRequest'
    servers:
    - url: https://api.postmarkapp.com/
components:
  schemas:
    StandardPostmarkResponse:
      type: object
      properties:
        ErrorCode:
          type: integer
        Message:
          type: string
      description: A Postmark API error.
    TemplatesPushResponse:
      type: object
      properties:
        TotalCount:
          type: integer
        Templates:
          type: array
          items:
            type: object
            properties:
              Action:
                type: string
              TemplateId:
                type: integer
              Alias:
                type: string
              Name:
                type: string
      description: ''
    TemplatesPushModel:
      type: object
      properties:
        SourceServerId:
          type: integer
        DestinationServerId:
          type: integer
        PerformChanges:
          type: boolean
      description: ''
    CreateTemplateRequest:
      description: The contents required for creating a new template.
      properties:
        Alias:
          type: string
          description: The optional string identifier for referring to this Template (numbers, letters, and '.', '-', '_' characters, starts with a letter).
        Name:
          type: string
          description: The friendly display name for the template.
        Subject:
          type: string
          description: The Subject template definition for this Template.
        HtmlBody:
          type: string
          description: The HTML template definition for this Template.
        TextBody:
          type: string
          description: The Text template definition for this Template.
      required:
      - Name
      - Subject
    SendEmailResponse:
      description: The standard response when a postmark message is sent
      properties:
        To:
          type: string
        SubmittedAt:
          type: string
          format: date-time
        MessageID:
          type: string
        ErrorCode:
          type: integer
        Message:
          type: string
    TemplateValidationResult:
      properties:
        ContentIsValid:
          type: boolean
        ValidationErrors:
          type: array
          items:
            $ref: '#/components/schemas/TemplateValidationError'
        RenderedContent:
          type: string
    TemplateValidationResponse:
      properties:
        AllContentIsValid:
          type: boolean
        TextBody:
          $ref: '#/components/schemas/TemplateValidationResult'
        HtmlBody:
          $ref: '#/components/schemas/TemplateValidationResult'
        Subject:
          $ref: '#/components/schemas/TemplateValidationResult'
        SuggestedTemplateModel:
          type: object
    TemplateValidationRequest:
      properties:
        Subject:
          type: string
          description: 'The subject content to validate. Must be specified if HtmlBody or

            TextBody are not. See our template language documentation for more

            information on the syntax for this field.

            '
        HtmlBody:
          type: string
          description: 'The html body content to validate. Must be specified if Subject or

            TextBody are not. See our template language documentation for more

            information on the syntax for this field.

            '
        TextBody:
          type: string
          description: 'The text body content to validate. Must be specified if HtmlBody or

            Subject are not. See our template language documentation for more

            information on the syntax for this field.

            '
        TestRenderModel:
          type: object
          description: The model to be used when rendering test content.
        InlineCssForHtmlTestRender:
          type: boolean
          default: true
          description: 'When HtmlBody is specified, the test render will have style blocks

            inlined as style attributes on matching html elements. You may disable

            the css inlining behavior by passing false for this parameter.

            '
    TemplateListingResponse:
      properties:
        TotalCount:
          type: number
          description: The total number of Templates API associated with this server.
        Templates API:
          type: array
          items:
            $ref: '#/components/schemas/TemplateRecordResponse'
          description: Basic information for each Template returned from the query.
    TemplateDetailResponse:
      properties:
        Name:
          type: string
          description: The display name for the template.
        Alias:
          type: string
          description: The user-supplied alias for this template.
        TemplateID:
          type: integer
          description: The ID associated with the template.
        HtmlBody:
          type: string
          description: The content to use for the HtmlBody when this template is used to send email.
        TextBody:
          type: string
          description: The content to use for the TextBody when this template is used to send email.
        AssociatedServerId:
          type: integer
          description: The ID of the Server with which this template is associated.
        Subject:
          type: string
          description: The content to use for the Subject when this template is used to send email.
        Active:
          type: boolean
          description: Indicates that this template may be used for sending email.
    SendEmailBatchResponse:
      type: array
      items:
        $ref: '#/components/schemas/SendEmailResponse'
    HeaderCollection:
      type: array
      items:
        $ref: '#/components/schemas/MessageHeader'
    EditTemplateRequest:
      description: The contents required for creating a new template.
      properties:
        Alias:
          type: string
          description: The optional string identifier for referring to this Template (numbers, letters, and '.', '-', '_' characters, starts with a letter).
        Name:
          type: string
          description: The friendly display name for the template.
        Subject:
          type: string
          description: The Subject template definition for this Template.
        HtmlBody:
          type: string
          description: The HTML template definition for this Template.
        TextBody:
          type: string
          description: The Text template definition for this Template.
      required:
      - TemplateId
    TemplateValidationError:
      properties:
        Message:
          type: string
        Line:
          type: integer
        CharacterPosition:
          type: integer
    EmailWithTemplateRequest:
      properties:
        TemplateId:
          description: Required if 'TemplateAlias' is not specified.
          type: integer
        TemplateAlias:
          description: Required if 'TemplateId' is not specified.
          type: string
        TemplateModel:
          type: object
        InlineCss:
          type: boolean
          default: true
        From:
          type: string
          format: email
        To:
          type: string
          format: email
        Cc:
          type: string
          format: email
        Bcc:
          type: string
          format: email
        Tag:
          type: string
        ReplyTo:
          type: string
        Headers:
          $ref: '#/components/schemas/HeaderCollection'
        TrackOpens:
          description: Activate open tracking for this email.
          type: boolean
        TrackLinks:
          description: Replace links in content to enable "click tracking" stats. Default is 'null', which uses the server's LinkTracking setting'.
          type: string
          enum:
          - None
          - HtmlAndText
          - HtmlOnly
          - TextOnly
        Attachments:
          $ref: '#/components/schemas/AttachmentCollection'
      required:
      - TemplateId
      - TemplateAlias
      - TemplateModel
      - To
      - From
    Attachment:
      description: An attachment for an email message.
      properties:
        Name:
          type: string
        Content:
          type: string
        ContentType:
          type: string
        ContentID:
          type: string
    AttachmentCollection:
      type: array
      items:
        $ref: '#/components/schemas/Attachment'
    MessageHeader:
      description: A single header for an email message.
      properties:
        Name:
          description: The header's name.
          type: string
        Value:
          description: The header's value.
          type: string
    TemplateRecordResponse:
      properties:
        Name:
          type: string
          description: The display name for this template.
        Alias:
          type: string
          description: The user-supplied alias for this template.
        TemplateId:
          type: number
          format: int
          description: The associated ID for this template.
        Active:
          type: boolean
          description: True if this template is currently available for use.
    SendEmailTemplatedBatchRequest:
      properties:
        Messages:
          type: array
          items:
            $ref: '#/components/schemas/EmailWithTemplateRequest'
x-refined-from:
- postmark-account-openapi-original.yml
- postmark-server-openapi-original.yml