KosmoKrator

marketing

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.

7 functions 6 read 1 write API key auth

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 use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
api_key SPARK_POST_API_KEY Secret secret yes API Key
url SPARK_POST_URL URL url no API Base URL

Call SparkPost Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call spark-post.spark_post_list_sending_domains '{
  "limit": 1
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:spark-post spark_post_list_sending_domains '{
  "limit": 1
}' --json

Agent Discovery Commands

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

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to SparkPost.

spark-post.spark_post_list_sending_domains

Read read

List sending domains configured in SparkPost. Returns domain names along with verification and DKIM signing status.

Parameters
limit

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

spark-post.spark_post_get_sending_domain

Read read

Get details for a specific sending domain in SparkPost. Returns verification status, DKIM signing info, and SPF records.

Parameters
domain

Generic CLI call

kosmo integrations:call spark-post.spark_post_get_sending_domain '{"domain":"example_domain"}' --json

Provider shortcut

kosmo integrations:spark-post spark_post_get_sending_domain '{"domain":"example_domain"}' --json

spark-post.spark_post_list_templates

Read read

List email templates in SparkPost. Returns template IDs, names, and published status.

Parameters
limit, offset

Generic CLI call

kosmo integrations:call spark-post.spark_post_list_templates '{"limit":1,"offset":1}' --json

Provider shortcut

kosmo integrations:spark-post spark_post_list_templates '{"limit":1,"offset":1}' --json

spark-post.spark_post_get_template

Read read

Get a specific email template by ID from SparkPost. Can retrieve the draft or published version.

Parameters
id, draft

Generic CLI call

kosmo integrations:call spark-post.spark_post_get_template '{"id":"example_id","draft":true}' --json

Provider shortcut

kosmo integrations:spark-post spark_post_get_template '{"id":"example_id","draft":true}' --json

spark-post.spark_post_send_transmission

Write write

Send an email transmission via SparkPost. Provide sender address, subject, content (HTML and/or text), and a list of recipients.

Parameters
content, recipients

Generic CLI call

kosmo integrations:call spark-post.spark_post_send_transmission '{"content":"example_content","recipients":"example_recipients"}' --json

Provider shortcut

kosmo integrations:spark-post spark_post_send_transmission '{"content":"example_content","recipients":"example_recipients"}' --json

spark-post.spark_post_list_webhooks

Read read

List webhooks configured in SparkPost. Returns webhook IDs, target URLs, and subscribed event types.

Parameters
limit, offset

Generic CLI call

kosmo integrations:call spark-post.spark_post_list_webhooks '{"limit":1,"offset":1}' --json

Provider shortcut

kosmo integrations:spark-post spark_post_list_webhooks '{"limit":1,"offset":1}' --json

spark-post.spark_post_get_current_user

Read read

Get current SparkPost account information. Returns account status, subscription plan, and usage details.

Parameters
none

Generic CLI call

kosmo integrations:call spark-post.spark_post_get_current_user '{}' --json

Provider 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

List sending domains configured in SparkPost. Returns domain names along with verification and DKIM signing status.

Operation
Read read
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

Get details for a specific sending domain in SparkPost. Returns verification status, DKIM signing info, and SPF records.

Operation
Read read
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

List email templates in SparkPost. Returns template IDs, names, and published status.

Operation
Read read
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

Get a specific email template by ID from SparkPost. Can retrieve the draft or published version.

Operation
Read read
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

Send an email transmission via SparkPost. Provide sender address, subject, content (HTML and/or text), and a list of recipients.

Operation
Write write
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": "[email protected]", "name": "User"}}]

spark-post.spark_post_list_webhooks

List webhooks configured in SparkPost. Returns webhook IDs, target URLs, and subscribed event types.

Operation
Read read
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

Get current SparkPost account information. Returns account status, subscription plan, and usage details.

Operation
Read read
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.