---
title: "Update a contact"
method: PATCH
path: "/public-api/v1/contacts/{id}"
tags: ["Contacts"]
---

# Update a contact

`PATCH /public-api/v1/contacts/{id}`

## Request

- Base URL: `https://app.hellobonsai.com`
- URL: `https://app.hellobonsai.com/public-api/v1/contacts/{id}`
- Auth: one of:
  - OAuth 2
    - Authorization code: `https://app.hellobonsai.com/oauth/authorize`
    - Token URL: `https://app.hellobonsai.com/oauth/token`
  - HTTP bearer

Updates a contact. Every field is optional, and anything you leave out
keeps its current value.

This endpoint does not change which companies a contact is linked to.

## Path parameters

- `id` integer, required

## Request body

- object
  - `contact` object, required
    - `name` string: New full name. A contact must have a name, so `null` or an empty string is ignored rather than clearing it.
    - `email` string: New email address. A contact must have an email, so `null` or an empty string is ignored rather than clearing it. Must stay unique among your contacts.
    - `job_title` string, nullable: New job title. Send `null` or an empty string to clear it; leave the field out to keep it.
    - `phone_number` string, nullable: New phone number. Send `null` or an empty string to clear it; leave the field out to keep it.

## Response `200`

The contact was updated.

- object
  - `data` Contact, required: A person you work with at a client company, or a standalone contact who belongs to none.
    - `id` integer, required: Unique identifier for the contact.
    - `name` string, nullable, required: The contact's full name.
    - `email` string, nullable, required: The contact's email address.
    - `job_title` string, nullable, required: The contact's job title, or `null` when unset.
    - `phone_number` string, nullable, required: The contact's phone number, or `null` when unset.
    - `archived_at` string, date-time, nullable, required: When the contact was archived, or `null` while they are active. Archived contacts are left out of the list endpoint.
    - `created_at` string, date-time, required: When the contact was added to your account.
    - `company_ids` integer[], required: Ids of every company this contact is linked to. A contact can belong to more than one.
    - `default_company_id` integer, nullable, required: Id of the company this contact is the primary contact for, or `null` when they are not the primary contact anywhere.
    - `url` string, required: Absolute link to the contact in the Bonsai app. Share it to send someone straight to the record.
  - `meta` Meta, required: Metadata returned alongside every single-resource response.
    - `request_id` string, required: Identifier for this request. Quote it when contacting support about a specific call.

## Other responses

- `400`: The request body is missing its `contact` wrapper.
- `401`: The access token is missing, expired or invalid.
- `403`: This token is not allowed to read or write contacts in your CRM.
- `404`: No contact with that id in your account.
- `422`: The email is malformed, or already belongs to another contact.
- `429`: Rate limit exceeded. Wait at least `Retry-After` seconds before trying again.

---

[API](https://skmtc.dev/hellobonsai/apis/bonsai-api.md) - [All operations](https://skmtc.dev/hellobonsai/apis/bonsai-api/llms.txt) - [OpenAPI document](https://skmtc.dev/hellobonsai/apis/bonsai-api/revisions/abf12ed6a8d3?raw)
