---
title: "Update a company"
method: PATCH
path: "/public-api/v1/companies/{id}"
tags: ["Companies"]
---

# Update a company

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

## Request

- Base URL: `https://app.hellobonsai.com`
- URL: `https://app.hellobonsai.com/public-api/v1/companies/{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 company. Every field is optional, and anything you leave out
keeps its current value.

Note that `domains` adds rather than replaces — see the field for how to
clear it.

## Path parameters

- `id` integer, required

## Request body

- object
  - `company` object, required
    - `name` string: New company name. A company must have a name, so `null` or an empty string is ignored rather than clearing it.
    - `default_contact_id` integer, nullable: Id of the contact to make this company's primary point of contact. Must be a contact in your account. A company keeps whichever primary contact it already has, so `null` is ignored rather than clearing it.
    - `description` string, nullable: Free text notes about the company. Send `null` to clear it.
    - `industry` 'arts_and_entertainment' | 'business_and_consumer_services' | 'community_and_society' | 'computers_electronics_and_technology' | 'e_commerce_and_shopping' | 'finance' | 'food_and_drink' | 'gambling' | 'games' | 'health' | 'heavy_industry_and_engineering' | 'hobbies_and_leisure' | 'home_and_garden' | 'jobs_and_career' | 'law_and_government' | 'lifestyle' | 'luxury' | 'news_and_media' | 'pets_and_animals' | 'reference_materials' | 'science_and_education' | 'sports' | 'travel_and_tourism' | 'vehicles' | 'null', nullable: The industry the company operates in. Must be one of the listed values. Send `null` to clear it.
    - `company_size` 'size_1_10' | 'size_11_50' | 'size_51_200' | 'size_201_1000' | 'size_1000_plus' | 'null', nullable: Headcount band for the company. Must be one of the listed values. Send `null` to clear it.
    - `source` 'organic_search' | 'paid_search' | 'email_marketing' | 'organic_social' | 'referrals' | 'other_campaigns' | 'direct_traffic' | 'offline_sources' | 'paid_social' | 'ai_referrals' | 'null', nullable: How the client was acquired. Must be one of the listed values. Send `null` to clear it.
    - `linkedin` string, nullable: Link to the company's LinkedIn profile. Send `null` to clear it.
    - `instagram` string, nullable: Link to the company's Instagram profile. Send `null` to clear it.
    - `twitter` string, nullable: Link to the company's X profile. Send `null` to clear it.
    - `facebook` string, nullable: Link to the company's Facebook page. Send `null` to clear it.
    - `domains` string[], nullable: Domains to add to the company. This is additive, not a replacement: the values you send are added, and re-sending one the company already has changes nothing. To remove every domain, send an empty array. Leave the field out to keep the current domains.

## Response `200`

The company was updated.

- object
  - `data` Company, required: A client company in your CRM. Deals, projects and invoices all belong to one.
    - `id` integer, required: Unique identifier for the company.
    - `name` string, nullable, required: Company name.
    - `default_contact_id` integer, nullable, required: Id of the contact treated as this company's primary point of contact, or `null` when none is set. Deals and invoices created without an explicit contact fall back to it.
    - `description` string, nullable, required: Free text notes about the company, or `null` when unset.
    - `industry` 'arts_and_entertainment' | 'business_and_consumer_services' | 'community_and_society' | 'computers_electronics_and_technology' | 'e_commerce_and_shopping' | 'finance' | 'food_and_drink' | 'gambling' | 'games' | 'health' | 'heavy_industry_and_engineering' | 'hobbies_and_leisure' | 'home_and_garden' | 'jobs_and_career' | 'law_and_government' | 'lifestyle' | 'luxury' | 'news_and_media' | 'pets_and_animals' | 'reference_materials' | 'science_and_education' | 'sports' | 'travel_and_tourism' | 'vehicles' | 'null', nullable, required: The industry the company operates in, or `null` when unset. One of a fixed list.
    - `company_size` 'size_1_10' | 'size_11_50' | 'size_51_200' | 'size_201_1000' | 'size_1000_plus' | 'null', nullable, required: Headcount band for the company, or `null` when unset. One of a fixed list.
    - `source` 'organic_search' | 'paid_search' | 'email_marketing' | 'organic_social' | 'referrals' | 'other_campaigns' | 'direct_traffic' | 'offline_sources' | 'paid_social' | 'ai_referrals' | 'null', nullable, required: How the client was acquired, or `null` when unset. One of a fixed list.
    - `linkedin` string, nullable, required: Link to the company's LinkedIn profile, or `null` when unset.
    - `instagram` string, nullable, required: Link to the company's Instagram profile, or `null` when unset.
    - `twitter` string, nullable, required: Link to the company's X profile, or `null` when unset.
    - `facebook` string, nullable, required: Link to the company's Facebook page, or `null` when unset.
    - `archived_at` string, date-time, nullable, required: When the company was archived, or `null` while it is active. Archived companies are left out of the list endpoint.
    - `created_at` string, date-time, required: When the company was added to your account.
    - `domains` string[], required: Domains associated with the company, lowercased and stripped of any protocol or `www.` prefix. A domain can belong to only one company in your account.
    - `avatar_url` string, nullable, required: Link to the company's logo, or `null` when it has none. Read-only — the create and update endpoints don't accept it. Bonsai shows generated initials in the app when there is no logo; those are never returned here.
    - `url` string, required: Absolute link to the company 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 `company` wrapper.
- `401`: The access token is missing, expired or invalid.
- `403`: This token is not allowed to read or write companies in your CRM.
- `404`: No company with that id in your account.
- `422`: A value is outside one of the fixed lists, a domain is malformed or already claimed by another company, or `default_contact_id` is not a contact in your account.
- `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)
