Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to SendPulse

Scalekit connector
Open markdown

The SendPulse connector lets your AI agent act in each user's SendPulse account. Each user connects their own SendPulse access token once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 60 tools.

Tools
60
What they doRead · write · destructive
31 · 21 · 831 read21 write8 destructive
Users sign in with

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the SendPulse connection

    In AgentKit > Connections, create a SendPulse connection. The name you give it is the connection_name your code passes. See Configure connections.

  4. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'sendpulse'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize SendPulse:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'sendpulse_balance_get',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their SendPulse credentials there. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • sendpulse_balance_getGet the account balance and the plan limits and usage for email, SMTP and web push.Read-only

    Get Account Balance

    Get the account balance and the plan limits and usage for email, SMTP and web push. Returns an object with balance, email, smtp, push. Use sendpulse_balance_get to check credit before a large send.

    Inputs

    This tool takes no inputs.

  • sendpulse_blacklist_listList the email addresses on the account blacklist.Read-only

    List Blacklist

    List the email addresses on the account blacklist. Returns an array of objects. Use sendpulse_blacklist_list to check suppressed addresses for campaigns. Use sendpulse_smtp_unsubscribes_list for SMTP.

    Inputs

    This tool takes no inputs.

  • sendpulse_campaign_contact_getGet what happened to one recipient in a campaign (sent, delivered, opened, clicked, bounced).Read-only

    Get Campaign Result for Contact

    Get what happened to one recipient in a campaign (sent, delivered, opened, clicked, bounced). Returns an object with sent_date, global_status, global_status_explain, detail_status, detail_status_explain. Use sendpulse_campaign_contact_get to trace one recipient. Use sendpulse_contact_campaign_stats_get for all campaigns of an address.

    Inputs

    campaign_idintegerrequired
    Campaign ID, from sendpulse_campaigns_list. Example: 1234567
    emailstringrequired
    Recipient email address. Example: jane@example.com
  • sendpulse_campaign_getGet one campaign with its status and delivery statistics.Read-only

    Get Campaign

    Get one campaign with its status and delivery statistics. Returns an object with id, name, status. Use sendpulse_campaign_get to read results of a campaign. Use sendpulse_campaign_referrals_get for link clicks.

    Inputs

    campaign_idintegerrequired
    Campaign ID, from sendpulse_campaigns_list. Example: 1234567
  • sendpulse_campaign_referrals_getGet click counts for each link in a campaign.Read-only

    Get Campaign Link Clicks

    Get click counts for each link in a campaign. Returns an array of objects with link, count. Use sendpulse_campaign_referrals_get for link performance. Use sendpulse_campaign_get for overall statistics.

    Inputs

    campaign_idintegerrequired
    Campaign ID, from sendpulse_campaigns_list. Example: 1234567
  • sendpulse_campaigns_listList email campaigns with their status.Read-only

    List Campaigns

    List email campaigns with their status. Returns an array of objects with id, name, status. Use sendpulse_campaigns_list to find a campaign ID. Use sendpulse_campaign_get for its statistics.

    Inputs

    limitinteger
    Number of campaigns to return (up to 100). Example: 50
    offsetinteger
    Number of campaigns to skip. Example: 0
    orderstring
    Sort order by date. One of: asc, desc. Example: descone of ascdesc
    planedboolean
    If true, return only scheduled campaigns. Example: true
    statusstring
    Campaign status codes to include, comma-separated (for example 3 for sent). Example: 3
  • sendpulse_contact_campaign_stats_getGet campaign engagement statistics for one email address across campaigns.Read-only

    Get Contact Campaign Stats

    Get campaign engagement statistics for one email address across campaigns. Returns an object with statistic. Use sendpulse_contact_campaign_stats_get for a contact history. Use sendpulse_campaign_contact_get for one campaign.

    Inputs

    emailstringrequired
    Email address. Example: jane@example.com
  • sendpulse_contact_getFind every mailing list an email address is in, with its status and variables in each.Read-only

    Get Contact Lists

    Find every mailing list an email address is in, with its status and variables in each. Returns an array of objects with book_id, email. Use sendpulse_contact_get across all lists. Use sendpulse_list_contact_get for one list.

    Inputs

    emailstringrequired
    Email address. Example: jane@example.com