Update a company

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
    Type: integer
    required

    Id of the company to update.

Body
required
application/json

The attributes to change, wrapped in a company key. All of them are optional.

  • company
    Type: object
    required
Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for patch/public-api/v1/companies/{id}
curl https://app.hellobonsai.com/public-api/v1/companies/1 \
  --request PATCH \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "company": {
    "name": "Acme Corp",
    "default_contact_id": 7,
    "domains": [
      "example.net"
    ]
  }
}'
{
  "data": {
    "id": 42,
    "name": "Acme Corp",
    "default_contact_id": 7,
    "archived_at": "2026-04-14T09:12:04.000Z",
    "created_at": "2026-04-14T09:12:04.000Z",
    "domains": [
      "example.com",
      "example.net"
    ],
    "url": "https://app.hellobonsai.com/companies/42"
  },
  "meta": {
    "request_id": "b1f0d2c4-7a9e-4c3b-8d5f-1e2a3b4c5d6e"
  }
}