---
title: "Create or update a company"
method: PUT
path: "/companies/{companyId}"
tags: ["Company"]
---

# Create or update a company

`PUT /companies/{companyId}`

## Request

- Base URL: `https://api.gleap.io/v3`
- URL: `https://api.gleap.io/v3/companies/{companyId}`
- Auth: HTTP bearer

Create or update a company by its external `companyId` (upsert). Only `name`, `plan`, `domain`, `value`,
`sla`, `tags`, `address`, `customData` and the account owner (`owner` or `ownerEmail`) are accepted; any
other field is ignored. `tags` REPLACES the stored list (an empty array clears it), while `address` and
`customData` are merged into the existing values rather than replaced. `customData` accepts up to 100
primitive values, `tags` up to 50. Setting a non-empty `name` here marks it authoritative, so names sent
by the SDK will no longer overwrite it. `owner` is the id of a user in this project (`ownerEmail` their
email address); `null` or `""` clears it. An owner that is not a project member's id or email is ignored
(the rest of the update still applies), so check `owner` in the response.

## Path parameters

- `companyId` string, required

## Headers

- `project` string, required

## Request body

- CompanyUpsertBody
  - `name` unknown
  - `plan` unknown
  - `domain` unknown
  - `value` unknown
  - `sla` unknown
  - `tags` unknown
  - `address` unknown
  - `customData` unknown
  - `owner` unknown
  - `ownerEmail` unknown

## Response `200`

Ok

- CompanyRecord
  - `_id` string, required
  - `companyId` string, required
  - `name` string
  - `plan` string
  - `domain` string
  - `value` number, double
  - `sla` number, double
  - `tags` string[]
  - `address` CompanyAddress: Request and response shapes of the companies API. They exist for the OpenAPI spec (the docs playground renders a body form from it); the service still whitelists and coerces every field itself (normalizeCompanyPayload).
    - `line1` string
    - `line2` string
    - `city` string
    - `state` string
    - `postalCode` string
    - `country` string
  - `customData` object
  - `owner` string
  - `ownerEmail` string
  - `nameIsAuthoritative` boolean
  - `lastSeenAt` string
  - `createdAt` string
  - `updatedAt` string

## Changes

> 104 revisions in range; 1 not diffed.

- **2026-10-19** `32a1af2c963a`: 12 breaking, 6 warning
  - removed `subschema #1, subschema #2` from the `sla` request property `anyOf` list
  - removed `subschema #1, subschema #2` from the `value` request property `anyOf` list
  - the request property `owner` became not nullable
  - the request property `ownerEmail` became not nullable
  - …14 more
- **2026-10-19** `e5e36b975c7a`: 2 breaking, 27 info
  - the request's body type changed from no type to `object`
  - the response's body type changed from no type to `object` for status `200`
  - added the new optional request property `address`
  - added the new optional request property `customData`
  - …25 more
- **2026-09-24** `1d9061096608`: 4 info
  - added the optional property `allOf[subschema #2]/owner` to the response with the `200` status
  - added the optional property `allOf[subschema #2]/ownerEmail` to the response with the `200` status
  - added the optional property `allOf[subschema #2]/ownerSource` to the response with the `200` status
  - added the optional property `allOf[subschema #2]/ownerUpdatedAt` to the response with the `200` status
- …earlier changes not shown

[Operation history](https://skmtc.dev/gleap/apis/gleap-server/changes/companies/:companyId/put.md)

---

[API](https://skmtc.dev/gleap/apis/gleap-server.md) - [All operations](https://skmtc.dev/gleap/apis/gleap-server/llms.txt) - [OpenAPI document](https://skmtc.dev/gleap/apis/gleap-server/revisions/94146112051d?raw)
