Administration

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:writeaccounting:admin

Who can call it

admin

Retries

Idempotency key accepted

MCP

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

Can't be undone

It deletes, voids, revokes or discards something. Confirm with a person first.

Fields

  • confirmNamestringRequired

    1–300 characters

  • idempotencyKeystring

    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

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."
}'
Response
{
  "data": { … }
}

Try it

Try it

Checks your input with this action’s real schema and answers like the API, with synthetic data. No key needed, and nothing changes.

POST/api/v1/accounting/company.close
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."
}'

More in Administration.