PATCH /api/entities/:entityId/organization.
GET /organizations
List the Organizations you can create Entities in, each with the Entities it holds. Use it to pick the organizationId for POST /api/entities.
- Global
staffUsers see every Organization. - Other Users see the Organizations where they hold the
staffRole. - An API key confined to one Entity receives an empty array.
200: an array of Organization summaries.
POST /organizations
Create an empty Organization. Add Entities to it by creating them with its organizationId or by moving existing Entities into it.
Body
Response
201
409 with ORGANIZATION_NAME_ALREADY_EXISTS_ERROR.
GET /organizations/:organizationId
Get one Organization with the Entities it holds. The response has the same shape as one item of GET /organizations.
PATCH /organizations/:organizationId
Rename an Organization. The body and validation rules match POST /organizations.
Response 200: the renamed Organization (id, name, createdAt).
DELETE /organizations/:organizationId
Delete an empty Organization. Deleting an Organization also removes every Membership in it.
An Organization that still holds an Entity can’t be deleted. The request returns 409 with ORGANIZATION_NOT_EMPTY_ERROR. Move its Entities to another Organization first.
- Status:
204.
GET /organizations/:organizationId/members
List the Users who hold a Membership in the Organization.
Response 200: an array of members.

