KosmoKrator

other

Mailer Send CLI for AI Agents

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

7 functions 6 read 1 write API token auth

Mailer Send CLI Setup

Mailer Send can be configured headlessly with `kosmokrator integrations:configure mailer-send`.

# 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 mailer-send --set api_token="$MAILER_SEND_API_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor mailer-send --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
api_token MAILER_SEND_API_TOKEN Secret secret yes API Token

Call Mailer Send Headlessly

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

kosmo integrations:call mailer-send.mailer_send_list_messages '{
  "limit": 1,
  "page": 1
}' --json

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

kosmo integrations:mailer-send mailer_send_list_messages '{
  "limit": 1,
  "page": 1
}' --json

Agent Discovery Commands

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

kosmo integrations:docs mailer-send --json
kosmo integrations:docs mailer-send.mailer_send_list_messages --json
kosmo integrations:schema mailer-send.mailer_send_list_messages --json
kosmo integrations:search "Mailer Send" --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 Mailer Send.

mailer-send.mailer_send_list_messages

Read read

List email messages from your MailerSend account. Returns a paginated list of sent messages with their IDs, subjects, and statuses.

Parameters
limit, page

Generic CLI call

kosmo integrations:call mailer-send.mailer_send_list_messages '{"limit":1,"page":1}' --json

Provider shortcut

kosmo integrations:mailer-send mailer_send_list_messages '{"limit":1,"page":1}' --json

mailer-send.mailer_send_get_message

Read read

Get detailed information about a specific email message by its ID. Returns the full message object including status, recipients, subject, and content.

Parameters
id

Generic CLI call

kosmo integrations:call mailer-send.mailer_send_get_message '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:mailer-send mailer_send_get_message '{"id":"example_id"}' --json

mailer-send.mailer_send_send_email

Write write

Send an email through the MailerSend API. Requires a sender (from), one or more recipients (to), and a subject. Optionally provide HTML and/or plain text content.

Parameters
from, to, subject, html, text

Generic CLI call

kosmo integrations:call mailer-send.mailer_send_send_email '{"from":"example_from","to":"example_to","subject":"example_subject","html":"example_html","text":"example_text"}' --json

Provider shortcut

kosmo integrations:mailer-send mailer_send_send_email '{"from":"example_from","to":"example_to","subject":"example_subject","html":"example_html","text":"example_text"}' --json

mailer-send.mailer_send_list_templates

Read read

List email templates available in your MailerSend account. Returns template IDs, names, and types for use when sending templated emails.

Parameters
limit, page

Generic CLI call

kosmo integrations:call mailer-send.mailer_send_list_templates '{"limit":1,"page":1}' --json

Provider shortcut

kosmo integrations:mailer-send mailer_send_list_templates '{"limit":1,"page":1}' --json

mailer-send.mailer_send_list_domains

Read read

List sending domains configured in your MailerSend account. Returns domain names, verification statuses, and related settings.

Parameters
limit, page, verified

Generic CLI call

kosmo integrations:call mailer-send.mailer_send_list_domains '{"limit":1,"page":1,"verified":true}' --json

Provider shortcut

kosmo integrations:mailer-send mailer_send_list_domains '{"limit":1,"page":1,"verified":true}' --json

mailer-send.mailer_send_list_recipients

Read read

List recipients (contacts) from your MailerSend account. Returns recipient emails, names, and subscription statuses.

Parameters
limit, page

Generic CLI call

kosmo integrations:call mailer-send.mailer_send_list_recipients '{"limit":1,"page":1}' --json

Provider shortcut

kosmo integrations:mailer-send mailer_send_list_recipients '{"limit":1,"page":1}' --json

mailer-send.mailer_send_get_current_user

Read read

Verify MailerSend API connectivity by fetching a minimal list of domains. Use this as a health check to confirm the API token is valid and the service is reachable.

Parameters
none

Generic CLI call

kosmo integrations:call mailer-send.mailer_send_get_current_user '{}' --json

Provider shortcut

kosmo integrations:mailer-send mailer_send_get_current_user '{}' --json

Function Schemas

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

mailer-send.mailer_send_list_messages

List email messages from your MailerSend account. Returns a paginated list of sent messages with their IDs, subjects, and statuses.

Operation
Read read
Schema command
kosmo integrations:schema mailer-send.mailer_send_list_messages --json
ParameterTypeRequiredDescription
limit integer no Maximum number of messages to return per page (default: 25).
page integer no Page number for pagination (default: 1).

mailer-send.mailer_send_get_message

Get detailed information about a specific email message by its ID. Returns the full message object including status, recipients, subject, and content.

Operation
Read read
Schema command
kosmo integrations:schema mailer-send.mailer_send_get_message --json
ParameterTypeRequiredDescription
id string yes The unique message ID.

mailer-send.mailer_send_send_email

Send an email through the MailerSend API. Requires a sender (from), one or more recipients (to), and a subject. Optionally provide HTML and/or plain text content.

Operation
Write write
Schema command
kosmo integrations:schema mailer-send.mailer_send_send_email --json
ParameterTypeRequiredDescription
from object yes Sender object with "email" (required) and "name" (required) keys, e.g. {"email": "[email protected]", "name": "Acme Corp"}.
to array yes Array of recipient objects, each with "email" (required) and optional "name" keys, e.g. [{"email": "[email protected]", "name": "John"}].
subject string yes The email subject line.
html string no HTML body content for the email.
text string no Plain text body content for the email.

mailer-send.mailer_send_list_templates

List email templates available in your MailerSend account. Returns template IDs, names, and types for use when sending templated emails.

Operation
Read read
Schema command
kosmo integrations:schema mailer-send.mailer_send_list_templates --json
ParameterTypeRequiredDescription
limit integer no Maximum number of templates to return per page (default: 25).
page integer no Page number for pagination (default: 1).

mailer-send.mailer_send_list_domains

List sending domains configured in your MailerSend account. Returns domain names, verification statuses, and related settings.

Operation
Read read
Schema command
kosmo integrations:schema mailer-send.mailer_send_list_domains --json
ParameterTypeRequiredDescription
limit integer no Maximum number of domains to return per page (default: 25).
page integer no Page number for pagination (default: 1).
verified boolean no Filter domains by verification status. Pass true for verified only, false for unverified only.

mailer-send.mailer_send_list_recipients

List recipients (contacts) from your MailerSend account. Returns recipient emails, names, and subscription statuses.

Operation
Read read
Schema command
kosmo integrations:schema mailer-send.mailer_send_list_recipients --json
ParameterTypeRequiredDescription
limit integer no Maximum number of recipients to return per page (default: 25).
page integer no Page number for pagination (default: 1).

mailer-send.mailer_send_get_current_user

Verify MailerSend API connectivity by fetching a minimal list of domains. Use this as a health check to confirm the API token is valid and the service is reachable.

Operation
Read read
Schema command
kosmo integrations:schema mailer-send.mailer_send_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.