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

# Update Contact

> Update an existing contact's fields

# Update Contact

Updates an existing contact. Only provided fields are modified — omitted fields remain unchanged.

The request body uses **strict validation**: unknown fields (e.g., `organizationID`) are rejected with a `400` error to prevent accidental data corruption.

## Path Parameters

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

## Request Body

All fields are optional. Only include the fields you want to update. Set a field to `null` to clear it.

<ParamField body="email" type="string">
  Email address. Will be normalized to lowercase. If the new email is already used by another contact in your organization, the request returns `409 Conflict`.
</ParamField>

<ParamField body="phone_number" type="string">
  Phone number.
</ParamField>

<ParamField body="first_name" type="string">
  First name.
</ParamField>

<ParamField body="last_name" type="string">
  Last name.
</ParamField>

<ParamField body="job_title" type="string | null">
  Job title. Set to `null` to clear.
</ParamField>

<ParamField body="company" type="string | null">
  Company name. Set to `null` to clear.
</ParamField>

<ParamField body="university" type="string | null">
  University name. Set to `null` to clear.
</ParamField>

<ParamField body="gender" type="string | null">
  Gender. Set to `null` to clear.
</ParamField>

<ParamField body="birthday" type="string | null">
  Birthday. Set to `null` to clear.
</ParamField>

<ParamField body="location" type="string | null">
  Location. Set to `null` to clear.
</ParamField>

<ParamField body="linkedin" type="string | null">LinkedIn URL.</ParamField>
<ParamField body="instagram" type="string | null">Instagram handle.</ParamField>
<ParamField body="twitter" type="string | null">Twitter handle.</ParamField>
<ParamField body="github" type="string | null">GitHub handle.</ParamField>
<ParamField body="website" type="string | null">Website URL.</ParamField>

<ParamField body="tags" type="string[]">
  Replace the contact's tags with this array.
</ParamField>

<ParamField body="status" type="string">
  Contact status. Allowed values: `active`, `inactive`.
</ParamField>

## Response

Returns the updated contact object.

<ResponseField name="data" type="object">
  The updated contact object (same schema as [Get Contact](/api-reference/contacts/get-contact)).
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X PATCH \
    -H "X-API-KEY: your_api_key" \
    -H "Content-Type: application/json" \
    -d '{"first_name": "Janet", "job_title": "CTO", "tags": ["vip", "speaker"]}' \
    "https://www.gomry.com/api/v1/contacts/AbCdEfGhIjKlMnOpQrSt"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    "https://www.gomry.com/api/v1/contacts/AbCdEfGhIjKlMnOpQrSt",
    {
      method: "PATCH",
      headers: {
        "X-API-KEY": "your_api_key",
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        first_name: "Janet",
        job_title: "CTO",
        tags: ["vip", "speaker"],
      }),
    }
  );
  const { data } = await response.json();
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "data": {
      "id": "AbCdEfGhIjKlMnOpQrSt",
      "first_name": "Janet",
      "last_name": "Doe",
      "email": "jane@example.com",
      "phone_number": "+1234567890",
      "status": "active",
      "job_title": "CTO",
      "company": "Acme Inc",
      "university": null,
      "gender": null,
      "birthday": null,
      "location": "New York",
      "linkedin": null,
      "instagram": null,
      "twitter": null,
      "github": null,
      "website": null,
      "tags": ["vip", "speaker"],
      "created_at": "2025-03-01T00:00:00.000Z",
      "updated_at": "2025-07-15T10:30:00.000Z"
    }
  }
  ```

  ```json 409 theme={null}
  {
    "error": "A contact with this email already exists"
  }
  ```

  ```json 400 theme={null}
  {
    "error": "Validation failed",
    "details": {
      "formErrors": [],
      "fieldErrors": {}
    }
  }
  ```
</ResponseExample>
