> For a complete page index, fetch https://developer.close.com/llms.txt

# Update an existing contact

PUT https://api.close.com/api/v1/contact/{id}/
Content-Type: application/json

Update a contact's information. Custom field values can be set by including `custom.cf_*` keys in the request body, e.g. `"custom.cf_abc123": "value"`.

For custom fields that accept multiple values, you can use `.add` or `.remove` suffixes to modify the existing list without replacing it:

```json
{ "custom.cf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c.add": "Wednesday" }
```

Reference: https://developer.close.com/api/resources/contacts/update

## Authentication

- `Authorization` header (basic auth, required) — Use your API key as the username and leave the password empty.
- `Authorization` header (bearer token, required)

## Request

### Path parameters

- `id` (string, required)

### Query parameters

- `_fields` (string, optional) — Comma-separated list of fields to include in the response.

### Body (application/json)

- `emails` (list of object, optional, nullable)
  - `email` (string, required)
  - `type` (string, optional)
- `lead_id` (string, optional, nullable)
- `name` (string, optional, nullable)
- `phones` (list of object, optional, nullable)
  - `phone` (string, optional, nullable) — Phone number in E.164 format
  - `type` (string, optional)
- `timezone` (string, optional, nullable) — IANA timezone identifier
- `title` (string, optional, nullable)
- `urls` (list of object, optional, nullable)
  - `url` (string, required)
  - `type` (string, optional)

## Response

### 200

Successful response

- `created_by` (string, required, nullable)
- `date_created` (datetime, required)
- `date_updated` (datetime, required)
- `display_name` (string, required)
- `id` (string, required)
- `name` (string, required, nullable)
- `organization_id` (string, required)
- `title` (string, required, nullable)
- `updated_by` (string, required, nullable)
- `emails` (list of object, optional)
  - `email` (string, required)
  - `is_unsubscribed` (boolean, required)
  - `type` (string, required)
- `integration_links` (list of object, optional)
  - `name` (string, required)
  - `url` (string, required)
- `lead_id` (string, optional, nullable)
- `lead_suggestions_operation_id` (string, optional, nullable)
- `phones` (list of object, optional)
  - `phone` (string, required)
  - `type` (string, required)
  - `country` (string, optional, nullable)
  - `outbound_sms_blocked` (boolean, optional)
  - `phone_formatted` (string, optional)
  - `tz_ids` (list of string, optional)
- `recent_calls` (list of object, optional)
  - `dialer_id` (string, required, nullable)
  - `duration` (integer, required)
  - `finish_timestamp` (datetime, required)
  - `id` (string, required)
  - `status` (enum, required) — Current status of the call.
    - Allowed values: `created`, `in-progress`, `completed`, `cancel`, `no-answer`, `busy`, `failed`, `timeout`
- `subscriptions` (list of object, optional)
  - `contact_email` (string, required, nullable)
  - `date_created` (datetime, required)
  - `initial_email_id` (string, required, nullable)
  - `sequence_id` (string, required)
  - `sequence_name` (string, required)
  - `sequence_status` (enum, required)
    - Allowed values: `active`, `paused`, `draft`
  - `start_date` (datetime, required, nullable)
  - `subscription_id` (string, required)
  - `subscription_status` (enum, required)
    - Allowed values: `active`, `paused`, `finished`, `goal`, `error`
  - `subscription_status_reason` (enum, required, nullable) — Reason for each higher level status on a Workflow run.
    - Allowed values: `manual`, `pending-call-timed-out`, `bulk-action`, `rate-limited`, `sequence-deleted`, `workflow-paused`, `filter-not-matched`, `insufficient-ai-credit-balance`, `reply-received`, `call-answered`, `meeting-booked`, `lead-status-changed`, `outcome-met`, `account-invalid`, `account-failures`, `sending-throttled-too-long`, `membership-inactive`, `send-as-error`, `email-bounced`, `call-failed`, `sms-failed`, `no-user-phone`, `billing-error`, `assignment-field-invalid`, `lead-status-field-invalid`, `assignees-missing`, `run-as-disabled`, `lead-not-visible`, `internal-error`, `field-mapping-error`, `filter-config-invalid`, `email-ai-generation-failed`
- `timezone` (string, optional, nullable)
- `timezone_source` (string, optional, nullable)
- `urls` (list of object, optional)
  - `type` (string, required)
  - `url` (string, required)

## Examples

**Request**

```json
{
  "name": "Johnny Smith"
}
```

**Response**

```json
{
  "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA",
  "date_created": "2013-03-07T23:23:21.495000+00:00",
  "date_updated": "2013-03-08T13:13:21.495000+00:00",
  "display_name": "Johnny Smith",
  "id": "cont_sNIdBgngvbdTTEN1mspKgUqKAWfbul4IITvnWoRw1T7",
  "name": "Johnny Smith",
  "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH",
  "title": "President",
  "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA",
  "emails": [
    {
      "email": "john@example.com",
      "is_unsubscribed": false,
      "type": "office"
    }
  ],
  "lead_id": "lead_QyNaWw4fdSwxl5Mc5daMFf3Y27PpIcH0awPbC9l7uyo",
  "phones": [
    {
      "phone": "+19045551234",
      "type": "mobile",
      "country": "US",
      "phone_formatted": "+1 904-555-1234"
    }
  ],
  "urls": [
    {
      "type": "url",
      "url": "http://twitter.com/google/"
    }
  ],
  "custom.cf_j0P7kHmgFTZZnYBFtyPSZ3uQw4dpW8xKcW7Krps8atj": "Sales Rep"
}
```

**SDK Code**

```python contacts_update_example
import requests

url = "https://api.close.com/api/v1/contact/id/"

payload = { "name": "Johnny Smith" }
headers = {
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers, auth=("<CLOSE_API_KEY>", ""))

print(response.json())
```

```javascript contacts_update_example
const url = 'https://api.close.com/api/v1/contact/id/';
const credentials = btoa("<CLOSE_API_KEY>:");

const options = {
  method: 'PUT',
  headers: {Authorization: `Basic ${credentials}`, 'Content-Type': 'application/json'},
  body: '{"name":"Johnny Smith"}'
};

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

```go contacts_update_example
package main

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

func main() {

	url := "https://api.close.com/api/v1/contact/id/"

	payload := strings.NewReader("{\n  \"name\": \"Johnny Smith\"\n}")

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

	req.SetBasicAuth("<CLOSE_API_KEY>", "")
	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 contacts_update_example
require 'uri'
require 'net/http'

url = URI("https://api.close.com/api/v1/contact/id/")

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

request = Net::HTTP::Put.new(url)
request.basic_auth("<CLOSE_API_KEY>", "")
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"Johnny Smith\"\n}"

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

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

HttpResponse<String> response = Unirest.put("https://api.close.com/api/v1/contact/id/")
  .basicAuth("<CLOSE_API_KEY>", "")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"Johnny Smith\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.close.com/api/v1/contact/id/', [
  'body' => '{
  "name": "Johnny Smith"
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
    'auth' => ['<CLOSE_API_KEY>', ''],
]);

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

```csharp contacts_update_example
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://api.close.com/api/v1/contact/id/");
client.Authenticator = new HttpBasicAuthenticator("<CLOSE_API_KEY>", "");
var request = new RestRequest(Method.PUT);

request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"Johnny Smith\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```