# Flowg8 · Servicekonto erstellen

Erstelle eine Integrationsidentität mit expliziter Berechtigungsobergrenze.

Erstelle das Konto mit einem User-Token. Erstelle danach über API-Key erstellen Schlüssel mit serviceAccountId. Die Kontoanlage liefert nur Metadaten. Jeder Schlüssel darf eine Teilmenge der normalisierten Kontorechte erhalten. flows:write umfasst flows:read; organization:write umfasst organization:read. Maximal 100 Konten je Workspace.

## POST /v1/service-accounts

Authentication: FLOWG8_ACCESS_TOKEN from Flowg8 sign-in
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 80
- scopes (array, required): min items 1 · max items 7

## Request example (replace example IDs)

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

## Response excerpt

```json
{
  "id": "10000000-0000-4000-8000-000000000010",
  "name": "ERP onboarding",
  "scopes": [
    "users:invite"
  ],
  "active": true,
  "revision": 1
}
```

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