> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mavera.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Customer.io

> Integrate Mavera with Customer.io — campaign metric analysis, attribute-based personas, and webhook-driven research triggers

Pull data from **Customer.io** (Campaign Metrics, Customer Attributes, Reporting Webhooks) → analyze with **Mavera** (Mave Agent, Custom Personas, Chat, Generate) → get persona-validated messaging strategies, audience clusters, and automated retention research.

<Info>
  **Customer.io API** — Two APIs: **Track** (`https://track.customer.io/api/`) uses HTTP Basic auth (Site ID : API Key), \~1,000 req/sec. **App** (`https://api.customer.io/v1/`) uses Bearer Token, 10 req/sec. Campaign metrics live in the App API; event tracking and customer attribute reads use Track.
</Info>

***

## Prerequisites

<Steps>
  <Step title="Customer.io API credentials">Create a [Track API key](https://customer.io/docs/api/#section/Track-API) (Site ID + API Key) and an [App API key](https://customer.io/docs/api/#section/App-API) (Bearer Token) from your Customer.io workspace settings.</Step>
  <Step title="Mavera API key">Get your key from [Mavera dashboard](https://app.mavera.io/settings/api-keys).</Step>

  <Step title="Environment variables">
    ```bash theme={"dark"}
    export CIO_SITE_ID="your_site_id"
    export CIO_API_KEY="your_api_key"
    export CIO_APP_KEY="your_app_api_key"
    export MAVERA_API_KEY="mvra_live_xxxxx"
    ```
  </Step>
</Steps>

***

## Jobs

| # | Job                                                                                                   | Customer.io Data            | Mavera Surface        | Output                       |
| - | ----------------------------------------------------------------------------------------------------- | --------------------------- | --------------------- | ---------------------------- |
| 1 | [Campaign Event Analysis → Messaging Strategy](/integrations/customer-io/campaign-messaging-strategy) | Campaign metrics            | Mave Agent + Generate | New message variations       |
| 2 | [Customer Attribute Personas](/integrations/customer-io/attribute-personas)                           | App API customer attributes | Custom Personas       | Attribute-clustered personas |
| 3 | [Webhook Event → Mave Research Trigger](/integrations/customer-io/webhook-mave-trigger)               | Reporting webhooks          | Mave Agent            | Retention research           |

***

## Rate Limits & Production Notes

| Endpoint                       | Limit           | Strategy                       |
| ------------------------------ | --------------- | ------------------------------ |
| Track API (identify/track)     | \~1,000 req/sec | Generous; batch where possible |
| App API (campaigns, customers) | 10 req/sec      | 120ms delay; retry on 429      |
| Segment membership             | 10 req/sec      | Paginate with `next` cursor    |
| Reporting webhooks             | N/A (push)      | Queue high-volume events       |

<Warning>
  The **App API** at 10 req/sec is the bottleneck. Individual customer attribute lookups are the most expensive pattern. For bulk operations, use Customer.io's [Data Export](https://customer.io/docs/data-out/) or segment-level APIs instead of per-customer calls.
</Warning>

**Production checklist:**

* Store `CIO_SITE_ID`, `CIO_API_KEY`, `CIO_APP_KEY`, and `MAVERA_API_KEY` in a secrets manager — never commit tokens.
* Implement webhook signature verification with `CIO_WEBHOOK_SECRET` in production.
* For webhook receivers, deploy behind a load balancer and use a message queue to decouple event ingestion from Mave research calls.
* Monitor Mavera credits at [Dashboard](https://app.mavera.io/settings/usage).
* Cache customer attributes locally if running persona creation frequently — App API rate limits make per-customer lookups expensive.

***

## What's Next

<CardGroup cols={3}>
  <Card title="All Integrations" icon="plug" href="/integrations" />

  <Card title="Customer.io API" icon="message" href="https://customer.io/docs/api/" />

  <Card title="Personas" icon="user" href="/features/personas" />

  <Card title="Mave Agent" icon="brain" href="/features/mave-agent" />

  <Card title="Generate" icon="wand-magic-sparkles" href="/features/generate" />

  <Card title="Focus Groups" icon="users" href="/features/focus-groups" />
</CardGroup>
