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

# Leads

> Submit new leads into the FieldIU sales pipeline via the API

Leads represent potential customers or business opportunities. Use this endpoint to submit leads directly into the FieldIU sales pipeline.

***

## Create Lead

<api-reference>POST /api/v1/leads</api-reference>

Creates a new lead record in FieldIU.

### Request Body

<ParamField body="firstName" type="string">
  Lead's first name
</ParamField>

<ParamField body="lastName" type="string">
  Lead's last name
</ParamField>

<ParamField body="title" type="string">
  Lead's job title
</ParamField>

<ParamField body="companyName" type="string">
  Company or organization name
</ParamField>

<ParamField body="email" type="string">
  Lead's email address
</ParamField>

<ParamField body="mobilePhone" type="string">
  Lead's mobile phone number
</ParamField>

<ParamField body="businessPhone" type="string">
  Lead's business phone number
</ParamField>

<ParamField body="leadSource" type="integer">
  Source of the lead. See [NullableOflead\_leadsourcecode](/developer-guide/models#leadrequest) for valid values
</ParamField>

<ParamField body="accountType" type="integer">
  Account type. See [NullableOflead\_ha\_accounttype](/developer-guide/models#leadrequest) for valid values
</ParamField>

<ParamField body="rating" type="integer">
  Lead quality rating. See [NullableOflead\_leadqualitycode](/developer-guide/models#leadrequest) for valid values
</ParamField>

<ParamField body="estimatedValue" type="number">
  Estimated deal value (double precision float)
</ParamField>

<ParamField body="estimatedCloseDate" type="string">
  Estimated close date in ISO 8601 format (e.g. `2024-09-30T00:00:00Z`)
</ParamField>

<ParamField body="buildingLocation" type="string">
  Building or location name
</ParamField>

<ParamField body="street1" type="string">
  Street address line 1
</ParamField>

<ParamField body="street2" type="string">
  Street address line 2
</ParamField>

<ParamField body="city" type="string">
  City
</ParamField>

<ParamField body="postalCode" type="string">
  Postal / ZIP code
</ParamField>

<ParamField body="state" type="string">
  State or province
</ParamField>

<ParamField body="country" type="string">
  Country
</ParamField>

### Example Request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://integration.fieldiu.online/api/v1/leads \
    -H "Content-Type: application/json" \
    -H "X-API-KEY: your_api_key" \
    -H "X-ORG-ID: your_org_id" \
    -d '{
      "firstName": "John",
      "lastName": "Doe",
      "title": "Facilities Manager",
      "companyName": "Acme Corporation",
      "email": "john.doe@acme.com",
      "mobilePhone": "+1-555-000-9999",
      "leadSource": 2,
      "estimatedValue": 15000.00,
      "estimatedCloseDate": "2024-09-30T00:00:00Z",
      "city": "Dubai",
      "country": "UAE"
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://integration.fieldiu.online/api/v1/leads', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'X-API-KEY': 'your_api_key',
      'X-ORG-ID': 'your_org_id'
    },
    body: JSON.stringify({
      firstName: 'John',
      lastName: 'Doe',
      title: 'Facilities Manager',
      companyName: 'Acme Corporation',
      email: 'john.doe@acme.com',
      mobilePhone: '+1-555-000-9999',
      leadSource: 2,
      estimatedValue: 15000.00,
      estimatedCloseDate: '2024-09-30T00:00:00Z',
      city: 'Dubai',
      country: 'UAE'
    })
  });
  ```
</CodeGroup>

### Response

`200 OK` — Lead created successfully.
