Use the Courier CLI from KosmoKrator to call Courier tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.
Courier can be configured headlessly with `kosmokrator integrations:configure courier`.
# 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 courier --set api_key="$COURIER_API_KEY" --enable --read allow --write ask --jsonkosmokrator integrations:doctor courier --jsonkosmokrator integrations:status --json
Credentials
Authentication type: API keyapi_key. Configure credentials once, then use the same stored profile from
scripts, coding CLIs, Lua code mode, and the MCP gateway.
Key
Env var
Type
Required
Label
api_key
COURIER_API_KEY
Secret secret
yes
API Key
url
COURIER_URL
URL url
no
Courier API URL
Call Courier Headlessly
Use the generic call form when another coding CLI or script needs a stable universal interface.
Every function below can be called headlessly. The generic form is stable across all integrations;
the provider shortcut is shorter but specific to Courier.
courier.courier_send_message
Write write
Send a notification message through Courier. Provide a message payload with content or template, and a recipient (user ID, email, or recipient object). Supports all Courier send options including channels, routing, and preferences.
Use these parameter tables when building CLI payloads without calling integrations:schema first.
courier.courier_send_message
Send a notification message through Courier. Provide a message payload with content or template, and a recipient (user ID, email, or recipient object). Supports all Courier send options including channels, routing, and preferences.
The message payload. Can include "template" (template ID), "content" (title/body blocks), "routing" (channel overrides), "data" (template variables), and other Courier send options. Pass as a JSON object.
recipient
string
yes
The message recipient. Can be a Courier user ID, email address, or a JSON object with recipient details (e.g., {"email": "[email protected]"}).
courier.courier_list_messages
List messages from Courier with optional filtering by status and cursor-based pagination. Returns message IDs, statuses, and metadata.
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.