Administration

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

Who can call it

admin

Retries

Idempotency key required, with expectedRevision

MCP

accounting_platform_admin_organizations_update

Fields

  • organizationIdstringRequired

    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}$

  • expectedRevisionintegerRequired

    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

  • statusenum

    Only include records with this status.

    approvedsuspended
  • platformAiboolean
  • idempotencyKeystringRequired

    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/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"
}'
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/platform.admin.organizations.update
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"
}'

More in Administration.