---
title: "POST /v1/companies/upsert"
method: POST
path: "/v1/companies/upsert"
tags: ["Companies"]
---

# POST /v1/companies/upsert

`POST /v1/companies/upsert`

## Request

- Base URL: `https://api.relaticle.com`
- URL: `https://api.relaticle.com/v1/companies/upsert`
- Auth: HTTP bearer

## Request body

- object
  - `match` object, required: The unique field and value that identify an existing company.
    - `field` string, required: Code of a custom field marked unique, such as `domains`.
    - `value` string, required: Value to look for. Matched case-insensitively, and inside multi-value fields.
  - `name` string, required
  - `custom_fields` object

## Response `201`

- object
  - `data` object
    - `id` string
    - `type` string
    - `attributes` object
      - `name` string
      - `account_owner_id` string
      - `creation_source` string
      - `created_at` string
      - `updated_at` string
      - `custom_fields` object

## Other responses

- `401`: Missing or invalid access token.
- `402`: Relaticle Cloud only: the workspace is paused until it has an active subscription. The body carries an `upgrade_url`.
- `403`: The token lacks the `create` ability, or its user no longer belongs to the token's workspace.
- `409`: More than one company holds the matched value, so nothing was written. `matches` lists up to 25 of their IDs.
- `422`: Validation failed.
- `429`: Rate limit exceeded. Back off for the number of seconds in `Retry-After`.

---

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