---
title: "Update a contact"
method: PATCH
path: "/lists/contacts/{contactId}"
tags: ["List contacts"]
---

# Update a contact

`PATCH /lists/contacts/{contactId}`

## Request

- Base URL: `https://api.emelia.io`
- URL: `https://api.emelia.io/lists/contacts/{contactId}`
- Auth: API key in header `Authorization`

Updates a contact identified by its id only (its list is derived from the contact). The body is the same flat object as `POST /lists/list/{listId}/contacts`, with the same key resolution and the same pitfalls: unknown keys create custom variables, `null` and empty strings are ignored (a field cannot be cleared), sent fields overwrite, absent fields stay untouched. A company row is created if the contact has none and company fields are sent.

No duplicate check is made: changing the email to one already present in the list creates a duplicate. List counters are not updated. The campaigns using the list are resynchronized.

## Path parameters

- `contactId` string, required

## Request body

- ListsContactFields: Flat contact object: one key per field, scalar values only. Standard keys are listed in the description of `POST /lists/list/{listId}/contacts`; any other key goes to an existing custom variable of the same name or creates a new one. Numbers and booleans are converted to strings. `null` and empty strings are ignored. Arrays and objects are rejected.

## Response `200`

Contact updated.

- ListsUpdateContactResult
  - `success` true, required
  - `leadId` string, required
  - `companyId` string, nullable, required
  - `createdCustomVariables` ListsCreatedCustomVariable[], required
    - `technicalName` string, required
    - `displayName` string, required: The key as sent.
    - `schema` 'lead' | 'company', required: Always `lead` for variables created by the contact routes.

## Other responses

- `400`: The contact id is not a valid ObjectId.
- `401`: Missing, unknown or disabled API key, or the account of the key no longer exists. Note the body shape: `error` and `code`, not `message`.
- `404`: Contact not found, deleted, or not yours.
- `413`: JSON body larger than 5 MB.
- `422`: Invalid body (same messages as the add route).
- `500`: Unexpected server error. `error`, when present, is a raw internal message: do not parse it. Retry later.

---

[API](https://skmtc.dev/emelia/apis/emelia-api.md) · [All operations](https://skmtc.dev/emelia/apis/emelia-api/llms.txt) · [OpenAPI document](https://skmtc.dev/emelia/apis/emelia-api/revisions/8c0cb435f2c4?raw)
