productivity
SparkPost CLI for AI Agents
Use the SparkPost CLI from KosmoKrator to call SparkPost tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.SparkPost CLI Setup
SparkPost can be configured headlessly with `kosmokrator integrations:configure spark-post`.
# 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 spark-post --set api_key="$SPARK_POST_API_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor spark-post --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 | SPARK_POST_API_KEY | Secret secret | yes | API Key |
url | SPARK_POST_URL | URL url | no | API Base URL |
Command Patterns
The generic command is stable across every integration. The provider shortcut is shorter for humans.
kosmo integrations:call spark-post.spark_post_list_sending_domains '{"limit":1}' --json kosmo integrations:spark-post spark_post_list_sending_domains '{"limit":1}' --json Discovery
These commands return structured output for coding agents that need to inspect capabilities before choosing a function.
kosmo integrations:docs spark-post --json
kosmo integrations:docs spark-post.spark_post_list_sending_domains --json
kosmo integrations:schema spark-post.spark_post_list_sending_domains --json
kosmo integrations:search "SparkPost" --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.
spark-post.spark_post_list_sending_domains
List sending domains configured in SparkPost. Returns domain names along with verification and DKIM signing status.
read - Parameters
- limit
kosmo integrations:call spark-post.spark_post_list_sending_domains '{"limit":1}' --json kosmo integrations:spark-post spark_post_list_sending_domains '{"limit":1}' --json spark-post.spark_post_get_sending_domain
Get details for a specific sending domain in SparkPost. Returns verification status, DKIM signing info, and SPF records.
read - Parameters
- domain
kosmo integrations:call spark-post.spark_post_get_sending_domain '{"domain":"example_domain"}' --json kosmo integrations:spark-post spark_post_get_sending_domain '{"domain":"example_domain"}' --json spark-post.spark_post_list_templates
List email templates in SparkPost. Returns template IDs, names, and published status.
read - Parameters
- limit, offset
kosmo integrations:call spark-post.spark_post_list_templates '{"limit":1,"offset":1}' --json kosmo integrations:spark-post spark_post_list_templates '{"limit":1,"offset":1}' --json spark-post.spark_post_get_template
Get a specific email template by ID from SparkPost. Can retrieve the draft or published version.
read - Parameters
- id, draft
kosmo integrations:call spark-post.spark_post_get_template '{"id":"example_id","draft":true}' --json kosmo integrations:spark-post spark_post_get_template '{"id":"example_id","draft":true}' --json spark-post.spark_post_send_transmission
Send an email transmission via SparkPost. Provide sender address, subject, content (HTML and/or text), and a list of recipients.
write - Parameters
- content, recipients
kosmo integrations:call spark-post.spark_post_send_transmission '{"content":"example_content","recipients":"example_recipients"}' --json kosmo integrations:spark-post spark_post_send_transmission '{"content":"example_content","recipients":"example_recipients"}' --json spark-post.spark_post_list_webhooks
List webhooks configured in SparkPost. Returns webhook IDs, target URLs, and subscribed event types.
read - Parameters
- limit, offset
kosmo integrations:call spark-post.spark_post_list_webhooks '{"limit":1,"offset":1}' --json kosmo integrations:spark-post spark_post_list_webhooks '{"limit":1,"offset":1}' --json spark-post.spark_post_get_current_user
Get current SparkPost account information. Returns account status, subscription plan, and usage details.
read - Parameters
- none
kosmo integrations:call spark-post.spark_post_get_current_user '{}' --json kosmo integrations:spark-post spark_post_get_current_user '{}' --json Function Schemas
Use these parameter tables when building CLI payloads without calling integrations:schema first.
spark-post.spark_post_list_sending_domains 1 parameters
kosmo integrations:schema spark-post.spark_post_list_sending_domains --json | Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Maximum number of sending domains to return (default: 100). |
spark-post.spark_post_get_sending_domain 1 parameters
kosmo integrations:schema spark-post.spark_post_get_sending_domain --json | Parameter | Type | Required | Description |
|---|---|---|---|
domain | string | yes | The sending domain name to look up (e.g., "example.com"). |
spark-post.spark_post_list_templates 2 parameters
kosmo integrations:schema spark-post.spark_post_list_templates --json | Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Maximum number of templates to return (default: 100). |
offset | integer | no | Number of templates to skip for pagination (default: 0). |
spark-post.spark_post_get_template 2 parameters
kosmo integrations:schema spark-post.spark_post_get_template --json | Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | The template ID to retrieve. |
draft | boolean | no | Set to true to retrieve the draft version of the template. Defaults to false (published version). |
spark-post.spark_post_send_transmission 2 parameters
kosmo integrations:schema spark-post.spark_post_send_transmission --json | Parameter | Type | Required | Description |
|---|---|---|---|
content | object | yes | Email content object. Must include "from" (email address or object with "email" and "name") and "subject". Optionally include "html" and/or "text" for the email body. |
recipients | array | yes | Array of recipient objects. Each must have an "address" object with an "email" field (and optional "name"). Example: [{"address": {"email": "user@example.com", "name": "User"}}] |
spark-post.spark_post_list_webhooks 2 parameters
kosmo integrations:schema spark-post.spark_post_list_webhooks --json | Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Maximum number of webhooks to return (default: 100). |
offset | integer | no | Number of webhooks to skip for pagination (default: 0). |
spark-post.spark_post_get_current_user 0 parameters
kosmo integrations:schema spark-post.spark_post_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.