> ## Documentation Index
> Fetch the complete documentation index at: https://developers.leadwaycrm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Custom Field Folder

> <div>     <p> Create Custom Field Folder </p>      <div>       <span style= "display: inline-block;                   width: 25px; height: 25px;                   background-color: yellow;            

\<div>
\<p> Create Custom Field Folder \</p>
\<div>
\<span style= "display: inline-block;
width: 25px; height: 25px;
background-color: yellow;
color: black;
font-weight: bold;
font-size: 24px;
text-align: center;
line-height: 22px;
border: 2px solid black;
border-radius: 10%;
margin-right: 10px;">
!
\</span>
\<span>
\<strong>
Only supports Custom Objects and Company (Business) today. Will be extended to other Standard Objects in the future.
\</strong>
\</span>
\</div>
\</div>

```http theme={null}
POST https://services.leadconnectorhq.com/custom-fields/folder
```

## Autorización

<ParamField header="Authorization" type="string" required>
  Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
</ParamField>

<ParamField header="Version" type="string" required default="2021-07-28">
  Versión de la API.
</ParamField>

## Body

<ParamField body="objectKey" type="string" required default="custom_object.pet">
  The key for your custom object. This key uniquely identifies the custom object. Example: "custom\_object.pet" for a custom object related to pets.
</ParamField>

<ParamField body="name" type="string" required default="Name">
  Field name
</ParamField>

<ParamField body="locationId" type="string" required default="ve9EPM428h8vShlRW1KT">
  Account Id
</ParamField>

## Respuestas

<Accordion title="201 - Successful response">
  <ResponseField name="id" type="string" required>
    Unique identifier of the object
  </ResponseField>

  <ResponseField name="objectKey" type="string" required default="custom_object.pet">
    The key for your custom object. This key uniquely identifies the custom object. Example: "custom\_object.pet" for a custom object related to pets.
  </ResponseField>

  <ResponseField name="locationId" type="string" required default="ve9EPM428h8vShlRW1KT">
    Account Id
  </ResponseField>

  <ResponseField name="name" type="string" required default="Name">
    Field name
  </ResponseField>

  ```json theme={null}
  {
    "id": "string",
    "objectKey": "custom_object.pet",
    "locationId": "ve9EPM428h8vShlRW1KT",
    "name": "Name"
  }
  ```
</Accordion>

<Accordion title="400 - Bad Request">
  ```json theme={null}
  {}
  ```
</Accordion>

<Accordion title="401 - Unauthorized">
  ```json theme={null}
  {}
  ```
</Accordion>

## Ejemplo

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST 'https://services.leadconnectorhq.com/custom-fields/folder' \
    -H 'Authorization: Bearer YOUR_TOKEN' \
    -H 'Version: 2021-07-28' \
    -H 'Content-Type: application/json' \
    -d '{
    "objectKey": "custom_object.pet",
    "name": "Name",
    "locationId": "ve9EPM428h8vShlRW1KT"
  }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://services.leadconnectorhq.com/custom-fields/folder', {
    method: 'POST',
    headers: {
      Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
      Version: '2021-07-28',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({"objectKey": "custom_object.pet", "name": "Name", "locationId": "ve9EPM428h8vShlRW1KT"}),
  });
  const data = await response.json();
  ```

  ```python Python theme={null}
  import os, requests
  response = requests.request(
      'POST',
      'https://services.leadconnectorhq.com/custom-fields/folder',
      headers={
          'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
          'Version': '2021-07-28',
          'Content-Type': 'application/json',
      },
      json={"objectKey": "custom_object.pet", "name": "Name", "locationId": "ve9EPM428h8vShlRW1KT"},
  )
  data = response.json()
  ```

  ```php PHP theme={null}
  <?php
  $ch = curl_init('https://services.leadconnectorhq.com/custom-fields/folder');
  curl_setopt_array($ch, [
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_CUSTOMREQUEST => 'POST',
      CURLOPT_HTTPHEADER => [
          'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
          'Version: 2021-07-28',
          'Content-Type: application/json',
      ],
      CURLOPT_POSTFIELDS => json_encode({'objectKey': 'custom_object.pet', 'name': 'Name', 'locationId': 've9EPM428h8vShlRW1KT'}),
  ]);
  $data = json_decode(curl_exec($ch), true);
  ```
</CodeGroup>
