# Flowg8 · Einheit anlegen

Erstelle eine Organisationseinheit, optional unter einer aktiven Einheit.



## POST /v1/organization/units

Authentication: restricted integration key (scope: organization:write) or Flowg8 sign-in access token
Required tenant header: X-Organization-Id.
Required user permissions: Administrator oder Sandbox-Entwickler erforderlich. 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, optional): min length 1 · max length 120 · default null
- parentId (string, optional): uuid · default null
- active (boolean, optional): default true

## Request example (replace example IDs)

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

## Response excerpt

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

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