Postmark · Capability

Postmark Server API — Templates API

Postmark Server API — Templates API. 8 operations. Lead operation: Postmark Send a batch of email using templates.. Self-contained Naftiko capability covering one Postmark business surface.

Run with Naftiko PostmarkTemplates API

What You Can Do

POST
Sendemailbatchwithtemplates — Postmark Send a batch of email using templates.
/v1/email/batchwithtemplates
POST
Sendemailwithtemplate — Postmark Send an email using a Template
/v1/email/withtemplate
GET
Listtemplates — Postmark Get the Templates associated with this Server
/v1/templates
POST
Post — Postmark Create a Template
/v1/templates
POST
Testtemplatecontent — Postmark Test Template Content
/v1/templates/validate
GET
Getsingletemplate — Postmark Get a Template
/v1/templates/{templateidoralias}
PUT
Updatetemplate — Postmark Update a Template
/v1/templates/{templateidoralias}
DELETE
Deletetemplate — Postmark Delete a Template
/v1/templates/{templateidoralias}

MCP Tools

postmark-send-batch-email-using

Postmark Send a batch of email using templates.

postmark-send-email-using-template

Postmark Send an email using a Template

postmark-get-templates-associated-this

Postmark Get the Templates associated with this Server

read-only idempotent
postmark-create-template

Postmark Create a Template

postmark-test-template-content

Postmark Test Template Content

read-only
postmark-get-template

Postmark Get a Template

read-only idempotent
postmark-update-template

Postmark Update a Template

idempotent
postmark-delete-template

Postmark Delete a Template

idempotent

Capability Spec

server-templates-api.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Postmark Server API — Templates API
  description: 'Postmark Server API — Templates API. 8 operations. Lead operation: Postmark Send a batch of email using templates..
    Self-contained Naftiko capability covering one Postmark business surface.'
  tags:
  - Postmark
  - Templates API
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    POSTMARK_API_KEY: POSTMARK_API_KEY
capability:
  consumes:
  - type: http
    namespace: server-templates-api
    baseUri: https://api.postmarkapp.com
    description: Postmark Server API — Templates API business capability. Self-contained, no shared references.
    resources:
    - name: email-batchWithTemplates
      path: /email/batchWithTemplates
      operations:
      - name: sendemailbatchwithtemplates
        method: POST
        description: Postmark Send a batch of email using templates.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: X-Postmark-Server-Token
          in: header
          type: string
          description: The token associated with the Server on which this request will operate.
          required: true
        - name: body
          in: body
          type: string
          required: true
    - name: email-withTemplate
      path: /email/withTemplate
      operations:
      - name: sendemailwithtemplate
        method: POST
        description: Postmark Send an email using a Template
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: X-Postmark-Server-Token
          in: header
          type: string
          description: The token associated with the Server on which this request will operate.
          required: true
        - name: body
          in: body
          type: string
          required: true
    - name: templates
      path: /templates
      operations:
      - name: listtemplates
        method: GET
        description: Postmark Get the Templates associated with this Server
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: X-Postmark-Server-Token
          in: header
          type: string
          description: The token associated with the Server on which this request will operate.
          required: true
        - name: Count
          in: query
          type: number
          description: The number of Templates to return
          required: true
        - name: Offset
          in: query
          type: number
          description: The number of Templates to "skip" before returning results.
          required: true
      - name: post
        method: POST
        description: Postmark Create a Template
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: X-Postmark-Server-Token
          in: header
          type: string
          description: The token associated with the Server on which this request will operate.
          required: true
        - name: body
          in: body
          type: string
          required: true
    - name: templates-validate
      path: /templates/validate
      operations:
      - name: testtemplatecontent
        method: POST
        description: Postmark Test Template Content
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: X-Postmark-Server-Token
          in: header
          type: string
          description: The token associated with the Server on which this request will operate.
          required: true
        - name: body
          in: body
          type: string
    - name: templates-templateIdOrAlias
      path: /templates/{templateIdOrAlias}
      operations:
      - name: getsingletemplate
        method: GET
        description: Postmark Get a Template
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: X-Postmark-Server-Token
          in: header
          type: string
          description: The token associated with the Server on which this request will operate.
          required: true
        - name: templateIdOrAlias
          in: path
          type: string
          description: The 'TemplateID' or 'Alias' value for the Template you wish to retrieve.
          required: true
      - name: updatetemplate
        method: PUT
        description: Postmark Update a Template
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: X-Postmark-Server-Token
          in: header
          type: string
          description: The token associated with the Server on which this request will operate.
          required: true
        - name: templateIdOrAlias
          in: path
          type: string
          description: The 'TemplateID' or 'Alias' value for the Template you wish to update.
          required: true
        - name: body
          in: body
          type: string
          required: true
      - name: deletetemplate
        method: DELETE
        description: Postmark Delete a Template
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: X-Postmark-Server-Token
          in: header
          type: string
          description: The token associated with the Server on which this request will operate.
          required: true
        - name: templateIdOrAlias
          in: path
          type: string
          description: The 'TemplateID' or 'Alias' value for the Template you wish to delete.
          required: true
  exposes:
  - type: rest
    namespace: server-templates-api-rest
    port: 8080
    description: REST adapter for Postmark Server API — Templates API. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/email/batchwithtemplates
      name: email-batchwithtemplates
      description: REST surface for email-batchWithTemplates.
      operations:
      - method: POST
        name: sendemailbatchwithtemplates
        description: Postmark Send a batch of email using templates.
        call: server-templates-api.sendemailbatchwithtemplates
        with:
          X-Postmark-Server-Token: rest.X-Postmark-Server-Token
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/email/withtemplate
      name: email-withtemplate
      description: REST surface for email-withTemplate.
      operations:
      - method: POST
        name: sendemailwithtemplate
        description: Postmark Send an email using a Template
        call: server-templates-api.sendemailwithtemplate
        with:
          X-Postmark-Server-Token: rest.X-Postmark-Server-Token
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/templates
      name: templates
      description: REST surface for templates.
      operations:
      - method: GET
        name: listtemplates
        description: Postmark Get the Templates associated with this Server
        call: server-templates-api.listtemplates
        with:
          X-Postmark-Server-Token: rest.X-Postmark-Server-Token
          Count: rest.Count
          Offset: rest.Offset
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: post
        description: Postmark Create a Template
        call: server-templates-api.post
        with:
          X-Postmark-Server-Token: rest.X-Postmark-Server-Token
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/templates/validate
      name: templates-validate
      description: REST surface for templates-validate.
      operations:
      - method: POST
        name: testtemplatecontent
        description: Postmark Test Template Content
        call: server-templates-api.testtemplatecontent
        with:
          X-Postmark-Server-Token: rest.X-Postmark-Server-Token
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/templates/{templateidoralias}
      name: templates-templateidoralias
      description: REST surface for templates-templateIdOrAlias.
      operations:
      - method: GET
        name: getsingletemplate
        description: Postmark Get a Template
        call: server-templates-api.getsingletemplate
        with:
          X-Postmark-Server-Token: rest.X-Postmark-Server-Token
          templateIdOrAlias: rest.templateIdOrAlias
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: updatetemplate
        description: Postmark Update a Template
        call: server-templates-api.updatetemplate
        with:
          X-Postmark-Server-Token: rest.X-Postmark-Server-Token
          templateIdOrAlias: rest.templateIdOrAlias
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletetemplate
        description: Postmark Delete a Template
        call: server-templates-api.deletetemplate
        with:
          X-Postmark-Server-Token: rest.X-Postmark-Server-Token
          templateIdOrAlias: rest.templateIdOrAlias
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: server-templates-api-mcp
    port: 9090
    transport: http
    description: MCP adapter for Postmark Server API — Templates API. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: postmark-send-batch-email-using
      description: Postmark Send a batch of email using templates.
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: server-templates-api.sendemailbatchwithtemplates
      with:
        X-Postmark-Server-Token: tools.X-Postmark-Server-Token
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: postmark-send-email-using-template
      description: Postmark Send an email using a Template
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: server-templates-api.sendemailwithtemplate
      with:
        X-Postmark-Server-Token: tools.X-Postmark-Server-Token
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: postmark-get-templates-associated-this
      description: Postmark Get the Templates associated with this Server
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: server-templates-api.listtemplates
      with:
        X-Postmark-Server-Token: tools.X-Postmark-Server-Token
        Count: tools.Count
        Offset: tools.Offset
      outputParameters:
      - type: object
        mapping: $.
    - name: postmark-create-template
      description: Postmark Create a Template
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: server-templates-api.post
      with:
        X-Postmark-Server-Token: tools.X-Postmark-Server-Token
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: postmark-test-template-content
      description: Postmark Test Template Content
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: server-templates-api.testtemplatecontent
      with:
        X-Postmark-Server-Token: tools.X-Postmark-Server-Token
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: postmark-get-template
      description: Postmark Get a Template
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: server-templates-api.getsingletemplate
      with:
        X-Postmark-Server-Token: tools.X-Postmark-Server-Token
        templateIdOrAlias: tools.templateIdOrAlias
      outputParameters:
      - type: object
        mapping: $.
    - name: postmark-update-template
      description: Postmark Update a Template
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: server-templates-api.updatetemplate
      with:
        X-Postmark-Server-Token: tools.X-Postmark-Server-Token
        templateIdOrAlias: tools.templateIdOrAlias
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: postmark-delete-template
      description: Postmark Delete a Template
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: server-templates-api.deletetemplate
      with:
        X-Postmark-Server-Token: tools.X-Postmark-Server-Token
        templateIdOrAlias: tools.templateIdOrAlias
      outputParameters:
      - type: object
        mapping: $.