Merge duplicate people
Merge two customer profiles together. The payload contains primary and secondary profile objects. The primary profile remains after the merge and the secondary is deleted. This operation is not reversible.
The primary profile must already exist in Customer.io for the merge operation to work. If the primary profile doesn't exist, your request won't do anything.
If you perform requests concurrently or in rapid succession, you could create a race condition where the primary profile doesn't exist yet. For example, if you identify a person and send a request to this endpoint immediately, the primary profile might not exist when we process your merge request.
The following information is merged into the primary profile from the secondary profile:
- Attributes that are not set, or are empty, on the primary.
- The most recent 30-days of event history. Events merged from the secondary person cannot trigger campaigns.
- Manual segments that the primary person did not already belong to.
- Message delivery history.
- Campaign journeys that the primary person has not entered. If the secondary person has started a journey that the primary person has not, the primary person continues on that campaign journey after the merge. If the secondary person has completed journeys that the primary person has not, the primary person gains these historical journeys after the merge. This may be important for determining entry (or re-entry) criteria for subsequent campaigns, segments, etc.
Provide identifiers for the primary and secondary people you want to merge together.
- primaryrequired
The person that you want to remain after the merge, identified by one of
id,email, orcio_id. This person receives information from the secondary person in the merge.If email is disabled as an identifier in your workspace settings, then you must reference people by
idorcio_id. Under How to Modify,idmust be set to "Reference people by cio_id" for a successful merge.The person that you want to remain after the merge, identified by one of
id,email, orcio_id. This person receives information from the secondary person in the merge.If email is disabled as an identifier in your workspace settings, then you must reference people by
idorcio_id. Under How to Modify,idmust be set to "Reference people by cio_id" for a successful merge.- idType: string
The ID of a customer profile, analogous to a "person" in the UI.
- secondaryrequired
The person that you want to delete after the merge, identified by one of
id,email, orcio_id. This person's information is merged into the primary person's profile and then it is deleted.If email is disabled as an identifier in your workspace settings, then you must reference people by
idorcio_id. Under How to Modify,idmust be set to "Reference people by cio_id" for a successful merge.The person that you want to delete after the merge, identified by one of
id,email, orcio_id. This person's information is merged into the primary person's profile and then it is deleted.If email is disabled as an identifier in your workspace settings, then you must reference people by
idorcio_id. Under How to Modify,idmust be set to "Reference people by cio_id" for a successful merge.- idType: string
The ID of a customer profile, analogous to a "person" in the UI.
- 200
A successful request returns an empty object response.
- application/json
- 401
Unauthorized request. Make sure that you provided the right credentials.
curl https://track.customer.io/api/v1/merge_customers \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic username:password' \
--data '{
"primary": {
"email": "cool.person@company.com"
},
"secondary": {
"email": "cperson@gmail.com"
}
}'
A successful request returns an empty object response.