# platform.admin.organizations.update

Platform administrators only: pause or resume a workspace (status approved or suspended) and turn Oatmilk's AI credits on or off for it (platformAi), at its current revision (0 for a workspace with no access record yet). The platform's own organization can't be changed.

`POST /api/v1/accounting/platform.admin.organizations.update`

Permissions: `accounting:read`, `accounting:write`, `accounting:admin` · Roles: admin · Idempotency key required · Send `expectedRevision`

MCP tool: `accounting_platform_admin_organizations_update`

## Fields

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `organizationId` | string | Yes | The company to work in, for people who belong to more than one. API keys belong to one company. Matches ^[A-Za-z0-9_-]{1,200}$. |
| `expectedRevision` | integer | Yes | The record's current revision, from the last time you read it. If someone changed the record since, the request is refused with a conflict so you can reload and check before trying again. 0 to 9007199254740991. |
| `status` | enum |  | Only include records with this status. One of: `approved`, `suspended`. |
| `platformAi` | boolean |  |  |
| `idempotencyKey` | string | Yes | 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/platform.admin.organizations.update \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "organizationId": "organization_id",
  "expectedRevision": 3,
  "status": "approved"
}'
```

Reference page: https://app.getoatmilk.com/docs/api/platform.admin.organizations.update
