---
title: "POST /domains/{DomainName}/profiles/objects/merge"
method: POST
path: "/domains/{DomainName}/profiles/objects/merge"
---

# POST /domains/{DomainName}/profiles/objects/merge

`POST /domains/{DomainName}/profiles/objects/merge`

Runs an AWS Lambda job that does the following:

1.  All the profileKeys in the `ProfileToBeMerged` will be moved to the main profile.
    
2.  All the objects in the `ProfileToBeMerged` will be moved to the main profile.
    
3.  All the `ProfileToBeMerged` will be deleted at the end.
    
4.  All the profileKeys in the `ProfileIdsToBeMerged` will be moved to the main profile.
    
5.  Standard fields are merged as follows:
    
    1.  Fields are always "union"-ed if there are no conflicts in standard fields or attributeKeys.
        
    2.  When there are conflicting fields:
        
        1.  If no `SourceProfileIds` entry is specified, the main Profile value is always taken.
            
        2.  If a `SourceProfileIds` entry is specified, the specified profileId is always taken, even if it is a NULL value.
            

You can use MergeProfiles together with [GetMatches](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_GetMatches.html), which returns potentially matching profiles, or use it with the results of another matching system. After profiles have been merged, they cannot be separated (unmerged).

## Path parameters

- `DomainName` string, required

## Request body

- object
  - `MainProfileId` string, required — The identifier of the profile to be taken.
  - `ProfileIdsToBeMerged` Uuid[], required — The identifier of the profile to be merged into MainProfileId.
  - `FieldSourceProfileIds` object — A duplicate customer profile that is to be merged into a main profile.
    - `AccountNumber` string — A unique identifier for the account number field to be merged.
    - `AdditionalInformation` string — A unique identifier for the additional information field to be merged.
    - `PartyType` string — A unique identifier for the party type field to be merged.
    - `BusinessName` string — A unique identifier for the business name field to be merged.
    - `FirstName` string — A unique identifier for the first name field to be merged.
    - `MiddleName` string — A unique identifier for the middle name field to be merged.
    - `LastName` string — A unique identifier for the last name field to be merged.
    - `BirthDate` string — A unique identifier for the birthdate field to be merged.
    - `Gender` string — A unique identifier for the gender field to be merged.
    - `PhoneNumber` string — A unique identifier for the phone number field to be merged.
    - `MobilePhoneNumber` string — A unique identifier for the mobile phone number field to be merged.
    - `HomePhoneNumber` string — A unique identifier for the home phone number field to be merged.
    - `BusinessPhoneNumber` string — A unique identifier for the business phone number field to be merged.
    - `EmailAddress` string — A unique identifier for the email address field to be merged.
    - `PersonalEmailAddress` string — A unique identifier for the personal email address field to be merged.
    - `BusinessEmailAddress` string — A unique identifier for the party type field to be merged.
    - `Address` string — A unique identifier for the party type field to be merged.
    - `ShippingAddress` string — A unique identifier for the shipping address field to be merged.
    - `MailingAddress` string — A unique identifier for the mailing address field to be merged.
    - `BillingAddress` string — A unique identifier for the billing type field to be merged.
    - `Attributes` object — A unique identifier for the attributes field to be merged.

## Response `200`

Success

- MergeProfilesResponse
  - `Message` string — A message that indicates the merge request is complete.

## Other responses

- `480` — BadRequestException
- `481` — ResourceNotFoundException
- `482` — ThrottlingException
- `483` — InternalServerException

---

[API](https://skmtc.net/aws/apis/customer-profiles.md) · [All operations](https://skmtc.net/aws/apis/customer-profiles/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/customer-profiles/revisions/471944106c88/schema)
