Postmark Templates API API

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

Operations 9

PUT /templates/push Postmark Push templates from one server to another #
POST /email/withTemplate Postmark Send an email using a Template #
POST /email/batchWithTemplates Postmark Send a batch of email using templates. #
GET /templates Postmark Get the Templates associated with this Server #
POST /templates Postmark Create a Template
GET /templates/{templateIdOrAlias} Postmark Get a Template #
PUT /templates/{templateIdOrAlias} Postmark Update a Template #
DELETE /templates/{templateIdOrAlias} Postmark Delete a Template #
POST /templates/validate Postmark Test Template Content #

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-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 email required.

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
    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.
    TemplatesPushModel:
      type: object
      properties:
        SourceServerId:
          type: integer
        DestinationServerId:
          type: integer
        PerformChanges:
          type: boolean
      description: ''
    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: ''
    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
    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.

            '
    TemplateValidationError:
      properties:
        Message:
          type: string
        Line:
          type: integer
        CharacterPosition:
          type: integer
    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.
    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.
    TemplateValidationResponse:
      properties:
        AllContentIsValid:
          type: boolean
        TextBody:
          $ref: '#/components/schemas/TemplateValidationResult'
        HtmlBody:
          $ref: '#/components/schemas/TemplateValidationResult'
        Subject:
          $ref: '#/components/schemas/TemplateValidationResult'
        SuggestedTemplateModel:
          type: object
    TemplateValidationResult:
      properties:
        ContentIsValid:
          type: boolean
        ValidationErrors:
          type: array
          items:
            $ref: '#/components/schemas/TemplateValidationError'
        RenderedContent:
          type: string
    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
    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
    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
    AttachmentCollection:
      type: array
      items:
        $ref: '#/components/schemas/Attachment'
    SendEmailTemplatedBatchRequest:
      properties:
        Messages:
          type: array
          items:
            $ref: '#/components/schemas/EmailWithTemplateRequest'
    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
    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.
    Attachment:
      description: An attachment for an email message.
      properties:
        Name:
          type: string
        Content:
          type: string
        ContentType:
          type: string
        ContentID:
          type: string
    SendEmailBatchResponse:
      type: array
      items:
        $ref: '#/components/schemas/SendEmailResponse'
x-refined-from:
- postmark-account-openapi-original.yml
- postmark-server-openapi-original.yml