> This page is for Unified.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.merge.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.merge.dev/_mcp/server.

# /contacts

POST https://api.merge.dev/api/crm/v1/contacts
Content-Type: application/json

Creates a `Contact` object with the given values.

Reference: https://docs.merge.dev/merge-unified/crm/common-models/contacts/list

## Authentication

- `Authorization` header (bearer token, required) — Token-based authentication with required prefix "Bearer"

## Servers

- `https://api.merge.dev/api` (Production, default)
- `https://api-eu.merge.dev/api` (ProductionEU)
- `https://api-ap.merge.dev/api` (ProductionAPSE1)

## Request

### Query parameters

- `is_debug_mode` (boolean, optional) — Whether to include debug fields (such as log file links) in the response.
- `run_async` (boolean, optional) — Whether or not third-party updates should be run asynchronously.

### Headers

- `X-Account-Token` (string, required) — Token identifying the end user.

### Body (application/json)

This endpoint expects a CRMContactEndpointRequest.

- `model` (ContactRequest, required) — # The Contact Object ### Description The `Contact` object is used to represent an existing point of contact at a company in a CRM system. ### Usage Example TODO

## Response

### 201

- `model` (Contact, required) — # The Contact Object ### Description The `Contact` object is used to represent an existing point of contact at a company in a CRM system. ### Usage Example TODO
- `warnings` (list of WarningValidationProblem, required)
- `errors` (list of ErrorValidationProblem, required)
- `logs` (list of DebugModeLog, optional)

## Types

### ContactRequest

# The Contact Object ### Description The `Contact` object is used to represent an existing point of contact at a company in a CRM system. ### Usage Example TODO

- `first_name` (string, optional, nullable) — The contact's first name.
- `last_name` (string, optional, nullable) — The contact's last name.
- `account` (string, optional, nullable) — The contact's account.
- `owner` (string, optional, nullable) — The contact's owner.
- `addresses` (list of AddressRequest, optional)
- `email_addresses` (list of EmailAddressRequest, optional)
- `phone_numbers` (list of PhoneNumberRequest, optional)
- `last_activity_at` (datetime, optional, nullable) — When the contact's last activity occurred.
- `contact_url` (string, optional, nullable) — The contact's URL in the remote system.
- `integration_params` (map from string to any, optional, nullable)
- `linked_account_params` (map from string to any, optional, nullable)
- `remote_fields` (list of RemoteFieldRequest, optional)

### Contact

# The Contact Object ### Description The `Contact` object is used to represent an existing point of contact at a company in a CRM system. ### Usage Example TODO

- `id` (string, optional)
- `remote_id` (string, optional, nullable) — The third-party API ID of the matching object.
- `created_at` (datetime, optional) — The datetime that this object was created by Merge.
- `modified_at` (datetime, optional) — The datetime that this object was modified by Merge.
- `first_name` (string, optional, nullable) — The contact's first name.
- `last_name` (string, optional, nullable) — The contact's last name.
- `account` (string, optional, nullable) — The contact's account.
- `owner` (string, optional, nullable) — The contact's owner.
- `addresses` (list of Address, optional)
- `email_addresses` (list of EmailAddress, optional)
- `phone_numbers` (list of PhoneNumber, optional)
- `last_activity_at` (datetime, optional, nullable) — When the contact's last activity occurred.
- `remote_created_at` (datetime, optional, nullable) — When the third party's contact was created.
- `contact_url` (string, optional, nullable) — The contact's URL in the remote system.
- `remote_was_deleted` (boolean, optional) — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
- `field_mappings` (ContactFieldMappings, optional, nullable)
- `remote_data` (list of RemoteData, optional, nullable)
- `remote_fields` (list of RemoteField, optional)

### WarningValidationProblem

- `title` (string, required)
- `detail` (string, required)
- `problem_type` (string, required)
- `source` (ValidationProblemSource, optional)
- `block_merge_link` (boolean, optional)
- `raw_error` (string, optional)
- `error_code` (integer, optional)

### ErrorValidationProblem

- `title` (string, required)
- `detail` (string, required)
- `problem_type` (string, required)
- `source` (ValidationProblemSource, optional)
- `block_merge_link` (boolean, optional)
- `raw_error` (string, optional)
- `error_code` (integer, optional)

### DebugModeLog

- `log_id` (string, required)
- `dashboard_view` (string, required)
- `log_summary` (DebugModelLogSummary, required)

### AddressRequest

# The Address Object ### Description The `Address` object is used to represent an entity's address. ### Usage Example TODO

- `street_1` (string, optional, nullable) — Line 1 of the address's street.
- `street_2` (string, optional, nullable) — Line 2 of the address's street.
- `city` (string, optional, nullable) — The address's city.
- `state` (string, optional, nullable) — The address's state.
- `postal_code` (string, optional, nullable) — The address's postal code.
- `country` (enum, optional, nullable) — The address's country. The country code in ISO 3166-1 alpha-2 format.
  - Allowed values: `AF`, `AX`, `AL`, `DZ`, `AS`, `AD`, `AO`, `AI`, `AQ`, `AG`, `AR`, `AM`, `AW`, `AU`, `AT`, `AZ`, `BS`, `BH`, `BD`, `BB`, `BY`, `BE`, `BZ`, `BJ`, `BM`, `BT`, `BO`, `BQ`, `BA`, `BW`, `BV`, `BR`, `IO`, `BN`, `BG`, `BF`, `BI`, `CV`, `KH`, `CM`, `CA`, `KY`, `CF`, `TD`, `CL`, `CN`, `CX`, `CC`, `CO`, `KM`, `CG`, `CD`, `CK`, `CR`, `CI`, `HR`, `CU`, `CW`, `CY`, `CZ`, `DK`, `DJ`, `DM`, `DO`, `EC`, `EG`, `SV`, `GQ`, `ER`, `EE`, `SZ`, `ET`, `FK`, `FO`, `FJ`, `FI`, `FR`, `GF`, `PF`, `TF`, `GA`, `GM`, `GE`, `DE`, `GH`, `GI`, `GR`, `GL`, `GD`, `GP`, `GU`, `GT`, `GG`, `GN`, `GW`, `GY`, `HT`, `HM`, `VA`, `HN`, `HK`, `HU`, `IS`, `IN`, `ID`, `IR`, `IQ`, `IE`, `IM`, `IL`, `IT`, `JM`, `JP`, `JE`, `JO`, `KZ`, `KE`, `KI`, `KW`, `KG`, `LA`, `LV`, `LB`, `LS`, `LR`, `LY`, `LI`, `LT`, `LU`, `MO`, `MG`, `MW`, `MY`, `MV`, `ML`, `MT`, `MH`, `MQ`, `MR`, `MU`, `YT`, `MX`, `FM`, `MD`, `MC`, `MN`, `ME`, `MS`, `MA`, `MZ`, `MM`, `NA`, `NR`, `NP`, `NL`, `NC`, `NZ`, `NI`, `NE`, `NG`, `NU`, `NF`, `KP`, `MK`, `MP`, `NO`, `OM`, `PK`, `PW`, `PS`, `PA`, `PG`, `PY`, `PE`, `PH`, `PN`, `PL`, `PT`, `PR`, `QA`, `RE`, `RO`, `RU`, `RW`, `BL`, `SH`, `KN`, `LC`, `MF`, `PM`, `VC`, `WS`, `SM`, `ST`, `SA`, `SN`, `RS`, `SC`, `SL`, `SG`, `SX`, `SK`, `SI`, `SB`, `SO`, `ZA`, `GS`, `KR`, `SS`, `ES`, `LK`, `SD`, `SR`, `SJ`, `SE`, `CH`, `SY`, `TW`, `TJ`, `TZ`, `TH`, `TL`, `TG`, `TK`, `TO`, `TT`, `TN`, `TR`, `TM`, `TC`, `TV`, `UG`, `UA`, `AE`, `GB`, `UM`, `US`, `UY`, `UZ`, `VU`, `VE`, `VN`, `VG`, `VI`, `WF`, `EH`, `YE`, `ZM`, `ZW`
- `address_type` (enum, optional, nullable) — The address type.
  - Allowed values: `BILLING`, `SHIPPING`
- `integration_params` (map from string to any, optional, nullable)
- `linked_account_params` (map from string to any, optional, nullable)

### EmailAddressRequest

# The EmailAddress Object ### Description The `EmailAddress` object is used to represent an entity's email address. ### Usage Example Fetch from the `GET Contact` endpoint and view their email addresses.

- `email_address` (string, optional, nullable) — The email address.
- `email_address_type` (string, optional, nullable) — The email address's type.
- `integration_params` (map from string to any, optional, nullable)
- `linked_account_params` (map from string to any, optional, nullable)

### PhoneNumberRequest

# The PhoneNumber Object ### Description The `PhoneNumber` object is used to represent an entity's phone number. ### Usage Example Fetch from the `GET Contact` endpoint and view their phone numbers.

- `phone_number` (string, optional, nullable) — The phone number.
- `phone_number_type` (string, optional, nullable) — The phone number's type.
- `integration_params` (map from string to any, optional, nullable)
- `linked_account_params` (map from string to any, optional, nullable)

### RemoteFieldRequest

- `remote_field_class` (string, required)
- `value` (map from string to any, optional)

### Address

# The Address Object ### Description The `Address` object is used to represent an entity's address. ### Usage Example TODO

- `created_at` (datetime, optional) — The datetime that this object was created by Merge.
- `modified_at` (datetime, optional) — The datetime that this object was modified by Merge.
- `street_1` (string, optional, nullable) — Line 1 of the address's street.
- `street_2` (string, optional, nullable) — Line 2 of the address's street.
- `city` (string, optional, nullable) — The address's city.
- `state` (string, optional, nullable) — The address's state.
- `postal_code` (string, optional, nullable) — The address's postal code.
- `country` (enum, optional, nullable) — The address's country. The country code in ISO 3166-1 alpha-2 format.
  - Allowed values: `AF`, `AX`, `AL`, `DZ`, `AS`, `AD`, `AO`, `AI`, `AQ`, `AG`, `AR`, `AM`, `AW`, `AU`, `AT`, `AZ`, `BS`, `BH`, `BD`, `BB`, `BY`, `BE`, `BZ`, `BJ`, `BM`, `BT`, `BO`, `BQ`, `BA`, `BW`, `BV`, `BR`, `IO`, `BN`, `BG`, `BF`, `BI`, `CV`, `KH`, `CM`, `CA`, `KY`, `CF`, `TD`, `CL`, `CN`, `CX`, `CC`, `CO`, `KM`, `CG`, `CD`, `CK`, `CR`, `CI`, `HR`, `CU`, `CW`, `CY`, `CZ`, `DK`, `DJ`, `DM`, `DO`, `EC`, `EG`, `SV`, `GQ`, `ER`, `EE`, `SZ`, `ET`, `FK`, `FO`, `FJ`, `FI`, `FR`, `GF`, `PF`, `TF`, `GA`, `GM`, `GE`, `DE`, `GH`, `GI`, `GR`, `GL`, `GD`, `GP`, `GU`, `GT`, `GG`, `GN`, `GW`, `GY`, `HT`, `HM`, `VA`, `HN`, `HK`, `HU`, `IS`, `IN`, `ID`, `IR`, `IQ`, `IE`, `IM`, `IL`, `IT`, `JM`, `JP`, `JE`, `JO`, `KZ`, `KE`, `KI`, `KW`, `KG`, `LA`, `LV`, `LB`, `LS`, `LR`, `LY`, `LI`, `LT`, `LU`, `MO`, `MG`, `MW`, `MY`, `MV`, `ML`, `MT`, `MH`, `MQ`, `MR`, `MU`, `YT`, `MX`, `FM`, `MD`, `MC`, `MN`, `ME`, `MS`, `MA`, `MZ`, `MM`, `NA`, `NR`, `NP`, `NL`, `NC`, `NZ`, `NI`, `NE`, `NG`, `NU`, `NF`, `KP`, `MK`, `MP`, `NO`, `OM`, `PK`, `PW`, `PS`, `PA`, `PG`, `PY`, `PE`, `PH`, `PN`, `PL`, `PT`, `PR`, `QA`, `RE`, `RO`, `RU`, `RW`, `BL`, `SH`, `KN`, `LC`, `MF`, `PM`, `VC`, `WS`, `SM`, `ST`, `SA`, `SN`, `RS`, `SC`, `SL`, `SG`, `SX`, `SK`, `SI`, `SB`, `SO`, `ZA`, `GS`, `KR`, `SS`, `ES`, `LK`, `SD`, `SR`, `SJ`, `SE`, `CH`, `SY`, `TW`, `TJ`, `TZ`, `TH`, `TL`, `TG`, `TK`, `TO`, `TT`, `TN`, `TR`, `TM`, `TC`, `TV`, `UG`, `UA`, `AE`, `GB`, `UM`, `US`, `UY`, `UZ`, `VU`, `VE`, `VN`, `VG`, `VI`, `WF`, `EH`, `YE`, `ZM`, `ZW`
- `address_type` (enum, optional, nullable) — The address type.
  - Allowed values: `BILLING`, `SHIPPING`

### EmailAddress

# The EmailAddress Object ### Description The `EmailAddress` object is used to represent an entity's email address. ### Usage Example Fetch from the `GET Contact` endpoint and view their email addresses.

- `created_at` (datetime, optional) — The datetime that this object was created by Merge.
- `modified_at` (datetime, optional) — The datetime that this object was modified by Merge.
- `email_address` (string, optional, nullable) — The email address.
- `email_address_type` (string, optional, nullable) — The email address's type.

### PhoneNumber

# The PhoneNumber Object ### Description The `PhoneNumber` object is used to represent an entity's phone number. ### Usage Example Fetch from the `GET Contact` endpoint and view their phone numbers.

- `created_at` (datetime, optional) — The datetime that this object was created by Merge.
- `modified_at` (datetime, optional) — The datetime that this object was modified by Merge.
- `phone_number` (string, optional, nullable) — The phone number.
- `phone_number_type` (string, optional, nullable) — The phone number's type.

### ContactFieldMappings

- `organization_defined_targets` (map from string to any, optional)
- `linked_account_defined_targets` (map from string to any, optional)

### RemoteData

# The RemoteData Object ### Description The `RemoteData` object is used to represent the full data pulled from the third-party API for an object. ### Usage Example TODO

- `path` (string, required) — The third-party API path that is being called.
- `data` (any, optional) — The data returned from the third-party for this object in its original, unnormalized format.

### RemoteField

- `remote_field_class` (RemoteFieldClass, required)
- `value` (map from string to any, optional)

### ValidationProblemSource

- `pointer` (string, required)

### DebugModelLogSummary

- `url` (string, required)
- `method` (string, required)
- `status_code` (integer, required)

### RemoteFieldClass

- `id` (string, optional)
- `display_name` (string, optional)
- `remote_key_name` (string, optional)
- `description` (string, optional)
- `is_custom` (boolean, optional)
- `is_common_model_field` (boolean, optional)
- `is_required` (boolean, optional)
- `field_type` (enum, optional)
  - Allowed values: `string`, `number`, `date`, `datetime`, `bool`, `list`
- `field_format` (enum, optional)
  - Allowed values: `string`, `number`, `date`, `datetime`, `bool`, `list`
- `field_choices` (list of string, optional)
- `item_schema` (ItemSchema, optional)

### ItemSchema

- `item_type` (enum, optional)
  - Allowed values: `string`, `number`, `date`, `datetime`, `bool`, `list`
- `item_format` (enum, optional)
  - Allowed values: `string`, `number`, `date`, `datetime`, `bool`, `list`
- `item_choices` (list of string, optional)

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "model": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "remote_id": "19202938",
    "created_at": "2021-09-15T00:00:00Z",
    "modified_at": "2021-10-16T00:00:00Z",
    "first_name": "Gil",
    "last_name": "Feig",
    "account": "0958cbc6-6040-430a-848e-aafacbadf4ae",
    "owner": "b8fbfc30-0982-420e-8c20-dab07b70b9d6",
    "addresses": [
      {
        "created_at": "2021-09-15T00:00:00Z",
        "modified_at": "2021-10-16T00:00:00Z",
        "street_1": "50 Bowling Green Dr",
        "street_2": "Golden Gate Park",
        "city": "San Francisco",
        "state": "CA",
        "postal_code": "94122",
        "country": "US",
        "address_type": "BILLING"
      }
    ],
    "email_addresses": [
      {
        "email_address": "hello@merge.dev",
        "email_address_type": "Work"
      }
    ],
    "phone_numbers": [
      {
        "created_at": "2021-09-15T00:00:00Z",
        "modified_at": "2021-10-16T00:00:00Z",
        "phone_number": "+13785579223",
        "phone_number_type": "Mobile"
      }
    ],
    "last_activity_at": "2022-02-10T00:00:00Z",
    "remote_created_at": "2021-11-10T00:00:00Z",
    "contact_url": "https://crm.example.com/contacts/19202938",
    "remote_was_deleted": true,
    "field_mappings": {
      "organization_defined_targets": {
        "custom_key": "custom_value"
      },
      "linked_account_defined_targets": {
        "custom_key": "custom_value"
      }
    },
    "remote_data": [
      {
        "path": "/contacts",
        "data": null
      }
    ],
    "remote_fields": [
      {
        "remote_field_class": {
          "id": "string",
          "display_name": "string",
          "remote_key_name": "string",
          "description": "string",
          "is_custom": true,
          "is_common_model_field": true,
          "is_required": true,
          "field_type": "string",
          "field_format": "string",
          "field_choices": [
            "string"
          ],
          "item_schema": {
            "item_type": "string",
            "item_format": "string",
            "item_choices": [
              "string"
            ]
          }
        },
        "value": "string"
      }
    ]
  },
  "warnings": [
    {
      "title": "Unrecognized Field",
      "detail": "An unrecognized field, age, was passed in with request data.",
      "problem_type": "UNRECOGNIZED_FIELD",
      "source": {
        "pointer": "/age"
      },
      "block_merge_link": true,
      "raw_error": "string",
      "error_code": 1
    }
  ],
  "errors": [
    {
      "title": "Missing Required Field",
      "detail": "custom_fields is a required field on model.",
      "problem_type": "MISSING_REQUIRED_FIELD",
      "source": {
        "pointer": "/model/custom_fields"
      },
      "block_merge_link": true,
      "raw_error": "string",
      "error_code": 1
    }
  ],
  "logs": [
    {
      "log_id": "99433219-8017-4acd-bb3c-ceb23d663832",
      "dashboard_view": "https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832",
      "log_summary": {
        "url": "www.exampleintegration.com/api/v1/exampleapi",
        "method": "POST",
        "status_code": 200
      }
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.merge.dev/api/crm/v1/contacts"

payload = {}
headers = {
    "X-Account-Token": "X-Account-Token",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.merge.dev/api/crm/v1/contacts';
const options = {
  method: 'POST',
  headers: {
    'X-Account-Token': 'X-Account-Token',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.merge.dev/api/crm/v1/contacts"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-Account-Token", "X-Account-Token")
	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.merge.dev/api/crm/v1/contacts")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-Account-Token"] = 'X-Account-Token'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.merge.dev/api/crm/v1/contacts")
  .header("X-Account-Token", "X-Account-Token")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.merge.dev/api/crm/v1/contacts', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'X-Account-Token' => 'X-Account-Token',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.merge.dev/api/crm/v1/contacts");
var request = new RestRequest(Method.POST);
request.AddHeader("X-Account-Token", "X-Account-Token");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-Account-Token": "X-Account-Token",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.merge.dev/api/crm/v1/contacts")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```