> This page is part of the [Customer.io documentation](https://docs.customer.io). For the complete index, see [llms.txt](https://docs.customer.io/llms.txt).
> Last updated: November 16, 2026
> To take actions in Customer.io from an agent, use the [Customer.io CLI](https://docs.customer.io/ai/cli/get-started.md) or the [MCP server](https://docs.customer.io/ai/mcp/get-started.md).
> This page has tabbed examples for: Auto-initialization, Manual initialization. Add `?tab=<name>` to the URL to get only that tab, and repeat it for more than one, for example `?tab=auto-initialization&tab=manual-initialization`.

# Quick start guide

Set up your integration with an AI agent

Connect your AI coding agent to Customer.io’s [MCP](https://docs.customer.io/ai/mcp/get-started/) or the [CLI](https://docs.customer.io/ai/cli/get-started/#setup-cli). When you add this integration in the Customer.io UI, you’ll see a prompt under **Set up with an agent** that you can pass to your coding agent. With the Customer.io MCP or CLI tools, these prompts can help you set up your integration with minimal effort.

## Setup process overview

Expo provides a managed framework to help you build React Native mobile apps. Our Expo plugin relies on our React Native SDK. When you run the prebuild, we’ll generate the native files you’ll need to integrate Customer.io push notifications in your app. Then you’ll add calls to your app to `identify` people, `track` their activity, and listen for notifications.

1.  [Install the SDK.](#install)
2.  [Identify and Track](#identify-and-track)
3.  [Push Notifications](#push-notifications)
4.  [In-App](#in-app)

## 1\. Install the SDK

1.  If you haven’t already gotten a *CDP API key*, you’ll need to add a new *Expo* integration to your Customer.io workspace. This “integration” represents your app in Customer.io and provides you the CDP API key that you’ll use to initialize your app. See [Get your CDP API key](https://docs.customer.io/integrations/sdk/expo/getting-started/auth/#get-your-cdp-api-key) for details.

2.  Install the Customer.io Expo plugin and React Native SDK.

    ```
    npx expo install customerio-expo-plugin customerio-reactnative
    ```

    Install the correct `customerio-reactnative` version

    The Customer.io Expo plugin requires an exact version of `customerio-reactnative`. If npm reports an `ERESOLVE` peer dependency conflict, you’ve installed a `customerio-reactnative` version the Expo plugin doesn’t support. See [npm version conflict when installing or updating](https://docs.customer.io/integrations/sdk/expo/getting-started/troubleshooting/#npm-version-conflict) for help resolving the conflict.

3.  Configure your *CDP API key* and *site ID*.

    *   **CDP API Key**: You’ll find this key in the **[*Expo* integration](https://fly.customer.io/workspaces/last/journeys/integrations/all/overview)** that you created in [step 1 of this section](#install).
    *   **Site ID**: You’ll find this value in your integrations under **[Customer.io API: Track](https://fly.customer.io/workspaces/last/settings/api_credentials)**.
4.  Initialize React Native SDK

    <!-- tabs -->

    <!-- tab: Auto-initialization -->

    #### Auto-initialization

    **Note:** Auto-initialization works with every Expo SDK version that version 4.x of the plugin supports (Expo SDK 54 or later). You can still initialize the SDK manually instead.

    Add React Native SDK configuration to your `app.json` file:

    ```
    {
       "expo": {
          "plugins": [
             [
                "customerio-expo-plugin",
                {
                   "config": {
                      "cdpApiKey": "<CDP API KEY>",
                      "siteId": "<SITE ID>", // Optionally, you can enable in-app messaging by adding site ID
                      "region": "us" // use "eu" if your workspace is in EU region
                   }
                }
             ]
          ]
       }
    }
    ```

    See [Configuration Options](https://docs.customer.io/integrations/sdk/expo/getting-started/packages-options/#auto-initialization-configuration-options-expo-53) for more details.

    <!-- /tab -->

    <!-- tab: Manual initialization -->

    #### Manual initialization

    Add your *CDP API key* and *site ID* to your `.env` file.

    ```
    EXPO_PUBLIC_CDP_API_KEY=<CDP API KEY>
    EXPO_PUBLIC_SITE_ID=<SITE ID>
    ```

    Ensure the SDK is initialized in your app. You can call the `initialize` method from your components or services. We recommend initializing the SDK in the `useEffect` hook of your main component or layout file.

    ```
    import { CioConfig, CustomerIO } from "customerio-reactnative";

    useEffect(() => {
       const initializeCustomerIO = () => {
          const config: CioConfig = {
             cdpApiKey: process.env.EXPO_PUBLIC_CDP_API_KEY,
             region: "us", // use "eu" if your workspace is in EU region
             // Optionally, you can enable in-app messaging by adding the site ID
             inApp: {
                siteId: process.env.EXPO_PUBLIC_SITE_ID,
             }
          };
          CustomerIO.initialize(config);
       };
       initializeCustomerIO();
    }, []);
    ```

    <!-- /tab -->

    <!-- /tabs -->

5.  You must also add push notification options to your `app.json` file to build the native files, even if you don’t use Customer.io push notifications in your app. See [Push Notifications](#push-notifications) for more information, and then run the prebuild command.

    ```
    npx expo prebuild
    ```

6.  Run your application using `npx expo run:ios` or `npx expo run:android` instead of using the dev server via `npx expo start`. You need to use these commands so that the plugin can build native files that let your app receive push notifications and in-app messages.

Also track location and geofences

Want to react when someone enters or leaves a real-world place—a store, a venue, a neighborhood? The SDK’s Location and Geofence modules do that. They need location permissions and some native setup, so they aren’t part of the steps above. See [geofencing](https://docs.customer.io/integrations/sdk/expo/tracking/geofencing/) to get started, or the [packages and configuration reference](https://docs.customer.io/integrations/sdk/expo/getting-started/packages-options/) for every option.

## 2\. Identify and Track

1.  Identify a user in your app using the `CustomerIO.identify` method. You *must* identify a user before you can send push notifications and personalized in-app messages.

    ```
    import { CustomerIO } from "customerio-reactnative";

    const identifyUserExample = () => {
       CustomerIO.identify({
          userId: 'expo-test-user@example.com',
          traits: {
             firstName: 'John',
             lastName: 'Doe',
             email: 'expo-test-user@example.com',
             subscriptionStatus: 'active',
          },
       });
       console.log('User identified successfully');
    };
    ```

2.  Track a custom event using the `CustomerIO.track` method. Events help you trigger personalized automations and track user activity.

    ```
    import { CustomerIO } from "customerio-reactnative";

    const trackCustomEventExample = () => {
       CustomerIO.track('purchased_item', {
          product: 'Premium Subscription',
          price: 99.99,
          currency: 'USD'
       });
       console.log('Custom event tracked successfully');
    };
    ```

3.  Track screen views to automatically trigger in-app messages associated with specific screens.

    ```
    import { CustomerIO } from "customerio-reactnative";

    const trackScreenViewExample = () => {
       CustomerIO.screen('ProductDetails');
       console.log('Screen view tracked successfully');
    };
    ```

## 3\. Push Notifications

1.  Configure push notifications for iOS and Android. Update your `app.json` file with the following configuration:

    <!-- tabs -->

    <!-- tab: Auto-initialization -->

    #### Auto-initialization

    ```
    {
       "expo": {
          ...Other options
          "plugins": [
             [
                "customerio-expo-plugin",
                {
                   "config": {
                      "cdpApiKey": "<CDP API KEY>",
                      "region": "us" // us or eu
                   },
                   "android": {
                      "googleServicesFile": "./files/google-services.json"
                   },
                   "ios": {
                      "pushNotification": {
                         "useRichPush": true
                      }
                   }
                }
             ]
          ]
       }
    }
    ```

    <!-- /tab -->

    <!-- tab: Manual initialization -->

    #### Manual initialization

    ```
    {
       "expo": {
          ...Other options
          "plugins": [
             [
                "customerio-expo-plugin",
                {
                   "android": {
                      "googleServicesFile": "./files/google-services.json"
                   },
                   "ios": {
                      "pushNotification": {
                         "useRichPush": true,
                         "env": {
                            "cdpApiKey": "<CDP API KEY>",
                            "region": "us" // us or eu
                         }
                      }
                   }
                }
             ]
          ]
       }
    }
    ```

    <!-- /tab -->

    <!-- /tabs -->

2.  Upload your push service credentials in Customer.io under **[Settings > Workspace Settings > Push](https://fly.customer.io/workspaces/last/settings/actions/push/ios)**.

    *   **iOS**: upload your Apple Push Notification certificate (`.p8` file).
    *   **Android**: upload your server key json file (`.json` format).

See [Push Notifications](https://docs.customer.io/integrations/sdk/expo/push-notifications/) for detailed configuration options.

## 4\. In-App

1.  To enable in-app messaging, all you need to do is add the site ID. Remember, you’ll find your site ID under **[Integrations > Customer.io API: Track](https://fly.customer.io/workspaces/last/settings/api_credentials)** in the *Connections* tab.

2.  Ensure that the SDK is initialized with the site ID in your app:

    <!-- tabs -->

    <!-- tab: Auto-initialization -->

    #### Auto-initialization

    Add `siteId` to your `app.json` config:

    ```
    {
       "expo": {
          "plugins": [
             [
                "customerio-expo-plugin",
                {
                   "config": {
                      "cdpApiKey": "<CDP API KEY>",
                      "siteId": "<SITE ID>",
                      "region": "us"
                   }
                }
             ]
          ]
       }
    }
    ```

    <!-- /tab -->

    <!-- tab: Manual initialization -->

    #### Manual initialization

    Add `siteId` to your environment variables and initialization config. You can call the `initialize` method from your components or services:

    ```
    EXPO_PUBLIC_SITE_ID=<SITE ID>
    ```

    ```
    import { CioConfig, CustomerIO } from "customerio-reactnative";
    import { useEffect } from "react";

    useEffect(() => {
       const initializeCustomerIO = () => {
          const config: CioConfig = {
             cdpApiKey: process.env.EXPO_PUBLIC_CDP_API_KEY,
             inApp: {
                siteId: process.env.EXPO_PUBLIC_SITE_ID,
             }
          };

          CustomerIO.initialize(config);
       };
       initializeCustomerIO();
    }, []);
    ```

    <!-- /tab -->

    <!-- /tabs -->

See [In-App Messages](https://docs.customer.io/messaging/channels/in-app/send-in-app-message/) for more details.
