# Lead Request Object

### **Lead Record Fields**

This section outlines the fields available for creating or updating a lead in the **ClosingDealz CRM** via the API. Each field includes its expected data type, whether it is required or optional, and any specific constraints.

***

### **Fields**

| **Field Name**  | **Data Type**        | **Description**                                                                                                                                                    | **Constraints**       |
| --------------- | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------- |
| `company`       | Optional, `string`   | The name of the company associated with the lead.                                                                                                                  | Max length: 256       |
| `contacts`      | Optional, `array`    | A list of contact records. Each record should conform to the [`ContactRequestObject`](/product-docs/developers/api-endpoints/contact-request-object.md) structure. |                       |
| `industry`      | Optional, `string`   | The industry sector the lead's company operates in.                                                                                                                | Max length: 256       |
| `employeeCount` | Optional, `integer`  | The number of employees at the lead's company. Defaults to 1 if not provided.                                                                                      | Range: 1 to 5,000,000 |
| `website`       | Optional, `string`   | The URL of the lead's company website.                                                                                                                             | Max length: 512       |
| `linkedIn`      | Optional, `string`   | The LinkedIn profile URL for the company or a contact person.                                                                                                      | Max length: 512       |
| `twitter`       | Optional, `string`   | The Twitter handle of the company or contact person.                                                                                                               | Max length: 512       |
| `facebook`      | Optional, `string`   | The Facebook page URL of the company.                                                                                                                              | Max length: 512       |
| `email`         | Optional, `string`   | The primary email address of the company or contact person.                                                                                                        | Max length: 124       |
| `phoneNumber`   | Optional, `string`   | The contact phone number for the lead.                                                                                                                             | Max length: 64        |
| `address`       | Optional, `string`   | The physical address of the company.                                                                                                                               | Max length: 256       |
| `notes`         | Optional, `string`   | Any additional information or notes related to the lead.                                                                                                           | Max length: 6942      |
| `labels`        | Optional, `array`    | A list of tags or labels to categorize the lead.                                                                                                                   |                       |
| `date`          | Optional, `datetime` | The date when the lead was created or captured. Defaults to the current UTC date and time.                                                                         |                       |

***

### **Example JSON Payload for Creating a Lead**

```json
{
  "company": "Acme Corp",
  "contactPerson": [
    {
      "name": "John",
      "lastName": "Doe",
      "email": "jdoe@acmecorp.com",
      "phoneNumber": "+1234567890",
      "address": "123 Acme Way, Tech City",
      "linkedIn": "https://www.linkedin.com/in/johndoe",
      "twitter": "@johndoe",
      "role": "CEO",
      "dateCreated": "2024-03-14T12:34:56Z"
    }
  ],
  "industry": "Technology",
  "employeeCount": 100,
  "website": "https://www.acmecorp.com",
  "linkedIn": "https://www.linkedin.com/company/acmecorp",
  "twitter": "@acmecorp",
  "facebook": "https://www.facebook.com/acmecorp",
  "email": "info@acmecorp.com",
  "phoneNumber": "+1234567890",
  "address": "123 Acme Way, Tech City, TC 12345",
  "notes": "Met at TechCon 2024. Interested in enterprise solutions.",
  "labels": ["Enterprise", "Technology"],
  "date": "2024-03-14T12:34:56Z"
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://closingdealz.gitbook.io/product-docs/developers/api-endpoints/lead-request-object.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
