---
title: "Add Company"
method: POST
path: "/companies"
---

# Add Company

`POST /companies`

Lets you add a new company to the org.

## Request body

- object
  - `name` string, required — Name of the company,
  - `externalId` string, required — External ID of the company.
  - `hierarchyDefinitionCode` string, required — Unique code of the hierarchy applicable for the company. You can use only from hierarchies that are configured for the org.
  - `parentCompany` object — Details of parent company for the current company. This is required for child companies.
    - `externalId` string — External ID of the parent company.
  - `extendedFields` object — Details of the company in name:value pairs.
    - `industry` string
    - `owner` string
    - `address1` string
    - `address2` string
    - `city` string
    - `state` string
    - `country` string
    - `pincode` string

## Response `200`

200

- object
  - `externalId` string
  - `companyId` integer
  - `name` string
  - `hierarchyDefinitionCode` string
  - `extendedFields` object
    - `address1` string
    - `company_city` string
    - `company_country` string
    - `company_state` string
    - `owner` string
    - `phone` string
    - `pincode` string
  - `warnings` object[]

## Other responses

- `400` — 400

---

[API](https://skmtc.net/capillarytech/apis/sample-api.md) · [All operations](https://skmtc.net/capillarytech/apis/sample-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/capillarytech/sample-api/revisions/de241f2ed9b3/schema)
