> 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: September 14, 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).

# Identify people

Use `CustomerIO.identify()` to identify a person. You need to identify a mobile user before you can send them messages or track events for things they do in your app.

This page is part of a setup flow for the SDK. Before you continue, make sure you've implemented previous features—i.e. you can't identify people before you initialize the SDK!

## Identify a person

Identifying a person:

1.  Adds or updates the person in your workspace. This is basically the same as an [`identify` call to our server-side API](https://docs.customer.io/integrations/api/track/tag/track-customers/identify/).
2.  Saves the person's information on the device. Future calls to the SDK reference the identified person. For example, after you identify a person, any events that you track are automatically associated with that person.
3.  Associates the current device token with the person.

You can only identify one customer at a time. The SDK "remembers" the most recently-identified customer. If you identify person A, and then call the identify function for person B, the SDK "forgets" person A and assumes that person B is the current app user. You can also [stop identifying a person](#clearIdentify), which you might do when someone logs off or stops using your app for a significant period of time.

An identify request takes two parameters:

*   **userId** (Required): The unique value representing a person—an ID, email address, or the [cio\_id](https://docs.customer.io/journeys/people/manage/identifying-people/#cio_id)
*   **traits** (Optional): An object containing [attributes](https://docs.customer.io/journeys/people/manage/attributes/) that you want to add to, or update on, a person

```
CustomerIO.instance.identify(userId: email, traits: {
  "name": user.displayName,
  "email": user.email,
  "age": user.age,
});
```

### Update a person’s attributes

You store information about a person in Customer.io as [attributes](https://docs.customer.io/journeys/people/manage/attributes/) . When you call the `identify()` function, you can update a person’s attributes in Customer.io.

If you’ve already identified a person, and they update their preferences, provide additional information about themselves, or perform other attribute-changing actions, you can update their attributes with `profileAttributes`.

You only need to pass the attributes that you want to create or modify to `setProfileAttributes`. For example, if you identify a new person with the attribute `{"first_name": "Dana"}`, and then you call `CustomerIO.instance.setProfileAttributes(traits: {"favorite_food": "pizza"});`, the person will gain the `favorite_food` attribute but `first_name` attribute will still be `Dana`.

```
CustomerIO.instance.setProfileAttributes(traits: {
  "first_name": "Cool",
  "last_name": "User",
  "is_premium": false,
});
```

### Device attributes

By default (if you don’t set `.autoTrackDeviceAttributes(false)` in your config), the SDK automatically collects a series of [attributes](https://docs.customer.io/journeys/people/manage/attributes/) for each device. You can use these attributes in [segments](https://docs.customer.io/journeys/segmentation/data-driven-segments/) and other automation workflow conditions to target the device owner, just like you would use a person’s other attributes. You cannot, however, use device attributes to personalize messages with [liquid](https://docs.customer.io/journeys/liquid/using-liquid) yet.

Along with these attributes, we automatically set a `last_used` timestamp for each device indicating when the device owner was last identified, and the `last_status` of a push notification you sent to the device. You can also set your own custom device attributes. You’ll see a person’s devices and each device’s attributes when you go to **Journeys > People > Select a person**, and click **Devices**. You can store [up to 25 devices for each person](https://docs.customer.io/messaging/channels/push/developer-guide/#identify-device-tokens). If a person already has 25 devices and you add another, you’ll remove the oldest device (determined by the `last_used` timestamp).

 ![device attributes on a person](https://docs.customer.io/images/device-attributes.png)

Your integration shows device attributes in the `context` object

When you inspect calls from the SDK (in your integration’s data in tab), you’ll see device information in the `context` object. We flatten the device attributes that you send into your workspace, so that they’re easier to use in [segments](https://docs.customer.io/journeys/segmentation/segments/) . For example, `context.network.cellular` becomes `network_cellular`.

*   idstringrequired

    The unique device identifier. This is an APNs token, an FCM registration token, or a [Firebase Installation ID (FID)](https://docs.customer.io/messaging/channels/push/developer-guide/#device-ids).

*   platformstringrequired

    The device/messaging platform.

    Accepted values: `ios`, `android`

*   attributesobject

    Attributes that you can reference to segment your audience—like a person's attributes, but specific to a device. These can be either the attributes defined below or custom key-value attributes.

    *   \_last\_statusstring

        The delivery status of the last message sent to the device—sent, bounced, or suppressed. An empty string indicates that that the device hasn't received a push yet.

        Accepted values: , `bounced`, `sent`, `suppressed`

    *   app\_identifierstring

        The app that the device belongs to—the **Bundle ID / App identifier** you entered with that app's push credentials. If you have more than one app, we use this attribute to send push notifications to the right app. A device without an app identifier receives push notifications you send to your [default app](https://docs.customer.io/messaging/channels/push/getting-started/#the-default-app).

    *   app\_versionstring

        The version of your app that a customer uses. You might target app versions to let people know when they need to update, or expose them to new features when they do.

    *   cio\_sdk\_versionstring

        The version of the Customer.io SDK in the app.

    *   device\_localestring

        The device's [IETF language code](https://docs.customer.io/journeys/channels/localization/getting-started/#supported-languages), such as `en-MX` or `es-ES`.

    *   device\_modelstring

        The model of the device a person uses.

    *   device\_osstring

        The operating system, including the version, on the device.

    *   network\_bluetoothboolean

        If `true`, the device's bluetooth connection is on.

    *   network\_cellularboolean

        If `true`, the device's cellular connection is on.

    *   network\_wifiboolean

        If `true`, the device's WiFi connection is on.

    *   push\_enabledstring

        If `"true"`, the device is opted-in and can receive push notifications.

        Accepted values: `true`, `false`

    *   screen\_heightinteger

        The height of the device's screen in pixels.

    *   screen\_widthinteger

        The width of the device's screen in pixels.

    *   timezonestring

        The time zone of the device.

    *   Custom Device Attributes \*string

        Custom properties that you want to associate with the device.

*   last\_usedinteger(unix timestamp)

    The `timestamp` when you last identified this device. If you don't pass a timestamp when you add or update a device, we use the time of the request itself. Our SDKs identify a device when a person launches their app.

#### Set custom device attributes

You can also set custom device attributes with the `setDeviceAttributes` method. You might do this to save app preferences, time zone, or other custom values specific to the device. Like profile attributes, you can pass nested JSON to device attributes.

However, before you set custom device attributes, consider whether the attribute is specific to the `device` or if it applies to the person more broadly. Device tokens are ephemeral—they can change based on user behavior, like when a person uninstalls and reinstalls your app. If you want an attribute to persist beyond the life of the device, you should [apply it to the person](#update-person) rather than the device.

```
const deviceAttributes = {
  "type" : "primary_device",
  "parentObject" : {
    "childProperty" : "someValue",
  },
};
CustomerIO.instance.setDeviceAttributes(attributes: deviceAttributes);
```

#### Disable automatic device attribute collection

By default, the SDK automatically collects the device [attributes](https://docs.customer.io/journeys/people/manage/attributes/) [defined above](#device-attributes). You can disable the `autoTrackDeviceAttributes` setting to prevent the SDK from automatically collecting these attributes.

```
CustomerIO.initialize(
  config: CustomerIOConfig(
      cdpApiKey: '<your API Key>',
      autoTrackDeviceAttributes: false,
      inAppConfig: InAppConfig(siteId: '<your siteId>'),
  ),
);
```

#### Manually add device to person

In the standard flow, identifying a person automatically associates the token with the identified person in your workspace. If you need to manually add or update the device elsewhere in your code, call `CustomerIO.instance.registerDeviceToken(token)`.

## Stop identifying a person

When a person logs out, or does something else to tell you that they no longer want to be tracked, you should stop identifying them.

Use `clearIdentify()` to stop identifying the previously identified person (if there was one).

```
CustomerIO.instance.clearIdentify();
```

### Identify a different person

If you want to identify a new person—like when someone switches profiles on a streaming app, etc—you can simply call `identify()` for the new person. The new person then becomes the currently-identified person, with whom all new information—messages, events, etc—is associated.

```
CustomerIO.instance.identify(identifier: "new.person@example.com", attributes: {"first_name": "New", "last_name": "Person"});
```
