KosmoKrator

productivity

Mailjet CLI for AI Agents

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

Mailjet CLI Setup

Mailjet can be configured headlessly with `kosmokrator integrations:configure mailjet`.

Install, configure, and verify
# 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 mailjet --set api_key="$MAILJET_API_KEY" --set api_secret="$MAILJET_API_SECRET" --enable --read allow --write ask --json
kosmokrator integrations:doctor mailjet --json
kosmokrator integrations:status --json

Credentials

Authentication type: API key api_key. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.

KeyEnv varTypeRequiredLabel
api_key MAILJET_API_KEY Secret secret yes API Key
api_secret MAILJET_API_SECRET Secret secret yes API Secret

Command Patterns

The generic command is stable across every integration. The provider shortcut is shorter for humans.

Generic CLI call
kosmo integrations:call mailjet.mailjet_send_email '{"from_email":"example_from_email","from_name":"example_from_name","to_email":"example_to_email","to_emails":"example_to_emails","subject":"example_subject","html":"example_html","text":"example_text"}' --json
Provider shortcut
kosmo integrations:mailjet mailjet_send_email '{"from_email":"example_from_email","from_name":"example_from_name","to_email":"example_to_email","to_emails":"example_to_emails","subject":"example_subject","html":"example_html","text":"example_text"}' --json

Discovery

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

Discovery commands
kosmo integrations:docs mailjet --json
kosmo integrations:docs mailjet.mailjet_send_email --json
kosmo integrations:schema mailjet.mailjet_send_email --json
kosmo integrations:search "Mailjet" --json
kosmo integrations:list --json

Automation Contexts

The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.

CLI Functions

Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.

mailjet.mailjet_send_email

Send an email via Mailjet. Specify sender, one or more recipients, subject, and HTML body.

Write write
Parameters
from_email, from_name, to_email, to_emails, subject, html, text
Generic call
kosmo integrations:call mailjet.mailjet_send_email '{"from_email":"example_from_email","from_name":"example_from_name","to_email":"example_to_email","to_emails":"example_to_emails","subject":"example_subject","html":"example_html","text":"example_text"}' --json
Shortcut
kosmo integrations:mailjet mailjet_send_email '{"from_email":"example_from_email","from_name":"example_from_name","to_email":"example_to_email","to_emails":"example_to_emails","subject":"example_subject","html":"example_html","text":"example_text"}' --json

mailjet.mailjet_list_contacts

List contacts in the Mailjet account. Returns paginated contact data including email addresses and metadata.

Read read
Parameters
limit, offset
Generic call
kosmo integrations:call mailjet.mailjet_list_contacts '{"limit":1,"offset":1}' --json
Shortcut
kosmo integrations:mailjet mailjet_list_contacts '{"limit":1,"offset":1}' --json

mailjet.mailjet_get_contact

Get details for a single Mailjet contact by ID or email address.

Read read
Parameters
id
Generic call
kosmo integrations:call mailjet.mailjet_get_contact '{"id":"example_id"}' --json
Shortcut
kosmo integrations:mailjet mailjet_get_contact '{"id":"example_id"}' --json

mailjet.mailjet_create_contact

Create a new contact in Mailjet. Provide the email address to add.

Write write
Parameters
email
Generic call
kosmo integrations:call mailjet.mailjet_create_contact '{"email":"example_email"}' --json
Shortcut
kosmo integrations:mailjet mailjet_create_contact '{"email":"example_email"}' --json

mailjet.mailjet_list_campaigns

List email campaigns in the Mailjet account. Returns campaign IDs, subjects, and status.

Read read
Parameters
limit, offset
Generic call
kosmo integrations:call mailjet.mailjet_list_campaigns '{"limit":1,"offset":1}' --json
Shortcut
kosmo integrations:mailjet mailjet_list_campaigns '{"limit":1,"offset":1}' --json

mailjet.mailjet_get_campaign

Get details for a single Mailjet email campaign by ID.

Read read
Parameters
id
Generic call
kosmo integrations:call mailjet.mailjet_get_campaign '{"id":"example_id"}' --json
Shortcut
kosmo integrations:mailjet mailjet_get_campaign '{"id":"example_id"}' --json

mailjet.mailjet_list_templates

List email templates available in the Mailjet account.

Read read
Parameters
limit, offset
Generic call
kosmo integrations:call mailjet.mailjet_list_templates '{"limit":1,"offset":1}' --json
Shortcut
kosmo integrations:mailjet mailjet_list_templates '{"limit":1,"offset":1}' --json

mailjet.mailjet_get_stats

Get email statistics from the Mailjet statcounters endpoint. Returns send, delivery, open, click, and bounce counts.

Read read
Parameters
from_ts, to_ts, limit, offset
Generic call
kosmo integrations:call mailjet.mailjet_get_stats '{"from_ts":"example_from_ts","to_ts":"example_to_ts","limit":1,"offset":1}' --json
Shortcut
kosmo integrations:mailjet mailjet_get_stats '{"from_ts":"example_from_ts","to_ts":"example_to_ts","limit":1,"offset":1}' --json

mailjet.mailjet_get_current_user

Get the authenticated Mailjet user profile information.

Read read
Parameters
none
Generic call
kosmo integrations:call mailjet.mailjet_get_current_user '{}' --json
Shortcut
kosmo integrations:mailjet mailjet_get_current_user '{}' --json

Function Schemas

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

mailjet.mailjet_send_email 7 parameters
Schema command
kosmo integrations:schema mailjet.mailjet_send_email --json
ParameterTypeRequiredDescription
from_email string yes Sender email address (must be a verified sender in Mailjet).
from_name string no Sender display name.
to_email string yes Recipient email address. For multiple recipients, use to_emails instead.
to_emails array no Array of recipient email addresses. Use this OR to_email, not both.
subject string yes Email subject line.
html string no HTML body of the email.
text string no Plain-text body of the email (fallback when HTML is not supported).
mailjet.mailjet_list_contacts 2 parameters
Schema command
kosmo integrations:schema mailjet.mailjet_list_contacts --json
ParameterTypeRequiredDescription
limit integer no Maximum number of contacts to return (default: 100).
offset integer no Offset for pagination (default: 0).
mailjet.mailjet_get_contact 1 parameters
Schema command
kosmo integrations:schema mailjet.mailjet_get_contact --json
ParameterTypeRequiredDescription
id string yes The contact ID or email address.
mailjet.mailjet_create_contact 1 parameters
Schema command
kosmo integrations:schema mailjet.mailjet_create_contact --json
ParameterTypeRequiredDescription
email string yes The email address of the new contact.
mailjet.mailjet_list_campaigns 2 parameters
Schema command
kosmo integrations:schema mailjet.mailjet_list_campaigns --json
ParameterTypeRequiredDescription
limit integer no Maximum number of campaigns to return (default: 100).
offset integer no Offset for pagination (default: 0).
mailjet.mailjet_get_campaign 1 parameters
Schema command
kosmo integrations:schema mailjet.mailjet_get_campaign --json
ParameterTypeRequiredDescription
id string yes The campaign ID.
mailjet.mailjet_list_templates 2 parameters
Schema command
kosmo integrations:schema mailjet.mailjet_list_templates --json
ParameterTypeRequiredDescription
limit integer no Maximum number of templates to return (default: 100).
offset integer no Offset for pagination (default: 0).
mailjet.mailjet_get_stats 4 parameters
Schema command
kosmo integrations:schema mailjet.mailjet_get_stats --json
ParameterTypeRequiredDescription
from_ts string no Start timestamp (ISO 8601 or Unix epoch) for the stats window.
to_ts string no End timestamp (ISO 8601 or Unix epoch) for the stats window.
limit integer no Maximum number of stat records to return (default: 100).
offset integer no Offset for pagination (default: 0).
mailjet.mailjet_get_current_user 0 parameters
Schema command
kosmo integrations:schema mailjet.mailjet_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.