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

# Retrieve a custom field schema

GET https://api.close.com/api/v1/custom_field_schema/{object_type}/

Reference: https://developer.close.com/api/resources/custom-fields/custom-field-schemas/get

## Authentication

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

## Request

### Path parameters

- `object_type` (string, required)

## Response

### 200

Successful response

## Examples

**Response**

```json
{
  "fields": [
    {
      "accepts_multiple_values": false,
      "choices": null,
      "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA",
      "date_created": "2014-11-07T05:06:09.422000+00:00",
      "date_updated": "2014-11-10T20:56:16.784000+00:00",
      "description": "The number of users in the company",
      "editable_with_roles": [],
      "id": "cf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c",
      "name": "# of users",
      "organization_id": "orga_vfvFDAKGLybddKDJn8n7ElZZ3qyRF3QI8fJxTSAYr5X",
      "type": "number",
      "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA"
    },
    {
      "accepts_multiple_values": false,
      "associations": [
        {
          "editable_with_roles": [],
          "object_type": "lead",
          "required": false
        },
        {
          "editable_with_roles": [],
          "object_type": "contact",
          "required": false
        },
        {
          "custom_activity_type_id": "actitype_2FqdeKTAEfMTwD4SVWwXqX",
          "editable_with_roles": [],
          "object_type": "custom_activity_type",
          "required": true
        }
      ],
      "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk",
      "date_created": "2021-04-10T17:36:09.235000+00:00",
      "date_updated": "2021-04-10T17:36:09.235000+00:00",
      "description": "User responsible for this Lead/Contact/Activity.",
      "id": "cf_aU54Bvr6Rw8UBHh7zRboL3PYhbOVJl3XvwgPm3jgaKq",
      "name": "Owner",
      "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH",
      "type": "user",
      "updated_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk"
    }
  ],
  "name": "Lead",
  "object_type": "lead",
  "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH"
}
```

**SDK Code**

```python custom_field_schemas_get_example
import requests

url = "https://api.close.com/api/v1/custom_field_schema/object_type/"

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

print(response.json())
```

```javascript custom_field_schemas_get_example
const url = 'https://api.close.com/api/v1/custom_field_schema/object_type/';
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_field_schemas_get_example
package main

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

func main() {

	url := "https://api.close.com/api/v1/custom_field_schema/object_type/"

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

url = URI("https://api.close.com/api/v1/custom_field_schema/object_type/")

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_field_schemas_get_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_field_schema/object_type/")
  .basicAuth("<CLOSE_API_KEY>", "")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

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

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

```csharp custom_field_schemas_get_example
using RestSharp;
using RestSharp.Authenticators;

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

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