---
title: "Get All Company Merges"
method: GET
path: "/v2/company-merges"
tags: ["Company Merges"]
---

# Get All Company Merges

`GET /v2/company-merges`

Retrieve paginated company merges for the organization.


Returns all company merges initiated by users in your organization, including their current
status, the companies involved, and merge details. You can filter company merges using the `filter` query parameter. The filter parameter is a string that you can specify conditions based on the following properties:


| **Property Name** | **Type** | **Allowed Operators** | **Examples** |
|---|---|---|---|
| `status` | `enum` | `=` | `status=in-progress`, `status=success`, `status=failed` |
| `taskId` | `text` | `=` | `taskId=789e0123-e45b-67c8-d901-234567890123` |


Company merges are returned in reverse chronological order (most recent first).


Requires the "Manage duplicates" [permission](/pages/external-api-v2/permissions) and
organization admin role.

## Query parameters

- `cursor` string
- `limit` integer
- `filter` string

## Response `200`

OK

- CompanyMergeStatePaged — Paginated list of company merge states
  - `data` CompanyMergeState[], required — Array of company merge states
    - `id` integer, required — The unique identifier for the merge
    - `status` 'in-progress' | 'success' | 'failed', required — Current status of the merge
    - `taskId` string, uuid, required — Identifier for the task this merge belongs to
    - `startedAt` string, date-time, required — Timestamp when the merge started
    - `primaryCompanyId` integer, required — ID of the primary company that other profiles were merged into
    - `duplicateCompanyId` integer, required — ID of the duplicate company that was merged into the primary company
    - `completedAt` string, date-time, nullable, required — Timestamp when the merge completed (success or failure)
    - `errorMessage` string, nullable, required — Error message if the merge failed
  - `pagination` Pagination, required
    - `prevUrl` string, uri, nullable — URL for the previous page
    - `nextUrl` string, uri, nullable — URL for the next page

## Other responses

- `400` — Bad Request
- `403` — Forbidden
- `default` — Errors

---

[API](https://skmtc.net/affinity/apis/affinity-api-v2.md) · [All operations](https://skmtc.net/affinity/apis/affinity-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/affinity/affinity-api-v2/versions/4c2891c31b7f/schema)
