---
title: "Archive companies in bulk (v2)"
method: POST
path: "/v2/companies/batch-archive"
tags: ["companies"]
---

# Archive companies in bulk (v2)

`POST /v2/companies/batch-archive`

## Request

- Base URL: `https://api.prod.getdex.com`
- URL: `https://api.prod.getdex.com/v2/companies/batch-archive`
- Auth: HTTP bearer

Archive up to 100 companies (`company_ids`). IDs outside the workspace and companies already archived are skipped. Viewers are refused; closed to API keys. Workspace-only: send the `X-Dex-Workspace` header (404 `record_not_found` without it). **Requires an `Idempotency-Key` header**. Returns `{ data: { affected, ids } }` with the companies actually archived.

## Headers

- `Idempotency-Key` string, required

## Request body

- object
  - `company_ids` string[], required

## Response `200`

Successful response

- object
  - `data` object, required
    - `affected` integer, required
    - `ids` string[]
    - `failed` object[]
      - `id` string, required
      - `error` object, required
        - `code` string, required
        - `message` string, required

## Other responses

- `400`: Request body failed validation.
- `401`: Missing or invalid API key.
- `403`: Valid key, insufficient permission.
- `404`: Resource does not exist.
- `409`: Request conflicts with the current state of the resource.
- `429`: Rate limit exceeded.
- `500`: Unexpected server error.

## Changes

- **2026-10-22** `657247ddcf7c`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/getdex/apis/dex-public-api/changes/v2/companies/batch-archive/post.md)

---

[API](https://skmtc.dev/getdex/apis/dex-public-api.md) · [All operations](https://skmtc.dev/getdex/apis/dex-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/getdex/apis/dex-public-api/revisions/657247ddcf7c?raw)
