# Organizations

Group people on a Pro deployment with owners, admins, and members.

Organizations are a Pro feature. They live on one Charter deployment (not as `/v1` app data). Free installs keep a flat user list.

To create an organization once the feature is on, an instance operator may call:

```sh
curl -X POST http://127.0.0.1:3000/api/orgs \
  -H "Authorization: Bearer crt_…" \
  -H "Content-Type: application/json" \
  -d '{"name":"Acme"}'
```

Authenticate with the same session cookie, API key, or access token as the rest of Charter. After that, you may invite people ([Invitations](/docs/invitations/)) or configure organization OpenID Connect ([SSO](/docs/sso/)).

## Turn it on or off

Organizations mount when the license key allows them. To leave `/api/orgs` unmounted:

```sh
CHARTER_DISABLE_ORGANIZATIONS=1 charter serve
# or
charter serve --no-organizations
```

When organizations are off, invitations and organization SSO are forced off too.

## Roles

Membership roles are separate from `/v1` permission role strings:

| Role | What they can do |
| --- | --- |
| `owner` | Manage members, invitations, and SSO; full org control |
| `admin` | Same management as owner for day-to-day work |
| `member` | Belong to the org without managing it |

Instance operators (`admin_since`) can always manage every organization.

## HTTP API

Routes mount under `/api/orgs` when the feature is on.

Common calls:

- `GET /api/orgs` / `POST /api/orgs`: list or create (operators)
- `GET|PATCH|DELETE /api/orgs/{id}`: read, update, delete
- `GET|POST /api/orgs/{id}/members`: list or add an existing user by email
- `PATCH|DELETE /api/orgs/{id}/members/{userId}`: change role or remove

## Next steps

- [Invitations](/docs/invitations/) to bring people in by email
- [SSO](/docs/sso/) for organization OpenID Connect
- [Mail](/docs/mail/) for the outbound invitation transport
