Source: https://www.brixit.io/docs/api-contacts-create

# Create contact

To create contact in Brixit, send a POST request to /api/automation/v1/execute with operation set to contacts.create. Use the data fields below for supported input and filters.

[Contacts API](https://www.brixit.io/docs/api-contacts) · `contacts.create`

[URL](https://www.brixit.io/docs/api-contacts-create#url-and-authentication) · [Fields](https://www.brixit.io/docs/api-contacts-create#fields) · [Example](https://www.brixit.io/docs/api-contacts-create#example-request) · [Response](https://www.brixit.io/docs/api-contacts-create#response) · [Try it](https://www.brixit.io/docs/api-contacts-create#try-it)

## URL and authentication

`POST https://YOUR-BACKEND/api/automation/v1/execute`

Send `Authorization: Bearer <connection key>`, `Accept: application/json` and
`Content-Type: application/json`. [Create a connection](https://www.brixit.io/docs/api#get-connected).

This operation requires **write access** and CRM permission `add_contacts`.
The gateway invokes `POST /api/v1/app/lead-contacts` internally.
Use the POST URL above with your automation key, including for read and delete operations.

## Request parameters

| Key | Type | Requirement |
| --- | --- | --- |
| `operation` | string | Required; exactly `contacts.create` |
| `data` | object | Required; see fields below |
| `idempotency_key` | string | Required; 8–100 characters. Unique per action; keep unchanged for identical retries. |

## Fields

Create requires first_name, last_name, email, primary_phone and assigned_to. If inquiry is supplied, its intent and assigned_to are also required. Custom fields may add company-specific requirements.

Fields below belong inside `data`. Dot paths describe nested objects; `*` means each
array item. `nullable` permits null and `sometimes` validates a supplied field.
`in:` lists allowed values; `min:` and `max:` limit the value, length or item count.
`exists:` and `exists_in_company:` require a valid record ID. Conditional rules
such as `required_if` and `required_with` refer to other fields in the same payload.
Use YYYY-MM-DD for date-only values and timestamps with timezone offsets for follow-ups.

| Field | Type | Requirement | Format / validation |
| --- | --- | --- | --- |
| `first_name` | string | Required | required; string; min:1; max:255 |
| `last_name` | string | Required | required; string; min:1; max:255 |
| `email` | string | Required | required; email — Must be available and unique within your company; normalized before validation. |
| `primary_phone` | string | Required | required; string; max:255 |
| `secondary_phone` | string | Optional | nullable; string; max:255 |
| `country_id` | integer | Optional | nullable; integer; exists:countries,id |
| `preferred_languages` | array | Optional | nullable; array |
| `preferred_languages.*` | integer | Optional | nullable; integer; exists:language_settings,id |
| `communication_preferences` | array | Optional | nullable; array |
| `communication_preferences.*` | string | Optional | nullable; in:email,whatsapp,phone,text,sms |
| `date_of_birth` | string | Optional | nullable; date |
| `gender` | string | Optional | nullable; in:male,female |
| `marital_status` | string | Optional | nullable; in:single,married,engaged,divorced,widowed,separated,other |
| `occupation` | string | Optional | nullable; string; max:255 |
| `company_name` | string | Optional | nullable; string; max:255 |
| `address` | string | Optional | nullable; string |
| `internal_notes` | string | Optional | nullable; string |
| `assigned_to` | integer | Required | required; integer; exists_in_company:users |
| `source_id` | integer | Optional | nullable; integer; exists_in_company:lead_sources |
| `contact_stage_id` | integer | Optional | nullable; integer; exists_in_company:contact_stages |
| `priority` | string | Optional | nullable; in:high,medium,low |
| `database_record_id` | integer | Optional | nullable; integer; exists_in_company:cold_calling_leads |
| `inquiry` | object | Optional | nullable; array — Optional initial inquiry. If supplied, all inquiry creation rules apply except lead_contact_id. |
| `custom_fields_data` | object | Optional | array — Object keyed by field_&lt;id&gt;. Required fields depend on your installation. URL fields require a URL; percentages are 0–100. File custom fields cannot be uploaded through this JSON API. |
| `inquiry.name` | string | Optional | nullable; string; max:255 — Applies only when inquiry is supplied.  |
| `inquiry.intent` | string | Required when inquiry is supplied | required; string; in:buy,rent,sell,investor,other — Applies only when inquiry is supplied.  |
| `inquiry.listing_id` | integer | Optional | nullable; integer; exists:listings,id — Applies only when inquiry is supplied.  |
| `inquiry.budget_min` | number | Optional | nullable; numeric; min:0 — Applies only when inquiry is supplied.  |
| `inquiry.budget_max` | number | Optional | nullable; numeric; min:0 — Applies only when inquiry is supplied.  |
| `inquiry.bedrooms` | integer | Optional | nullable; integer; min:0 — Applies only when inquiry is supplied.  |
| `inquiry.bathrooms` | integer | Optional | nullable; integer; min:0 — Applies only when inquiry is supplied.  |
| `inquiry.preferred_locations` | array | Optional | nullable; array — Applies only when inquiry is supplied.  |
| `inquiry.preferred_locations.*.place_id` | string | Optional | nullable; string — Applies only when inquiry is supplied.  |
| `inquiry.preferred_locations.*.address` | string | Optional | nullable; string — Applies only when inquiry is supplied.  |
| `inquiry.preferred_locations.*.lat` | number | Optional | nullable; numeric — Applies only when inquiry is supplied.  |
| `inquiry.preferred_locations.*.long` | number | Optional | nullable; numeric — Applies only when inquiry is supplied.  |
| `inquiry.property_types` | array | Optional | nullable; array — Applies only when inquiry is supplied.  |
| `inquiry.property_types.*` | integer | Optional | integer; exists:listing_types,id — Applies only when inquiry is supplied.  |
| `inquiry.preferred_developers` | array | Optional | nullable; array — Applies only when inquiry is supplied.  |
| `inquiry.preferred_developers.*` | integer | Optional | integer; exists:developers,id — Applies only when inquiry is supplied.  |
| `inquiry.source_id` | integer | Optional | nullable; integer; exists:lead_sources,id — Applies only when inquiry is supplied.  |
| `inquiry.assigned_to` | integer | Required when inquiry is supplied | required; integer; integer; exists_in_company:users — Applies only when inquiry is supplied.  |
| `inquiry.pipeline_id` | integer | Optional | nullable; integer; exists:lead_pipelines,id — Applies only when inquiry is supplied.  |
| `inquiry.pipeline_stage_id` | integer | Optional | nullable; integer; exists:pipeline_stages,id — Applies only when inquiry is supplied.  |
| `inquiry.note` | string | Optional | nullable; string — Applies only when inquiry is supplied.  |
| `inquiry.custom_fields_data` | object | Optional | array — Applies only when inquiry is supplied. Object keyed by field_&lt;id&gt;. Required fields depend on your installation. URL fields require a URL; percentages are 0–100. File custom fields cannot be uploaded through this JSON API. |

## Example request

Replace the example IDs and values with records in your installation. Supply any
additional custom fields required by your company.

```json
{
  "operation": "contacts.create",
  "data": {
    "first_name": "Example",
    "last_name": "Contact",
    "email": "contact@example.com",
    "primary_phone": "+971500000001",
    "assigned_to": 1
  },
  "idempotency_key": "example-event-12345"
}
```

## Response

Returns the created contact in `data`. Use `data.id` for subsequent requests. Related fields depend on the resource and your permissions.

The gateway preserves the underlying HTTP status and JSON body. Successful requests return **HTTP 200**. A response may also include localized message fields.

Illustrative response excerpt (additional fields may be returned):

```json
{
  "status": "success",
  "data": {
    "id": 456,
    "first_name": "Example",
    "last_name": "Contact",
    "email": "contact@example.com"
  }
}
```

## Errors

| HTTP status | Meaning |
| --- | --- |
| 400 | A CRM business rule rejected the action. |
| 401 | Missing, invalid, expired or revoked connection key. |
| 403 | Connection access or CRM permissions do not allow this action. |
| 404 | Operation or record unavailable. |
| 409 | This idempotency key was already used with a different request. |
| 413 | Request or result exceeds its size limit; reduce payload or page size. |
| 422 | Missing or invalid fields, or a CRM business rule rejected the operation. |
| 429 | Rate limit exceeded; wait before retrying. |
| 500 | The server could not complete the operation. |

Validation failures may return `message` / `errors`, or an `error` string with
an optional `fields` array. The tester shows the actual HTTP status and full body.
[Read about limits and retries](https://www.brixit.io/docs/api#errors-and-limits).

## Try it

[Open the interactive API tester](https://www.brixit.io/docs/api-contacts-create#try-it)
