KosmoKrator

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, 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 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.

KeyEnv varTypeRequiredLabel
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.

Generic CLI call
kosmo integrations:call spark-post.spark_post_list_sending_domains '{"limit":1}' --json
Provider shortcut
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.

Discovery commands
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 read
Parameters
limit
Generic call
kosmo integrations:call spark-post.spark_post_list_sending_domains '{"limit":1}' --json
Shortcut
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 read
Parameters
domain
Generic call
kosmo integrations:call spark-post.spark_post_get_sending_domain '{"domain":"example_domain"}' --json
Shortcut
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 read
Parameters
limit, offset
Generic call
kosmo integrations:call spark-post.spark_post_list_templates '{"limit":1,"offset":1}' --json
Shortcut
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 read
Parameters
id, draft
Generic call
kosmo integrations:call spark-post.spark_post_get_template '{"id":"example_id","draft":true}' --json
Shortcut
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 write
Parameters
content, recipients
Generic call
kosmo integrations:call spark-post.spark_post_send_transmission '{"content":"example_content","recipients":"example_recipients"}' --json
Shortcut
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 read
Parameters
limit, offset
Generic call
kosmo integrations:call spark-post.spark_post_list_webhooks '{"limit":1,"offset":1}' --json
Shortcut
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 read
Parameters
none
Generic call
kosmo integrations:call spark-post.spark_post_get_current_user '{}' --json
Shortcut
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
Schema command
kosmo integrations:schema spark-post.spark_post_list_sending_domains --json
ParameterTypeRequiredDescription
limit integer no Maximum number of sending domains to return (default: 100).
spark-post.spark_post_get_sending_domain 1 parameters
Schema command
kosmo integrations:schema spark-post.spark_post_get_sending_domain --json
ParameterTypeRequiredDescription
domain string yes The sending domain name to look up (e.g., "example.com").
spark-post.spark_post_list_templates 2 parameters
Schema command
kosmo integrations:schema spark-post.spark_post_list_templates --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema spark-post.spark_post_get_template --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema spark-post.spark_post_send_transmission --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema spark-post.spark_post_list_webhooks --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema spark-post.spark_post_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.