Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Postmark

Scalekit connector
Open markdown

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

Tools
59
What they doRead · write · destructive
35 · 20 · 435 read20 write4 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 Postmark connection

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

    Console steps with screenshots

    Register your Scalekit environment with the Postmark connector so Scalekit can authenticate requests on your behalf. The connection name you create will be used to identify and invoke the connection programmatically. Then complete the configuration in your application as follows:

    1. Get your server API token

      • Go to Postmark and open the server you want to connect.
      • Go to the API Tokens tab. Postmark creates a default Server API token for every server — copy it, or click Create token for a dedicated one, for example named Agent Auth.
    2. Add the token in Scalekit

      • In Scalekit dashboard, go to AgentKit > Connections > Create Connection. Find Postmark and click Create.
      • Paste the Server API token you copied in step 1.
      • Click Save.
  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 = 'postmark'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Postmark:', 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: 'postmark_get_bounce_counts',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their Postmark credentials there. If your app already has a user's credentials, add the account from your backend instead, as the console steps above show. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • postmark_get_bounceRetrieve full details for a single bounce by its Postmark bounce ID, including bounce type, the affected email address, timestamp, description, and whether the address has been deactivated.Read-only

    Get Bounce

    Retrieve full details for a single bounce by its Postmark bounce ID, including bounce type, the affected email address, timestamp, description, and whether the address has been deactivated. Use postmark_list_bounces first to find the bounce ID you need.

    Inputs

    bounce_idintegerrequired
    The numeric ID of the bounce to retrieve, as returned by postmark_list_bounces. Example: 42.
  • postmark_get_bounce_countsGet bounce counts for a Postmark server broken down by day and by bounce type (e.g.Read-only

    Get Bounce Counts

    Get bounce counts for a Postmark server broken down by day and by bounce type (e.g. HardBounce, SoftBounce, Transient, SpamNotification) for the requested date range. Use this to diagnose deliverability issues over time. Optionally scope results to a specific tag or message stream; omit all filters to get all-time, all-tag, all-stream totals.

    Inputs

    fromdatestring
    Start date (inclusive) for the bounce-count range, formatted YYYY-MM-DD. If omitted, all bounce history up to todate is included.
    messagestreamstring
    Message stream ID to scope the bounce counts to (e.g. 'outbound' or 'broadcasts'). If omitted, counts are aggregated across all message streams.
    tagstring
    Tag to filter bounce counts by. Only bounced messages that were originally sent with this exact tag are counted. If omitted, all tags (and untagged messages) are included.
    todatestring
    End date (inclusive) for the bounce-count range, formatted YYYY-MM-DD. If omitted, counts run through today.
  • postmark_get_bounce_dumpRetrieve the raw source (full RFC 822 message content, including headers) of a bounced message by its Postmark bounce ID.Read-only

    Get Bounce Dump

    Retrieve the raw source (full RFC 822 message content, including headers) of a bounced message by its Postmark bounce ID. Use this to inspect exactly what was sent and why it may have bounced. Use postmark_list_bounces first to find the bounce ID you need.

    Inputs

    bounce_idintegerrequired
    The numeric ID of the bounce whose raw message source should be retrieved, as returned by postmark_list_bounces. Example: 42.
  • postmark_get_bulk_email_statusCheck the processing status of a previously submitted Bulk Email send: overall status (Accepted, Processing, or Completed), percent complete, and total message count.Read-only

    Get Bulk Email Status

    Check the processing status of a previously submitted Bulk Email send: overall status (Accepted, Processing, or Completed), percent complete, and total message count.

    Inputs

    bulk_request_idstringrequired
    The bulk request ID returned when the bulk send was submitted (Send Bulk Email).
  • postmark_get_click_browser_usageGet link click counts for a Postmark server broken down by browser family (e.g.Read-only

    Get Click Browser Usage

    Get link click counts for a Postmark server broken down by browser family (e.g. Chrome, Safari, Firefox, Edge) for the requested date range. Requires link tracking to have been enabled on the sent messages. Use this to understand which browsers your recipients use when clicking links. Optionally scope results to a specific tag or message stream; omit all filters to get all-time, all-tag, all-stream totals.

    Inputs

    fromdatestring
    Start date (inclusive) for the browser-usage range, formatted YYYY-MM-DD. If omitted, all history up to todate is included.
    messagestreamstring
    Message stream ID to scope the browser-usage counts to (e.g. 'outbound' or 'broadcasts'). If omitted, counts are aggregated across all message streams.
    tagstring
    Tag to filter browser-usage counts by. Only clicks for messages originally sent with this exact tag are counted. If omitted, all tags (and untagged messages) are included.
    todatestring
    End date (inclusive) for the browser-usage range, formatted YYYY-MM-DD. If omitted, counts run through today.
  • postmark_get_click_countsGet link click counts for a Postmark server broken down by day, reporting both unique clicks (one per recipient) and total clicks (including repeat clicks) for the requested date range.Read-only

    Get Click Counts

    Get link click counts for a Postmark server broken down by day, reporting both unique clicks (one per recipient) and total clicks (including repeat clicks) for the requested date range. Requires link tracking to have been enabled on the sent messages. Optionally scope results to a specific tag or message stream; omit all filters to get all-time, all-tag, all-stream totals.

    Inputs

    fromdatestring
    Start date (inclusive) for the click-count range, formatted YYYY-MM-DD. If omitted, all history up to todate is included.
    messagestreamstring
    Message stream ID to scope the click counts to (e.g. 'outbound' or 'broadcasts'). If omitted, counts are aggregated across all message streams.
    tagstring
    Tag to filter click counts by. Only clicks for messages originally sent with this exact tag are counted. If omitted, all tags (and untagged messages) are included.
    todatestring
    End date (inclusive) for the click-count range, formatted YYYY-MM-DD. If omitted, counts run through today.
  • postmark_get_click_location_statsGet link click counts for a Postmark server broken down by where in the email the clicked link was located: HTML body, HTML header, text body, or text header, for the requested date range.Read-only

    Get Click Location Stats

    Get link click counts for a Postmark server broken down by where in the email the clicked link was located: HTML body, HTML header, text body, or text header, for the requested date range. Requires link tracking to have been enabled on the sent messages. Use this to see whether recipients click links in headers vs. body content. Optionally scope results to a specific tag or message stream; omit all filters to get all-time, all-tag, all-stream totals.

    Inputs

    fromdatestring
    Start date (inclusive) for the click-location range, formatted YYYY-MM-DD. If omitted, all history up to todate is included.
    messagestreamstring
    Message stream ID to scope the click-location counts to (e.g. 'outbound' or 'broadcasts'). If omitted, counts are aggregated across all message streams.
    tagstring
    Tag to filter click-location counts by. Only clicks for messages originally sent with this exact tag are counted. If omitted, all tags (and untagged messages) are included.
    todatestring
    End date (inclusive) for the click-location range, formatted YYYY-MM-DD. If omitted, counts run through today.
  • postmark_get_click_platform_usageGet link click counts for a Postmark server broken down by platform (Desktop, Webmail, or Mobile) for the requested date range.Read-only

    Get Click Platform Usage

    Get link click counts for a Postmark server broken down by platform (Desktop, Webmail, or Mobile) for the requested date range. Requires link tracking to have been enabled on the sent messages. Use this to understand which platforms your recipients use when clicking links. Optionally scope results to a specific tag or message stream; omit all filters to get all-time, all-tag, all-stream totals.

    Inputs

    fromdatestring
    Start date (inclusive) for the click-platform-usage range, formatted YYYY-MM-DD. If omitted, all history up to todate is included.
    messagestreamstring
    Message stream ID to scope the click-platform-usage counts to (e.g. 'outbound' or 'broadcasts'). If omitted, counts are aggregated across all message streams.
    tagstring
    Tag to filter click-platform-usage counts by. Only clicks for messages originally sent with this exact tag are counted. If omitted, all tags (and untagged messages) are included.
    todatestring
    End date (inclusive) for the click-platform-usage range, formatted YYYY-MM-DD. If omitted, counts run through today.