# Flowg8 · Update a unit

Replace all editable unit fields using the current revision.



## PUT /v1/organization/units/{unitId}

Authentication: restricted integration key (scope: organization:write) or Flowg8 sign-in access token
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 120
- externalId (string, required): min length 1 · max length 120 · default null
- parentId (string, required): uuid · default null
- active (boolean, required): default true
- revision (integer, required): min 1 · max 9007199254740991

## Request example (replace example IDs)

```sh
curl -X PUT "https://api.flowg8.io/v1/organization/units/10000000-0000-4000-8000-000000000007" \
  -H "authorization: Bearer $FLOWG8_API_KEY" \
  -H "x-organization-id: 10000000-0000-4000-8000-000000000001" \
  -H "idempotency-key: example-update-unit-001" \
  -H "content-type: application/json" \
  --data-raw '{
  "name": "Platform engineering",
  "externalId": "engineering",
  "parentId": null,
  "active": true,
  "revision": 1
}'
```

## Response excerpt

```json
{
  "units": [
    {
      "name": "Engineering",
      "externalId": "engineering",
      "parentId": null,
      "active": true,
      "id": "10000000-0000-4000-8000-000000000007",
      "revision": 2
    }
  ]
}
```

Source: /docs/update-unit
Full schemas: /docs/openapi.json
