Skip to main content
POST
/
track#identity-create-alias
Create Alias
curl --request POST \
  --url 'https://{region}.mixpanel.com/track#identity-create-alias' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data 'data={
    "event": "$create_alias",
    "properties": {
        "distinct_id": "other_distinct_id",
        "alias": "your_id",
        "token": "YOUR_PROJECT_TOKEN"
    }
}
' \
  --data strict=0
1
The $create_alias event payload is only useful for projects using the Original ID Merge system and the Legacy ID Management System; it has no functionality in the Simplified ID Merge system. Please review this section of our documentation for more information.
You can also use the import endpoint: https://api.mixpanel.com/import/
Mixpanel supports adding an alias to a distinct id. An alias is a new value that will be interpreted by Mixpanel as an existing value. That means that you can send messages to Mixpanel using the new value, and Mixpanel will continue to use the old value for calculating funnels and retention reports, or applying updates to user profiles. Alias Criteria:
960
Required Event Object attributes
Event Object propertyTypeDescription
eventString
required
value must be:
$create_alias
propertiesObject
required
properties.distinct_idString
required
A distinct_id to be merged with the alias.
properties.aliasString
required
A new distinct_id to be merged with the original distinct_id. Each alias can only map to one distinct_id.
properties.tokenString
required
The project token.

Body

application/x-www-form-urlencoded
data
string<blob>
default:{ "event": "$create_alias", "properties": { "distinct_id": "other_distinct_id", "alias": "your_id", "token": "YOUR_PROJECT_TOKEN" } }
required

A JSON object with the required Event Object fields and any additional event properties.

strict
integer

If present and equal to 1, Mixpanel will validate the provided records and return a JSON object with per-record error messages for records that fail validation.

Required range: 0 <= x <= 1

Response

  • 1 - All data objects provided are valid. This does not signify a valid project token or secret.
  • 0 - One or more data objects in the body are invalid.

The response is of type enum<integer>.

Available options:
1,
0