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

# List Custom Object instances

GET https://api.close.com/api/v1/custom_object/

The `lead_id` parameter is required. If you want to retrieve all Custom Object instances regardless of the lead, you will need to use [Advanced Filtering](https://developer.close.com/api/resources/advanced-filtering).

Custom Fields values appear in the format: `custom.{custom_field_id}`. See [Custom Fields](https://developer.close.com/api/resources/custom-fields/custom-fields-custom-object).

Back references to each Custom Object are not collected in this response. If you need to access this information, please use the `back_reference_fields` on the Custom Object Type and [Advanced Filtering](https://developer.close.com/api/resources/advanced-filtering) to search for objects that reference the Custom Object Instance.

Reference: https://developer.close.com/api/resources/custom-objects/list

## Authentication

- `Authorization` header (basic auth, required) — Use your API key as the username and leave the password empty.
- `Authorization` header (bearer token, required)

## Request

### Query parameters

- `lead_id` (string, required)
- `custom_object_type_id` (string, optional, nullable)

## Response

### 200

Successful response

## Examples

**Response**

```json
{
  "data": [
    {
      "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk",
      "custom.cf_jnxTQDKnSxCEBtD5dvZdNgTzC3CqeyWUyU349PBA9Wf": "custobj_v0VS1AZAg8LjnpBm1hZz83UZ3yWK0n9SdVV5i8yC6he",
      "custom_object_type_id": "cotype_1h5m6uHM9BZOpwVhyRJb4Y",
      "date_created": "2020-08-04T16:45:35.367000+00:00",
      "date_updated": "2020-08-04T17:37:56.439000+00:00",
      "id": "custobj_5J7mimiIKB1tQ3gVduP0c4UhXbNj5ptMLteAWRJu7Sf",
      "lead_id": "lead_hwnL36A2iEMSLIlmGhsdrcmOJzTUzqEHwr66wrA1K2T",
      "name": "Resource",
      "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH",
      "updated_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk"
    },
    {
      "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk",
      "custom.cf_UpyNBvr6Rw8UBHh7zRboL3PYhbOVJl3XvwgPm3jg64S": "cont_aHtUny9tps9LjJ8Cc5SP1NY3826j6PdNML9ZfkSUHyc",
      "custom.cf_cSh3fWT3rEJ1BFSezme2YAG6bPrZV5wUWKKrW4iN19g": "Potential",
      "custom_object_type_id": "cotype_4hQsScWF3hnUOyngoaAV00",
      "date_created": "2020-08-04T16:45:29.612000+00:00",
      "date_updated": "2020-08-04T16:46:02.705000+00:00",
      "id": "custobj_v0VS1AZAg8LjnpBm1hZz83UZ3yWK0n9SdVV5i8yC6he",
      "lead_id": "lead_hwnL36A2iEMSLIlmGhsdrcmOJzTUzqEHwr66wrA1K2T",
      "name": "Primary Account",
      "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH",
      "updated_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk"
    }
  ],
  "has_more": false
}
```

**SDK Code**

```python custom_objects_list_example
import requests

url = "https://api.close.com/api/v1/custom_object/"

querystring = {"lead_id":"lead_id"}

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

print(response.json())
```

```javascript custom_objects_list_example
const url = 'https://api.close.com/api/v1/custom_object/?lead_id=lead_id';
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 custom_objects_list_example
package main

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

func main() {

	url := "https://api.close.com/api/v1/custom_object/?lead_id=lead_id"

	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 custom_objects_list_example
require 'uri'
require 'net/http'

url = URI("https://api.close.com/api/v1/custom_object/?lead_id=lead_id")

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 custom_objects_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/custom_object/?lead_id=lead_id")
  .basicAuth("<CLOSE_API_KEY>", "")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

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

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

```csharp custom_objects_list_example
using RestSharp;
using RestSharp.Authenticators;

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

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