> ## Documentation Index
> Fetch the complete documentation index at: https://docs.revyops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Merge People

> Merges all people records in `person_ids` into the first id in the array. The first id becomes the primary person record and all contacts from the remaining people records are reassigned to it.



## OpenAPI

````yaml POST /public/people/merge
openapi: 3.0.3
info:
  title: RevyOps API
  version: 1.0.0
servers:
  - url: https://app.revyops.com/api
security:
  - ApiKeyAuth: []
paths:
  /public/people/merge:
    post:
      tags:
        - public
      description: >-
        Merges all people records in `person_ids` into the first id in the
        array. The first id becomes the primary person record and all contacts
        from the remaining people records are reassigned to it.
      operationId: Merge people
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PersonMerge'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PersonMerge'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PersonMerge'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactPersonMergeResponse'
          description: ''
        '400':
          description: Bad Request. Invalid merge payload.
        '403':
          description: Forbidden. Missing authentication credentials or invalid API key.
        '404':
          description: >-
            Not Found. One or more people records were not found for this
            client.
        '500':
          description: Internal Server Error. An unexpected error occurred on the server.
components:
  schemas:
    PersonMerge:
      type: object
      properties:
        person_ids:
          type: array
          items:
            type: integer
            minimum: 1
          minItems: 2
        first_name:
          type: string
        last_name:
          type: string
      required:
        - person_ids
    ContactPersonMergeResponse:
      type: object
      properties:
        primary_person_id:
          type: integer
        merged_person_ids:
          type: array
          items:
            type: integer
        relinked_contacts:
          type: integer
      required:
        - merged_person_ids
        - primary_person_id
        - relinked_contacts
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````