---
title: "Register a device token for push"
method: POST
path: "/api/users/registerDeviceToken"
tags: ["users"]
---

# Register a device token for push

`POST /api/users/registerDeviceToken`

Registers a device token for push. This will add the data if it doesn't exist yet. It will also update data fields on the device. Data will be merged; missing fields are not deleted. Also, note that there is a soft limit on the number of unique fields a user can have (default is 1,000). Types of data fields must match the types sent in previous requests, across all data fields in the project.<br/><br/>Learn about <a href="https://support.iterable.com/hc/articles/29156459027348">identifying users by <code>userId</code> and <code>email</code></a>.<br/><br/><b>Device limit</b>: Maximum of 500 devices per user profile. Endpoint returns a 400 response code when this limit has been exceeded.<br/><b>Rate limit</b>: 500 requests/second, per project.

## Request body

- RegisterDeviceTokenRequest
  - `device` Device, required
    - `applicationName` string, required — The Iterable push integration to associate with the device token. Usually matches the package name (or bundle ID) of the relevant mobile app. To check, navigate to <strong>Settings > Mobile Apps</strong>, open the mobile app, look at the <strong>Push</strong> section and find the <strong>Name</strong> column for the relevant push integration.
    - `dataFields` object
    - `platform` 'APNS' | 'APNS_SANDBOX' | 'GCM', required — The device platform
    - `token` string, required
  - `email` string — An email address that identifies a user profile in Iterable. Provide an <code>email</code> or a <code>userId</code> (but not both), depending on <a href="https://support.iterable.com/hc/articles/29156459027348">how your project identifies users</a>.
  - `preferUserId` boolean — Whether or not a new user should be created if the request includes a <code>userId</code> that doesn't yet exist in the Iterable project. Defaults to <code>false</code>. Only respected in API calls for <a href="https://support.iterable.com/hc/articles/29156459027348">email-based projects</a>.
  - `userId` string — A user ID that identifies a user profile in Iterable. Provide an <code>email</code> or a <code>userId</code> (but not both), depending on <a href="https://support.iterable.com/hc/articles/29156459027348">how your project identifies users</a>.

## Response `200`

successful operation

## Other responses

- `400` — Invalid parameters
- `401` — Invalid API key
- `409` — Email/userId conflict

---

[API](https://skmtc.net/iterable/apis/iterable-api.md) · [All operations](https://skmtc.net/iterable/apis/iterable-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/iterable/iterable-api/revisions/afaab604b58c/schema)
