---
title: "Import companies"
url: https://docs.gleap.ai/en/reference/rest-api/importer
method: POST
path: "/companies/importer"
api: "API Reference"
tag: "Company"
operationId: "Importer"
updatedAt: "2026-11-01T18:40:15.677Z"
language: en
---

# Import companies

`POST https://api.gleap.io/v3/companies/importer`

Create or update many companies at once, matched by `companyId` (the dashboard's CSV importer). Body: `{ companies: [{ companyId, name, plan, domain, value, sla, tags, address, customData, ownerEmail }] }`, at most 1000 rows per call. Each row is written like PUT /companies/{companyId}; rows sharing a `companyId` are collapsed (the last one wins) and `lastSeenAt` is not touched. Answers how many were imported, the positions of rows without a `companyId`, and the companies that failed. Re-sending rows is safe.

## Authorization

- `Authorization` (header, required): `Bearer <token>`

## Headers

- `project` (string, required)

## Request body (`application/json`, required)

## Example request

```bash
curl --request POST \
  --url https://api.gleap.io/v3/companies/importer \
  --header 'Authorization: Bearer <token>' \
  --header 'project: <project>' \
  --header 'Content-Type: application/json' \
  --data '{}'
```

## Responses

### 200 (`application/json`)

Ok

- `failed` (object[], required): Companies whose write failed; re-sending them is safe.
  - `message` (string, required)
  - `companyId` (string, required)
- `invalidRows` (number<double>[], required): Positions (0-based) of rows without a usable `companyId`; nothing was written for them.
- `imported` (number<double>, required): Companies created or updated.

```json
{
  "failed": [
    {
      "message": "string",
      "companyId": "string"
    }
  ],
  "invalidRows": [
    0
  ],
  "imported": 0
}
```
