# Flowg8 · Update a service account

Rename, restrict, disable or re-enable an integration identity.

Send the current revision. Disabling an account invalidates every attached key on subsequent requests. Reducing its scopes invalidates keys exceeding the new ceiling. Re-enabling or widening permissions can make non-revoked, unexpired keys usable again. Explicitly revoke individual keys to prevent reuse. Creator membership is audit metadata: service keys continue when the human creator leaves. Legacy keys without serviceAccountId retain their creator-bound behavior.

## PUT /v1/service-accounts/{serviceAccountId}

Authentication: FLOWG8_ACCESS_TOKEN from Flowg8 sign-in
Required tenant header: X-Organization-Id.
Required user permissions: Administrator or Sandbox developer required. The API checks current membership, roles, key scopes and resource permissions on every request. Documentation visibility grants no access.

## Input parameters
- name (string, required): min length 1 · max length 80
- scopes (array, required): min items 1 · max items 7
- active (boolean, required): 
- revision (integer, required): min 1 · max 9007199254740991

## Request example (replace example IDs)

```sh
curl -X PUT "https://api.flowg8.io/v1/service-accounts/10000000-0000-4000-8000-000000000010" \
  -H "authorization: Bearer $FLOWG8_ACCESS_TOKEN" \
  -H "x-organization-id: 10000000-0000-4000-8000-000000000001" \
  -H "idempotency-key: example-update-service-account-001" \
  -H "content-type: application/json" \
  --data-raw '{
  "name": "ERP onboarding",
  "scopes": [
    "users:invite"
  ],
  "active": false,
  "revision": 1
}'
```

Source: /docs/update-service-account
Full schemas: /docs/openapi.json
