---
title: "Merge accounts"
method: POST
path: "/accounts/merge"
tags: ["accounts"]
---

# Merge accounts

`POST /accounts/merge`

Merges one or more accounts into a surviving account. Issues, contacts, opportunities, domains, channels, external IDs, and other associated data are transferred to the surviving account. Tags and custom field values of the merged accounts are not transferred. The merged accounts are permanently deleted. This cannot be undone. Accounts are merged sequentially, each in its own transaction; if a merge fails partway through, accounts already merged are not restored.

**Rate limit:** 10 requests per minute

## Request body

- MergeAccountsRequest
  - `merge_account_ids` string[], required — The IDs of the accounts to merge into the surviving account. These accounts are permanently deleted after their data is transferred. The number of accounts to merge must be between 1 and 100.
  - `merge_into_account_id` string, required — The ID of the account that will survive the merge and receive the merged data.

## Response `200`

- MergeAccountsResponseBody
  - `data` Account
    - `channels` Channel[] — Channels associated with the account.
      - `channel_id` string — The ID of the channel. If this is a Microsoft Teams channel, the ID must be in the format of `{team_id}|{channel_id}`.
      - `channel_name` string — The human-readable name of the channel.
      - `channel_url` string — The direct URL to the channel in its source app, if available.
      - `is_internal` boolean — Whether this is an internal channel (e.g., a triage channel) as opposed to a customer-facing channel.
      - `is_primary` boolean — Whether this channel is the primary channel for the account.
      - `mirror_to` MirrorChannel
        - `channel_id` string — The ID of the channel. If this is a Microsoft Teams channel, the ID must be in the format of `{team_id}|{channel_id}`.
        - `source` string — The source, which can be one of `["slack", "microsoft_teams", "discord"]`.
      - `source` string — The source, which can be one of `["slack", "microsoft_teams", "discord"]`.
    - `created_at` string — The creation time of the account.
    - `crm_settings` CRMSettings
      - `details` CRMDetails[] — List of all CRM details for the account.
        - `id` string — The ID of the CRM for that source.
        - `source` string — The source of the CRM.
    - `custom_fields` object — Custom fields associated with the account.
    - `domain` string — The primary domain of the account.
    - `domains` string[] — The list of domains associated with the account.
    - `external_ids` ExternalID[] — External IDs associated with the account.
      - `external_id` string — The external ID. Must be unique per object type (ex. account).
      - `label` string — The label of the external ID. Must be unique per object.
    - `id` string — The ID of the account.
    - `is_disabled` boolean — Whether the account is disabled.
    - `latest_customer_activity_time` string — The time of the latest customer activity.
    - `name` string — The name of the account.
    - `owner` MiniUser
      - `email` string — The email of the user.
      - `id` string — The ID of the user.
    - `primary_domain` string — The primary domain of the account.
    - `tags` string[] — Tags associated with the account.
    - `type` string — The type of the account.
    - `updated_at` string — The time the account was last updated.
  - `request_id` string — The request ID for tracking.

## Other responses

- `400` — The request was invalid or could not be completed.
- `404`
- `500` — An unexpected internal error occurred.

---

[API](https://skmtc.net/usepylon/apis/pylon-api.md) · [All operations](https://skmtc.net/usepylon/apis/pylon-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/usepylon/pylon-api/versions/999c51740b4e/schema)
