KosmoKrator

communication

Postmark CLI for AI Agents

Use the Postmark CLI from KosmoKrator to call Postmark tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

9 functions 7 read 2 write API token auth

Postmark CLI Setup

Postmark can be configured headlessly with `kosmokrator integrations:configure postmark`.

# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure postmark --set server_token="$POSTMARK_SERVER_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor postmark --json
kosmokrator integrations:status --json

Credentials

Authentication type: API token api_token. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
server_token POSTMARK_SERVER_TOKEN Secret secret yes Server Token
base_url POSTMARK_BASE_URL Text text no Base URL

Call Postmark Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call postmark.postmark_list_messages '{
  "count": 1,
  "offset": 1,
  "recipient": "example_recipient",
  "fromemail": "example_fromemail",
  "subject": "example_subject",
  "status": "example_status",
  "tag": "example_tag"
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:postmark postmark_list_messages '{
  "count": 1,
  "offset": 1,
  "recipient": "example_recipient",
  "fromemail": "example_fromemail",
  "subject": "example_subject",
  "status": "example_status",
  "tag": "example_tag"
}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs postmark --json
kosmo integrations:docs postmark.postmark_list_messages --json
kosmo integrations:schema postmark.postmark_list_messages --json
kosmo integrations:search "Postmark" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Postmark.

postmark.postmark_list_messages

Read read

List outbound messages from Postmark. Supports filtering by recipient, sender, subject, status, and tag.

Parameters
count, offset, recipient, fromemail, subject, status, tag

Generic CLI call

kosmo integrations:call postmark.postmark_list_messages '{"count":1,"offset":1,"recipient":"example_recipient","fromemail":"example_fromemail","subject":"example_subject","status":"example_status","tag":"example_tag"}' --json

Provider shortcut

kosmo integrations:postmark postmark_list_messages '{"count":1,"offset":1,"recipient":"example_recipient","fromemail":"example_fromemail","subject":"example_subject","status":"example_status","tag":"example_tag"}' --json

postmark.postmark_get_message

Read read

Get details for a specific Postmark outbound message including body, recipients, and delivery status.

Parameters
message_id

Generic CLI call

kosmo integrations:call postmark.postmark_get_message '{"message_id":"example_message_id"}' --json

Provider shortcut

kosmo integrations:postmark postmark_get_message '{"message_id":"example_message_id"}' --json

postmark.postmark_send_email

Write write

Send an email through Postmark. Requires To, From, and Subject. Provide either TextBody or HtmlBody.

Parameters
To, From, Subject, TextBody, HtmlBody, Cc, Bcc, Tag, ReplyTo

Generic CLI call

kosmo integrations:call postmark.postmark_send_email '{"To":"example_To","From":"example_From","Subject":"example_Subject","TextBody":"example_TextBody","HtmlBody":"example_HtmlBody","Cc":"example_Cc","Bcc":"example_Bcc","Tag":"example_Tag"}' --json

Provider shortcut

kosmo integrations:postmark postmark_send_email '{"To":"example_To","From":"example_From","Subject":"example_Subject","TextBody":"example_TextBody","HtmlBody":"example_HtmlBody","Cc":"example_Cc","Bcc":"example_Bcc","Tag":"example_Tag"}' --json

postmark.postmark_send_template

Write write

Send an email using a Postmark template. Provide either a TemplateId or TemplateAlias along with the template model data.

Parameters
From, To, TemplateId, TemplateAlias, TemplateModel, Cc, Bcc, ReplyTo, Tag, TrackOpens, TrackLinks

Generic CLI call

kosmo integrations:call postmark.postmark_send_template '{"From":"example_From","To":"example_To","TemplateId":1,"TemplateAlias":"example_TemplateAlias","TemplateModel":"example_TemplateModel","Cc":"example_Cc","Bcc":"example_Bcc","ReplyTo":"example_ReplyTo"}' --json

Provider shortcut

kosmo integrations:postmark postmark_send_template '{"From":"example_From","To":"example_To","TemplateId":1,"TemplateAlias":"example_TemplateAlias","TemplateModel":"example_TemplateModel","Cc":"example_Cc","Bcc":"example_Bcc","ReplyTo":"example_ReplyTo"}' --json

postmark.postmark_get_delivery_stats

Read read

Get email delivery statistics for your Postmark server, including counts of sent, bounced, and spam complaints.

Parameters
none

Generic CLI call

kosmo integrations:call postmark.postmark_get_delivery_stats '{}' --json

Provider shortcut

kosmo integrations:postmark postmark_get_delivery_stats '{}' --json

postmark.postmark_list_templates

Read read

List all email templates in Postmark. Supports pagination.

Parameters
count, offset

Generic CLI call

kosmo integrations:call postmark.postmark_list_templates '{"count":1,"offset":1}' --json

Provider shortcut

kosmo integrations:postmark postmark_list_templates '{"count":1,"offset":1}' --json

postmark.postmark_get_template

Read read

Get details for a Postmark email template including subject, HTML body, and text body.

Parameters
template_id

Generic CLI call

kosmo integrations:call postmark.postmark_get_template '{"template_id":"example_template_id"}' --json

Provider shortcut

kosmo integrations:postmark postmark_get_template '{"template_id":"example_template_id"}' --json

postmark.postmark_list_servers

Read read

List servers in the Postmark account. Supports filtering by name and pagination.

Parameters
count, offset, name

Generic CLI call

kosmo integrations:call postmark.postmark_list_servers '{"count":1,"offset":1,"name":"example_name"}' --json

Provider shortcut

kosmo integrations:postmark postmark_list_servers '{"count":1,"offset":1,"name":"example_name"}' --json

postmark.postmark_get_current_user

Read read

Get the current Postmark server info including name, settings, and delivery stats. Useful as a health check.

Parameters
none

Generic CLI call

kosmo integrations:call postmark.postmark_get_current_user '{}' --json

Provider shortcut

kosmo integrations:postmark postmark_get_current_user '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

postmark.postmark_list_messages

List outbound messages from Postmark. Supports filtering by recipient, sender, subject, status, and tag.

Operation
Read read
Schema command
kosmo integrations:schema postmark.postmark_list_messages --json
ParameterTypeRequiredDescription
count integer no Number of messages to return per page (default 100, max 500).
offset integer no Number of messages to skip for pagination.
recipient string no Filter by recipient email address.
fromemail string no Filter by sender email address.
subject string no Filter by email subject.
status string no Filter by status (queued, sent, bounced, etc.).
tag string no Filter by tag.

postmark.postmark_get_message

Get details for a specific Postmark outbound message including body, recipients, and delivery status.

Operation
Read read
Schema command
kosmo integrations:schema postmark.postmark_get_message --json
ParameterTypeRequiredDescription
message_id string yes The Postmark message ID to look up.

postmark.postmark_send_email

Send an email through Postmark. Requires To, From, and Subject. Provide either TextBody or HtmlBody.

Operation
Write write
Schema command
kosmo integrations:schema postmark.postmark_send_email --json
ParameterTypeRequiredDescription
To string yes Recipient email address.
From string yes Sender email address (must be a verified sender signature).
Subject string yes Email subject line.
TextBody string no Plain-text body of the email.
HtmlBody string no HTML body of the email.
Cc string no CC recipient(s), comma-separated.
Bcc string no BCC recipient(s), comma-separated.
Tag string no Tag for categorization and tracking.
ReplyTo string no Reply-To email address.

postmark.postmark_send_template

Send an email using a Postmark template. Provide either a TemplateId or TemplateAlias along with the template model data.

Operation
Write write
Schema command
kosmo integrations:schema postmark.postmark_send_template --json
ParameterTypeRequiredDescription
From string yes Sender email address (must be a verified sender signature). Example: "[email protected]" or "Sender Name <[email protected]>".
To string yes Recipient email address. Multiple recipients separated by commas.
TemplateId integer no The template ID to use. Use this or TemplateAlias.
TemplateAlias string no The template alias to use. Use this or TemplateId.
TemplateModel array no Key-value pairs to fill the template variables. Example: {"name": "John", "company": "Acme"}.
Cc string no CC recipients (comma-separated).
Bcc string no BCC recipients (comma-separated).
ReplyTo string no Reply-to email address.
Tag string no Tag for categorization and analytics.
TrackOpens boolean no Enable open tracking (default: server setting).
TrackLinks string no Link tracking mode: "None", "HtmlAndText", "HtmlOnly", "TextOnly".

postmark.postmark_get_delivery_stats

Get email delivery statistics for your Postmark server, including counts of sent, bounced, and spam complaints.

Operation
Read read
Schema command
kosmo integrations:schema postmark.postmark_get_delivery_stats --json
ParameterTypeRequiredDescription
No parameters.

postmark.postmark_list_templates

List all email templates in Postmark. Supports pagination.

Operation
Read read
Schema command
kosmo integrations:schema postmark.postmark_list_templates --json
ParameterTypeRequiredDescription
count integer no Number of templates to return per page (default 100, max 500).
offset integer no Number of templates to skip for pagination.

postmark.postmark_get_template

Get details for a Postmark email template including subject, HTML body, and text body.

Operation
Read read
Schema command
kosmo integrations:schema postmark.postmark_get_template --json
ParameterTypeRequiredDescription
template_id string yes The Postmark template ID to look up.

postmark.postmark_list_servers

List servers in the Postmark account. Supports filtering by name and pagination.

Operation
Read read
Schema command
kosmo integrations:schema postmark.postmark_list_servers --json
ParameterTypeRequiredDescription
count integer no Number of servers to return per page (default 100, max 500).
offset integer no Number of servers to skip for pagination.
name string no Filter by server name.

postmark.postmark_get_current_user

Get the current Postmark server info including name, settings, and delivery stats. Useful as a health check.

Operation
Read read
Schema command
kosmo integrations:schema postmark.postmark_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.