Create New User Aliases
POST https://{{instance_url}}/users/alias/new
Use this endpoint to add new user aliases for existing identified users, or to create new unidentified users.
Adding a user alias for an existing user requires an
external_id
to be included in the new user alias object. If theexternal_id
is present in the object but there is no user with thatexternal_id
, the alias will not be added to any users. If anexternal_id
is not present, a user will still be created, but will need to be identified later. You can do this using theIdentifying Usersand theusers/identify
endpoint
Creating a new alias-only user requires theexternal_id
to be omitted from the new user alias object. Once the user is created, use the/users/track
endpoint to associate the alias-only user with attributes, events and purchases, and the/users/identify
endpoint to identify the user with anexternal_id
.
Request Parameters
Parameter | Required | Data Type | Description |
---|---|---|---|
user_aliases | Yes | Array of new user alias objects | See user alias object |
Request Components
- User Alias Object
For more information onalias_name
andalias_label
, check out our User Aliases documentation.
Request Body
{"user_aliases"=>[{"external_id"=>"external_identifier", "alias_name"=>"example_name", "alias_label"=>"example_label"}]}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Authorization | string |