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

# Create Contact

> Create a new contact

## Authentication

Requires `contacts:write` scope.

## Request Body

<ParamField body="email" type="string" required>
  Contact's email address (must be valid)
</ParamField>

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

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

<ParamField body="phone" type="string">
  Phone number (E.164 format recommended, e.g., +15551234567)
</ParamField>

<ParamField body="title" type="string">
  Job title or salutation (e.g., "Mr.", "Dr.", "CEO")
</ParamField>

<ParamField body="preferredLanguage" type="string">
  Preferred language: `en` or `fr`
</ParamField>

<ParamField body="locationId" type="string">
  UUID of associated location
</ParamField>

<ParamField body="contactOrganizationId" type="string">
  UUID of associated organization
</ParamField>

<ParamField body="customFields" type="object">
  Custom field values as key-value pairs
</ParamField>

<ParamField body="tags" type="array">
  Array of tag strings
</ParamField>

## Response

Returns the created contact object.

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://app.demeterrr.com/api/v1/contacts \
    -H "X-API-Key: dem_your_key_here" \
    -H "Content-Type: application/json" \
    -d '{
      "email": "jane.smith@example.com",
      "firstName": "Jane",
      "lastName": "Smith",
      "phone": "+15559876543",
      "preferredLanguage": "en",
      "tags": ["new-customer"]
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://app.demeterrr.com/api/v1/contacts', {
    method: 'POST',
    headers: {
      'X-API-Key': 'dem_your_key_here',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      email: 'jane.smith@example.com',
      firstName: 'Jane',
      lastName: 'Smith',
      phone: '+15559876543',
      preferredLanguage: 'en',
      tags: ['new-customer']
    })
  });

  const data = await response.json();
  console.log('Contact created:', data.data.id);
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      'https://app.demeterrr.com/api/v1/contacts',
      headers={
          'X-API-Key': 'dem_your_key_here',
          'Content-Type': 'application/json'
      },
      json={
          'email': 'jane.smith@example.com',
          'firstName': 'Jane',
          'lastName': 'Smith',
          'phone': '+15559876543',
          'preferredLanguage': 'en',
          'tags': ['new-customer']
      }
  )

  contact = response.json()['data']
  print(f"Contact created: {contact['id']}")
  ```
</RequestExample>

<ResponseExample>
  ```json 201 Success theme={null}
  {
    "data": {
      "id": "770e8400-e29b-41d4-a716-446655440000",
      "email": "jane.smith@example.com",
      "firstName": "Jane",
      "lastName": "Smith",
      "phone": "+15559876543",
      "title": null,
      "preferredLanguage": "en",
      "locationId": null,
      "contactOrganizationId": null,
      "customFields": {},
      "tags": ["new-customer"],
      "unsubscribed": false,
      "createdAt": "2026-02-10T15:30:00.000Z",
      "updatedAt": "2026-02-10T15:30:00.000Z"
    }
  }
  ```

  ```json 409 Conflict - Email Exists theme={null}
  {
    "error": {
      "code": "CONTACT_EXISTS",
      "message": "A contact with this email already exists",
      "details": {
        "contactId": "550e8400-e29b-41d4-a716-446655440000"
      }
    }
  }
  ```

  ```json 400 Validation Error theme={null}
  {
    "error": {
      "code": "VALIDATION_ERROR",
      "message": "Invalid request data",
      "details": {
        "email": ["Invalid email address"],
        "firstName": ["First name is required"]
      }
    }
  }
  ```
</ResponseExample>
