# company.close

Permanently close the company: delete its stored files, every record it has in Oatmilk, and the company itself with its memberships. It can't be undone; export the data first with company.export. confirmName must be the company's name (case doesn't matter). Only an administrator, with their own credential (the web app, or the terminal app or an API key), can close it; AI apps and Ask AI can't. The installation's own company can't be closed. Returns the counts of rows and files deleted and whether the company's sign-in organization was deleted.

`POST /api/v1/accounting/company.close`

Permissions: `accounting:write`, `accounting:admin` · Roles: admin · Destructive: confirm with a person first

Not available over MCP: Permanently deletes the company; a person closes it in Oatmilk's Settings or the terminal app.

## Fields

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `confirmName` | string | Yes | 1–300 characters. |
| `idempotencyKey` | string |  | Any unique text you generate once per intended change, so a retried request only happens once. Send it as the Idempotency-Key header instead if you prefer; if you send both they must match. 8–200 characters. |

## Example request

```bash
curl https://app.getoatmilk.com/api/v1/accounting/company.close \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "confirmName": "Synthetic Ventures Inc."
}'
```

Reference page: https://app.getoatmilk.com/docs/api/company.close
