# Organizations

> An organization groups members, instances and integrations under one account.

An **Organization** is the top-level account in Flowkiwi. It owns instances, groups members, and is the boundary for integrations and audit logs. The partner who creates an organization becomes its first owner.

## The Organization object

## Common workflows

- **Onboard a new account.** Call [`POST /organizations`](/api/identity/organizations/create/) once a partner signs up; the authenticated partner becomes the owner. Use the returned id for every subsequent call.
- **Rename without disruption.** [`PATCH /organizations/{id}`](/api/identity/organizations/rename/) updates the display name; only owners can rename.
- **Tear down cleanly.** [`DELETE /organizations/{id}`](/api/identity/organizations/delete/) only succeeds when the organization has no instances left, so detach instances first.

## Conventions

### Authentication

All requests require an OAuth 2.0 bearer token:

```
Authorization: Bearer <token>
```

Identity is platform-scoped: there is **no** `X-Flowkiwi-Organization-Id` header. Authorization is derived from the partner identity in the token, and ownership checks are enforced per organization.

### Partial updates

`PATCH` uses [JSON Merge Patch](https://datatracker.ietf.org/doc/html/rfc7396) with `Content-Type: application/merge-patch+json`.
