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 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.
| Key | Env var | Type | Required | Label |
|---|---|---|---|---|
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.
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 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.
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 - Parameters
- from_email, from_name, to_email, to_emails, subject, html, text
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 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 - Parameters
- limit, offset
kosmo integrations:call mailjet.mailjet_list_contacts '{"limit":1,"offset":1}' --json 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 - Parameters
- id
kosmo integrations:call mailjet.mailjet_get_contact '{"id":"example_id"}' --json 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 - Parameters
kosmo integrations:call mailjet.mailjet_create_contact '{"email":"example_email"}' --json 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 - Parameters
- limit, offset
kosmo integrations:call mailjet.mailjet_list_campaigns '{"limit":1,"offset":1}' --json 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 - Parameters
- id
kosmo integrations:call mailjet.mailjet_get_campaign '{"id":"example_id"}' --json kosmo integrations:mailjet mailjet_get_campaign '{"id":"example_id"}' --json mailjet.mailjet_list_templates
List email templates available in the Mailjet account.
read - Parameters
- limit, offset
kosmo integrations:call mailjet.mailjet_list_templates '{"limit":1,"offset":1}' --json 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 - Parameters
- from_ts, to_ts, limit, offset
kosmo integrations:call mailjet.mailjet_get_stats '{"from_ts":"example_from_ts","to_ts":"example_to_ts","limit":1,"offset":1}' --json 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 - Parameters
- none
kosmo integrations:call mailjet.mailjet_get_current_user '{}' --json 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
kosmo integrations:schema mailjet.mailjet_send_email --json | Parameter | Type | Required | Description |
|---|---|---|---|
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
kosmo integrations:schema mailjet.mailjet_list_contacts --json | Parameter | Type | Required | Description |
|---|---|---|---|
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
kosmo integrations:schema mailjet.mailjet_get_contact --json | Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | The contact ID or email address. |
mailjet.mailjet_create_contact 1 parameters
kosmo integrations:schema mailjet.mailjet_create_contact --json | Parameter | Type | Required | Description |
|---|---|---|---|
email | string | yes | The email address of the new contact. |
mailjet.mailjet_list_campaigns 2 parameters
kosmo integrations:schema mailjet.mailjet_list_campaigns --json | Parameter | Type | Required | Description |
|---|---|---|---|
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
kosmo integrations:schema mailjet.mailjet_get_campaign --json | Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | The campaign ID. |
mailjet.mailjet_list_templates 2 parameters
kosmo integrations:schema mailjet.mailjet_list_templates --json | Parameter | Type | Required | Description |
|---|---|---|---|
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
kosmo integrations:schema mailjet.mailjet_get_stats --json | Parameter | Type | Required | Description |
|---|---|---|---|
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
kosmo integrations:schema mailjet.mailjet_get_current_user --json | Parameter | Type | Required | Description |
|---|---|---|---|
| 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.