Skip to main content

Customer-Io

The Customer-Io agent connector is a Python package that equips AI agents to interact with Customer-Io through strongly typed, well-documented tools. It's ready to use directly in your Python app, in an agent framework, or exposed through an MCP.

Connector for the Customer.io App API, providing read access to campaigns, newsletters, segments, messages, activities, sender identities, snippets, collections, reporting webhooks, exports, and transactional message templates. Customer.io is a messaging platform that lets you send automated emails, push notifications, SMS, and in-app messages based on customer behavior. This connector retrieves data from the App API (not the Track API) and requires a Bearer-type App API key generated in your Customer.io workspace settings.

Example prompts

The Customer-Io connector is optimized to handle prompts like these.

  • List all campaigns in Customer.io
  • Show me all newsletters
  • What segments are defined in my workspace?
  • Get the details of campaign 42
  • List all sender identities
  • Show me all reporting webhooks
  • What snippets do we have?
  • List all collections
  • Show recent activities
  • Create a snippet called 'footer' with content '<p>Thanks!</p>'
  • Update the snippet 'header' to say 'Welcome back!'
  • Create a new collection called 'products'
  • Create a reporting webhook for email events
  • Create a manual segment called 'VIP Customers'
  • Export all customers matching a segment
  • Send a transactional email to [email protected]
  • Send an SMS notification to +15551234567
  • Send a push notification to user 123
  • Trigger broadcast campaign 42
  • List all transactional message templates
  • Get the details of transactional message 5
  • Show the content variants of transactional template 3
  • Update the subject of transactional content 139 in template 3
  • Which campaigns are currently active?
  • Find newsletters sent in the last month
  • What are the most recent email deliveries?
  • Which exports have completed?

Unsupported prompts

The Customer-Io connector isn't currently able to handle prompts like these.

  • Create a new campaign
  • Delete a segment
  • Delete a snippet
  • Delete a collection
  • Delete a reporting webhook
  • Delete a newsletter
  • Send a newsletter via API
  • Schedule a newsletter via API

Entities and actions

This connector supports the following entities and actions. For more details, see this connector's full reference documentation.

EntityActions
CampaignsList, Get, Context Store Search
Campaign ActionsList, Get, Context Store Search
NewslettersList, Get, Context Store Search
SegmentsList, Create, Get
MessagesList, Get
ActivitiesList
Sender IdentitiesList, Get
SnippetsList, Create, Update
CollectionsList, Create, Get, Update
Reporting WebhooksList, Create, Get, Update
ExportsList, Create, Get
Transactional MessagesList, Get
Transactional Message ContentsList, Update
Transactional EmailCreate
Transactional SmsCreate
Transactional PushCreate
Transactional Inbox MessageCreate
Broadcast TriggerCreate

Customer-Io API docs

See the official Customer-Io API reference.

SDK installation

uv pip install airbyte-agent-sdk

SDK usage

Connectors can run in hosted or open source mode.

Hosted

In hosted mode, API credentials are stored securely in Airbyte Agents. You provide your Airbyte credentials instead. If your Airbyte client can access multiple organizations, also set organization_id.

This example assumes you've already authenticated your connector with Airbyte. See Authentication to learn more about authenticating. If you need a step-by-step guide, see the hosted execution tutorial.

The connect() factory returns a fully typed CustomerIoConnector and reads AIRBYTE_CLIENT_ID / AIRBYTE_CLIENT_SECRET from the environment:

Pydantic AI
from pydantic_ai import Agent
from airbyte_agent_sdk import connect
from airbyte_agent_sdk.connectors.customer_io import CustomerIoConnector

connector = connect("customer-io", workspace_name="<your_workspace_name>")

agent = Agent("openai:gpt-4o")

@agent.tool_plain
@CustomerIoConnector.tool_utils
async def customer_io_execute(entity: str, action: str, params: dict | None = None):
return await connector.execute(entity, action, params or {})

Or pass credentials explicitly (equivalent, useful when you're not loading them from the environment):

Pydantic AI
from pydantic_ai import Agent
from airbyte_agent_sdk.connectors.customer_io import CustomerIoConnector
from airbyte_agent_sdk.types import AirbyteAuthConfig

connector = CustomerIoConnector(
auth_config=AirbyteAuthConfig(
workspace_name="<your_workspace_name>",
organization_id="<your_organization_id>", # Optional for multi-org clients
airbyte_client_id="<your-client-id>",
airbyte_client_secret="<your-client-secret>"
)
)

agent = Agent("openai:gpt-4o")

@agent.tool_plain
@CustomerIoConnector.tool_utils
async def customer_io_execute(entity: str, action: str, params: dict | None = None):
return await connector.execute(entity, action, params or {})

Open source

In open source mode, you provide API credentials directly to the connector.

Pydantic AI
from pydantic_ai import Agent
from airbyte_agent_sdk.connectors.customer_io import CustomerIoConnector
from airbyte_agent_sdk.connectors.customer_io.models import CustomerIoAuthConfig

connector = CustomerIoConnector(
auth_config=CustomerIoAuthConfig(
app_api_key="<Your Customer.io App API key. Generate one in your workspace settings at Settings > API Credentials > App API Key.
>"
)
)

agent = Agent("openai:gpt-4o")

@agent.tool_plain
@CustomerIoConnector.tool_utils
async def customer_io_execute(entity: str, action: str, params: dict | None = None):
return await connector.execute(entity, action, params or {})

Authentication

For all authentication options, see the connector's authentication documentation.

Version information

Connector version: 1.0.0