# Customer.io

> Customer.io lifecycle email - manage customers, segments, campaigns, broadcasts, and events via the App API.

Lets an agent manage your Customer.io customer data and lifecycle messaging - look up and edit customers, work with segments, enroll people in automated campaigns, trigger one-time broadcasts, and track events.

## What it can do

| Method | What it does |
| --- | --- |
| `customerio_get_customer` | Get a customer by ID or email. |
| `customerio_create_or_update_customer` | Create or update a customer, including attributes and channel subscriptions. |
| `customerio_delete_customer` | Delete a customer by ID or email. |
| `customerio_search_customers` | Search customers by email, with optional limit and offset. |
| `customerio_list_segments` | List all segments. |
| `customerio_get_segment` | Get a single segment by ID. |
| `customerio_add_customers_to_segment` | Add customers to a segment. |
| `customerio_remove_customers_from_segment` | Remove customers from a segment. |
| `customerio_list_campaigns` | List automated campaigns. |
| `customerio_enroll_customer_in_campaign` | Enroll a customer in an automated campaign. |
| `customerio_unenroll_customer_from_campaign` | Unenroll a customer from a campaign. |
| `customerio_list_broadcasts` | List one-time broadcasts/sends. |
| `customerio_send_broadcast` | Trigger a broadcast send, optionally to specific customers. |
| `customerio_get_broadcast_metrics` | Get broadcast send metrics (opens, clicks, bounces, etc.). |
| `customerio_track_event` | Track a customer event/activity with optional custom properties. |

## How to get credentials

This connector uses a Customer.io **App API key** (Bearer token).

1. Open [your Customer.io API credentials](https://fly.customer.io/settings/api_credentials).
2. Go to **Settings - Account Settings - API Credentials - App API Keys**.
3. Create a new **App API key** and give it a name (e.g. *FlyMyAI Agent*).
4. Copy the generated token.

If your account's data region is the EU, note that so you can set the region field below; otherwise the default `us` is used.

## Fields to fill in FlyMyAI

| FlyMyAI field | Where it comes from |
| --- | --- |
| `CUSTOMERIO_API_KEY` | Settings - Account Settings - API Credentials - App API Keys |
| `CUSTOMERIO_REGION` *(optional)* | `us` (default) or `eu` - your account's data region |
