---
title: "Merge profiles"
method: POST
path: "/merges"
tags: ["Merges"]
---

# Merge profiles

`POST /merges`

## Request

- Base URL: `/guest-profiles/v1` (relative, and the document’s source URL is not known)
- URL: `/guest-profiles/v1/merges`
- Auth: one of:
  - HTTP bearer
  - OAuth 2
    - Authorization code: `/oauth/authorize`
    - Token URL: `/oauth/token` scopes: `write:guest`

## Headers

- `X-Organization-Id` string, required

## Request body

- PostMergeProfilesRequest
  - `profileIds` string[]
  - `firstName` string: First name
  - `lastName` string: Last name
  - `email` string, email: Email address
  - `phone` string: Phone number
  - `cellPhone` string, nullable: Cellphone number
  - `birthday` string, date, nullable: Birthday
  - `gender` 'M' | 'W' | 'N/A', nullable: Gender
  - `photoId` string, nullable: Photo ID
  - `statusId` string, nullable: Profile Status ID
  - `country` string: Two digit Country Code. ISO 3166-1 alpha-2
  - `state` string, nullable: State
  - `city` string, nullable: City
  - `address1` string, nullable: Address line 1
  - `address2` string, nullable: Address Line 2
  - `zip` string, nullable: ZIP code
  - `documentType` 'na' | 'driver_licence' | 'student_id' | 'passport' | 'dni' | 'nie' | 'social_security_card': Document type
  - `documentNumber` string: Document number
  - `documentIssueDate` string, date, nullable: Document issue date
  - `documentIssuingCountry` string, nullable: Document issuing country code. ISO 3166-1 alpha-2
  - `documentExpirationDate` string, date, nullable: Document expiration date
  - `taxId` string, nullable: Tax ID
  - `companyName` string, nullable: Company name
  - `companyTaxId` string, nullable: Company tax ID
  - `isOptIn` boolean: Opt-in status

## Response `200`

Response

- ProfileMerge
  - `id` string: Merge unique identifier
  - `mergeAt` string, date: Merge date
  - `eventType` 'merge' | 'unmerge': Event type
  - `beforeMergeProfiles` ProfileResponse[]: For merges, the `before` property will contain the full list of profiles involved in the merge. For unmerges, the `before` property will contain the profile to unlink from a prior merge.
    - `photoId` number: Photo ID
    - `taxId` string: Tax ID
    - `companyTaxId` string: Company tax ID
    - `statusId` number: Profile Status ID. Deprecated: Use statuses instead.
    - `firstName` string: First name
    - `lastName` string: Last name
    - `email` string: Email address
    - `phone` string: Phone number
    - `cellPhone` string: Cellphone number
    - `birthday` string, date: Birthday
    - `gender` string: Gender
    - `companyName` string: Company name
    - `address1` string: Address line 1
    - `address2` string: Address line 2
    - `city` string: City
    - `country` string: Two digit Country Code. ISO 3166-1 alpha-2
    - `countryName` string: Country name
    - `state` string: State
    - `zip` string: ZIP code
    - `documentType` string: Document type
    - `documentNumber` string: Document number
    - `documentIssueDate` string, date: Document issue date
    - `documentIssuingCountry` string: Document issue country. ISO 3166-1 alpha-2
    - `documentExpirationDate` string, date: Document expiration date
    - `isOptIn` boolean: Opt-in status
    - `id` string: Profile's unique identifier
    - `organizationId` string: Organization ID
    - `statusName` string: Profile Status Name. Deprecated: Use statuses instead.
    - `statuses` object[]: All statuses for this profile across all properties
      - `id` integer: Status ID
      - `name` string: Status name
    - `isMerged` boolean: Merged status. Merged profiles are no longer active in the Cloudbeds system
    - `isRepeatGuest` boolean: Repeat-guest status
    - `dateCreated` string, date-time: Creation date. Date/Time string based on RFC 3339 (Y-m-dTH:i:sP)
    - `dateModified` string, date-time: Modification date. Date/Time string based on RFC 3339 (Y-m-dTH:i:sP)
    - `dateAnonymized` string, date-time: Anonymization date. Date/Time string based on RFC 3339 (Y-m-dTH:i:sP)
    - `parentId` string: Profile's parent unique identifier
    - `photo` ProfilePhoto
      - `fileId` string: Photo unique identifier
      - `path` string: Photo URL
      - `croppedImage` string: Cropped photo URL
      - `height` integer: Photo height
      - `width` integer: Photo width
      - `cropParam` object: Crop parameters
        - `width` number: Cropped photo width
        - `height` number: Cropped photo height
        - `x` number: X coordinate of the top-left corner of the cropped photo
        - `y` number: Y coordinate of the top-left corner of the cropped photo
    - `isAnonymizationAvailable` boolean: Anonymization availability status
  - `afterMergeProfiles` ProfileResponse[]: The `after` property will contain the single new profile after merge. The `after` property will contain the list of profiles after the unmerge operation is complete.
    - `photoId` number: Photo ID
    - `taxId` string: Tax ID
    - `companyTaxId` string: Company tax ID
    - `statusId` number: Profile Status ID. Deprecated: Use statuses instead.
    - `firstName` string: First name
    - `lastName` string: Last name
    - `email` string: Email address
    - `phone` string: Phone number
    - `cellPhone` string: Cellphone number
    - `birthday` string, date: Birthday
    - `gender` string: Gender
    - `companyName` string: Company name
    - `address1` string: Address line 1
    - `address2` string: Address line 2
    - `city` string: City
    - `country` string: Two digit Country Code. ISO 3166-1 alpha-2
    - `countryName` string: Country name
    - `state` string: State
    - `zip` string: ZIP code
    - `documentType` string: Document type
    - `documentNumber` string: Document number
    - `documentIssueDate` string, date: Document issue date
    - `documentIssuingCountry` string: Document issue country. ISO 3166-1 alpha-2
    - `documentExpirationDate` string, date: Document expiration date
    - `isOptIn` boolean: Opt-in status
    - `id` string: Profile's unique identifier
    - `organizationId` string: Organization ID
    - `statusName` string: Profile Status Name. Deprecated: Use statuses instead.
    - `statuses` object[]: All statuses for this profile across all properties
      - `id` integer: Status ID
      - `name` string: Status name
    - `isMerged` boolean: Merged status. Merged profiles are no longer active in the Cloudbeds system
    - `isRepeatGuest` boolean: Repeat-guest status
    - `dateCreated` string, date-time: Creation date. Date/Time string based on RFC 3339 (Y-m-dTH:i:sP)
    - `dateModified` string, date-time: Modification date. Date/Time string based on RFC 3339 (Y-m-dTH:i:sP)
    - `dateAnonymized` string, date-time: Anonymization date. Date/Time string based on RFC 3339 (Y-m-dTH:i:sP)
    - `parentId` string: Profile's parent unique identifier
    - `photo` ProfilePhoto
      - `fileId` string: Photo unique identifier
      - `path` string: Photo URL
      - `croppedImage` string: Cropped photo URL
      - `height` integer: Photo height
      - `width` integer: Photo width
      - `cropParam` object: Crop parameters
        - `width` number: Cropped photo width
        - `height` number: Cropped photo height
        - `x` number: X coordinate of the top-left corner of the cropped photo
        - `y` number: Y coordinate of the top-left corner of the cropped photo
    - `isAnonymizationAvailable` boolean: Anonymization availability status

---

[API](https://skmtc.dev/cloudbeds/apis/guest-profile-api.md) - [All operations](https://skmtc.dev/cloudbeds/apis/guest-profile-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cloudbeds/apis/guest-profile-api/revisions/df6e85914ec0?raw)
