> ## 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.

# Contacts

> Create and retrieve contact records via the FieldIU API

Contacts represent individual people associated with an account in FieldIU. You can create contacts and link them to existing accounts.

***

## Create Contact

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

Creates a new contact record in FieldIU.

### Request Body

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

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

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

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

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

<ParamField body="accountId" type="string">
  The ID of the account this contact belongs to
</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/contacts \
    -H "Content-Type: application/json" \
    -H "X-API-KEY: your_api_key" \
    -H "X-ORG-ID: your_org_id" \
    -d '{
      "firstName": "Jane",
      "lastName": "Smith",
      "email": "jane.smith@acme.com",
      "mobilePhone": "+1-555-000-5678",
      "accountId": "abc-123",
      "city": "Dubai",
      "country": "UAE"
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://integration.fieldiu.online/api/v1/contacts', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'X-API-KEY': 'your_api_key',
      'X-ORG-ID': 'your_org_id'
    },
    body: JSON.stringify({
      firstName: 'Jane',
      lastName: 'Smith',
      email: 'jane.smith@acme.com',
      mobilePhone: '+1-555-000-5678',
      accountId: 'abc-123',
      city: 'Dubai',
      country: 'UAE'
    })
  });
  ```
</CodeGroup>

### Response

`200 OK` — Contact created successfully.

***

## List Contacts

<api-reference>GET /api/v1/contacts</api-reference>

Returns a paginated list of all contacts in your organization.

### Query Parameters

<ParamField query="page" type="integer">
  Page number for pagination (1-based)
</ParamField>

### Example Request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://integration.fieldiu.online/api/v1/contacts?page=1" \
    -H "X-API-KEY: your_api_key" \
    -H "X-ORG-ID: your_org_id"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://integration.fieldiu.online/api/v1/contacts?page=1', {
    headers: {
      'X-API-KEY': 'your_api_key',
      'X-ORG-ID': 'your_org_id'
    }
  });
  ```
</CodeGroup>

### Response

`200 OK` — Returns a list of contact objects.

***

## Get Contact by ID

<api-reference>GET /api/v1/contacts/\{id}</api-reference>

Returns a single contact record by its unique identifier.

### Path Parameters

<ParamField path="id" type="string" required>
  The unique identifier of the contact
</ParamField>

### Example Request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET https://integration.fieldiu.online/api/v1/contacts/xyz-456 \
    -H "X-API-KEY: your_api_key" \
    -H "X-ORG-ID: your_org_id"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://integration.fieldiu.online/api/v1/contacts/xyz-456', {
    headers: {
      'X-API-KEY': 'your_api_key',
      'X-ORG-ID': 'your_org_id'
    }
  });
  ```
</CodeGroup>

### Response

`200 OK` — Returns the contact object for the given ID.
