User Properties

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.

Create or update a single user with attributes, subscriptions, and identifiers

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.

Request
Security:
OAuthFlow (attributes:writesubscriptions:write)
Request Body schema: application/json
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:

  • A legal disclosure is required when a user is opted-in programmatically.

  • By default, if a subscription already exists, it will try and record the attempt to create the subscription again. For TEXT subscriptions, this may result in a message being sent to the person indicating that they are already subscribed.

  • Requests to opt-in subscribers must contain a sign-up source id.

    • The unique identifier of a sign-up source can be found in the Sign-up Units tab of the Attentive platform in the ID column. If this value is provided in the request, then this sign-up unit will be used for opting in the user in the request.
  • Callers of this endpoint have the option to omit signUpSourceId and, instead, provide both a locale and a subscriptionType (see below for field details). Given the locale and subscription type, Attentive will resolve any matching API opt-in units. To opt-in a user to a subscription without a signUpSourceId and exclusively based on locale and subscription type, there must be exactly one API sign-up unit that matches the provided locale and subscription type. Conversely, requests that contain a locale and a subscription type that do not have a corresponding sign-up unit or that have multiple matching sign-up units will receive a 400 response and will not opt a user into a subscription.

  • Phone numbers must be submitted in e164 format.

    • valid examples: +19148440001, +442071838750, +551155256325
    • invalid examples: 19148440001, +1---914---844---0001, 1 () 914 844 0001
object

Contains various identifiers used to uniquely identify the user.

Notes:

  • Sending duplicate values could lead to unintentionally bridging users together.
  • Don't use customIdentifiers to send attributes (e.g., first name, last name). To send those types of attributes, add to the attributes payload.
  • Avoid sending null values or empty strings. If you don't have a valid identifier, you should omit the field from the payload.
Responses
202

Accepted

400

Invalid parameter in request query or body

401

Unauthorized

403

Access Denied

404

The specified resource was not found

429

The user has sent too many requests in a given amount of time

500

Internal Server Error

post/v2/user/attributes
Request samples
application/json
{
  • "attributes": {
    },
  • "subscriptions": [
    ],
  • "identifiers": {
    }
}
Response samples
application/json
{
  • "success": true,
  • "message": "string"
}