> For a complete page index, fetch https://developer.close.com/llms.txt

# List or filter all LeadMerge activities

GET https://api.close.com/api/v1/activity/lead_merge/

Reference: https://developer.close.com/api/resources/activities/lead-merges/list

## Authentication

- `Authorization` header (basic auth, required) — Use your API key as the username and leave the password empty.
- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Query parameters

- `_limit` (integer, optional, default: 100) — Number of results to return.
- `_skip` (integer, optional, default: 0) — Number of results to skip before returning, for pagination.
- `id__in` (list of string, optional, nullable) — Filter by activity IDs (comma-separated)
- `lead_id` (list of string, optional, nullable) — Filter by lead IDs (comma-separated)
- `contact_id` (list of string, optional, nullable) — Filter by contact IDs (comma-separated)
- `user_id` (list of string, optional, nullable) — Filter by user IDs (comma-separated)
- `organization_id` (string, optional, nullable)
- `_type` (list of string, optional, nullable) — Filter by activity type, e.g. Call (comma-separated)
- `date_created__gte` (datetime or date, optional)
- `date_created__lte` (datetime or date, optional)
- `date_created__gt` (datetime or date, optional)
- `date_created__lt` (datetime or date, optional)
- `activity_at__gte` (datetime or date, optional)
- `activity_at__lte` (datetime or date, optional)
- `activity_at__gt` (datetime or date, optional)
- `activity_at__lt` (datetime or date, optional)
- `_fields` (string, optional) — Comma-separated list of fields to include in the response.

## Response

### 200

Successful response

- `data` (list of object, required)
  - `_type` (string, required)
  - `activity_at` (datetime, required, nullable)
  - `contact_id` (string, required, nullable)
  - `created_by` (string, required, nullable)
  - `date_created` (datetime, required)
  - `date_updated` (datetime, required)
  - `destination_display_name` (string, required, nullable)
  - `destination_lead_id` (string, required)
  - `error_message` (string, required, nullable)
  - `id` (string, required)
  - `lead_id` (string, required, nullable)
  - `merge_status` (enum, required)
    - Allowed values: `pending`, `in_progress`, `completed`, `errored`
  - `organization_id` (string, required)
  - `source_display_name` (string, required, nullable)
  - `source_lead_id` (string, required)
  - `updated_by` (string, required, nullable)
  - `user_id` (string, required, nullable)
  - `users` (list of string, required)
  - `created_by_name` (string, optional, nullable)
  - `updated_by_name` (string, optional, nullable)
  - `user_name` (string, optional, nullable)
- `has_more` (boolean, required)

## Errors

### 400 Bad Request Error

Bad request

- `any`

### 401 Unauthorized Error

Unauthorized

- `any`

### 404 Not Found Error

Not found

- `any`

## Examples

**Response**

```json
{
  "data": [
    {
      "_type": "LeadMerge",
      "activity_at": "2013-02-01T01:05:04.070000+00:00",
      "contact_id": null,
      "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA",
      "date_created": "2013-02-01T01:05:04.070000+00:00",
      "date_updated": "2013-02-01T01:06:35.668000+00:00",
      "destination_display_name": "Destination Lead",
      "destination_lead_id": "lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O",
      "error_message": null,
      "id": "acti_asjiweURMfsLgKuYGqbQ4Qp7L5a16pQOcDfTgotqDak",
      "lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h",
      "merge_status": "in_progress",
      "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH",
      "source_display_name": "Source Lead",
      "source_lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h",
      "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA",
      "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA",
      "users": [],
      "created_by_name": "Stefan Wójcik",
      "updated_by_name": "Stefan Wójcik",
      "user_name": "Stefan Wójcik"
    }
  ],
  "has_more": false
}
```

**SDK Code**

```python activities.lead_merges_list_example
import requests

url = "https://api.close.com/api/v1/activity/lead_merge/"

response = requests.get(url, auth=("<CLOSE_API_KEY>", ""))

print(response.json())
```

```javascript activities.lead_merges_list_example
const url = 'https://api.close.com/api/v1/activity/lead_merge/';
const credentials = btoa("<CLOSE_API_KEY>:");

const options = {method: 'GET', headers: {Authorization: `Basic ${credentials}`}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go activities.lead_merges_list_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.close.com/api/v1/activity/lead_merge/"

	req, _ := http.NewRequest("GET", url, nil)

	req.SetBasicAuth("<CLOSE_API_KEY>", "")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby activities.lead_merges_list_example
require 'uri'
require 'net/http'

url = URI("https://api.close.com/api/v1/activity/lead_merge/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request.basic_auth("<CLOSE_API_KEY>", "")

response = http.request(request)
puts response.read_body
```

```java activities.lead_merges_list_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.close.com/api/v1/activity/lead_merge/")
  .basicAuth("<CLOSE_API_KEY>", "")
  .asString();
```

```php activities.lead_merges_list_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.close.com/api/v1/activity/lead_merge/', [
  'headers' => [
  ],
    'auth' => ['<CLOSE_API_KEY>', ''],
]);

echo $response->getBody();
```

```csharp activities.lead_merges_list_example
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://api.close.com/api/v1/activity/lead_merge/");
client.Authenticator = new HttpBasicAuthenticator("<CLOSE_API_KEY>", "");
var request = new RestRequest(Method.GET);

IRestResponse response = client.Execute(request);
```