---
title: "Update a contact"
method: POST
path: "/api/contacts/{contactId}"
tags: ["Contacts"]
---

# Update a contact

`POST /api/contacts/{contactId}`

## Request

- Base URL: `https://core-api.getaptly.com`
- URL: `https://core-api.getaptly.com/api/contacts/{contactId}`
- Auth: one of:
  - API key in header `x-token`
  - API key in header `Authorization`
- TypeScript: <https://skmtc.dev/getaptly/apis/aptly-api/docs/api/contacts/:contactId/post.ts> (a function with typed inputs; its response is checked against the schema)

Updates an existing contact by ID using the same upsert logic as `POST /api/contacts`.
The `_id` is taken from the URL — any `_id` in the body is ignored.

Accepts the same **native** or **legacy** body formats as `POST /api/contacts`.
Returns the updated, enriched contact.

## Path parameters

- `contactId` string, required

## Request body

- object
  - `firstname` string
  - `lastname` string
  - `email` union: One or more email addresses.
    - string
    - string[]
  - `phone` object[]
    - `number` string
    - `type` 'mobile' | 'work' | 'home'
  - `typeId` string: Contact type ID.
  - `contactType` string: Contact type name (alternative to `typeId`).
  - `isCompany` boolean
  - `title` string
  - `company` string
  - `imageUrl` string: Absolute URL to a JPG or PNG photo.
  - `customFields` object: Map of custom field ID to value.

## Response `200`

Updated contact.

- Contact
  - `_id` string: MongoDB ObjectId of the contact.
  - `uuid` string
  - `firstname` string
  - `lastname` string
  - `fullName` string: Computed display name (first + last, or company name for org records).
  - `duogram` string: Two-letter initials derived from first and last name.
  - `photoId` string, nullable
  - `imageUrl` string, nullable: CDN thumbnail URL for the contact's photo, or null if none.
  - `email` string
  - `phone` string
  - `typeId` string
  - `companyId` string
  - `address` object
  - `title` string
  - `alerts` object[]
  - `company` string: Company name — populated when isCompany is true.
  - `isCompany` boolean

## Other responses

- `400`: Invalid input.
- `401`: Invalid or missing API key.

---

[API](https://skmtc.dev/getaptly/apis/aptly-api.md) - [All operations](https://skmtc.dev/getaptly/apis/aptly-api/llms.txt) - [OpenAPI document](https://skmtc.dev/getaptly/apis/aptly-api/revisions/75c367e0b8e5?raw)
