# 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`](https://closingdealz.gitbook.io/product-docs/developers/api-endpoints/contact-request-object) 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"
}
```
