This API will either create a new user if it doesn't already exist or update an existing one with the attributes provided. You can then use these attributes as macros in messages or build segments to send targeted campaigns and journeys. This data cannot contain any sensitive or special categories of information as defined in applicable data protection and privacy laws, including the California Consumer Privacy Act (CCPA) and California Privacy Rights Act (CPRA). See a list of specific categories of data you cannot share with Attentive here.
Creates or updates a single user record, including associated attributes, subscriptions, and identifiers. If a user with the provided identifiers already exists, their information will be updated; otherwise, a new user will be created.
There is a limit of 100 of custom attributes that can be created. If intending to update an existing attribute, the name of the key must match the name of the existing attribute. If an existing attribute does not exist, a new attribute will be created with the given key as the name. Attributes with enumerated values must have a value that matches an existing enum value; new enum values will not be created. Attempting to pass custom attributes as an array or a map such as ["New York City]
or {"favorite city": "Boston"}
will result in a 400 error.
attributes:write
subscriptions:write
) object Personal details about the user. These attributes will take priority over custom properties. All fields are considered optional. | |
Array of objects An array of subscription details, defining how the user prefers to receive communications. Notes:
| |
object Contains various identifiers used to uniquely identify the user. Notes:
|
Accepted
Invalid parameter in request query or body
Unauthorized
Access Denied
The specified resource was not found
The user has sent too many requests in a given amount of time
Internal Server Error
{- "attributes": {
- "firstName": "John",
- "lastName": "Smith",
- "demographic": {
- "language": "English/American",
- "dateOfBirth": "2022-11-08",
- "age": 29,
- "organization": "Acme Sports",
- "title": "Mr",
}, - "location": {
- "address1": "456 Elm Avenue",
- "address2": "Suite 300",
- "city": "Brooklyn",
- "state": "NY",
- "zip": "11222",
- "latitude": "40.730610",
- "longitude": "-73.935242",
- "country": "US",
- "region": "AU-NSW",
- "timezone": "EST"
}, - "locale": {
- "language": "French",
- "country": "CA"
}, - "custom": {
- "lucky number": 6,
- "favorite color": "green",
- "has pets": true
}
}, - "subscriptions": [
- {
- "signUpSourceId": "string",
- "channel": "TEXT",
- "singleOptIn": true
}
], - "identifiers": {
- "email": "jsmith@attentive.com",
- "phone": "+15008675309",
- "shopifyId": "345678901",
- "klaviyoId": "a1b2c3d4e5f6a7b8c9d0e1f2",
- "clientUserId": "freeform-client-id",
- "customIdentifiers": [
- {
- "key": "loyalty_points_id",
- "value": "ADFK4D7D"
}
]
}
}
{- "success": true,
- "message": "string"
}