latestSwagger 2.02026-08-10148196271.0 KB

afaab604b58c

users

Update user data

Updates user data or adds a user if none exists. Data is merged - missing fields are not deleted. Please note there is a soft limit (default: 1,000) on the number of unique fields users can have. Types of data fields must match the types sent in previous requests, across all data fields in the project.<br/>Processing time varies based on the current load for Iterable's back-end services. To avoid race conditions, provide a buffer of at least 60 seconds between this request and subsequent dependent requests, such as <code>POST /api/email/target.</code><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>Rate limit</b>: 500 requests/second, per project.

post/api/users/update

Request body

createNewFieldsboolean

Whether new fields should be ingested and added to the schema. Defaults to project's setting to allow or drop unrecognized fields.

dataFieldsobject

Data to store on the user profile identified by <code>userId</code> or <code>email</code>.

emailstring

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>.

mergeNestedObjectsboolean

Merge top-level objects instead of overwriting them. Defaults to <code>false</code>. For example, if a user profile has data <code>{"mySettings":{"mobile":true}}</code> and the request has data <code>{"mySettings":{"email":true}}</code>, merging results in <code>{"mySettings":{"mobile":true,"email":true}}</code>.

preferUserIdboolean

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>.

userIdstring

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

successful operation