Flowion Docs

Members

Organization membership, roles (Owner/Admin/User), and per-environment access grants for User-role members.

7 endpoints

Lists an organization's members, paginated. Requires only membership, not a minimum role — seeing who's on the team isn't a privileged action.

get/v1/organizations/{organization_id}/membersRequires a bearer token

Parameters

NameInTypeDescription
organization_id*pathstring<uuid>Organization id
pagequeryinteger<int32>1-indexed page number. Defaults to 1.
per_pagequeryinteger<int32>Members per page, capped at 100. Defaults to 20.

Responses

StatusBodyDescription
200ListMembersResponseA page of the organization's members
401ErrorBodyMissing, invalid, or expired bearer token
404ErrorBodyNo organization with this id exists, or the caller is not a member of it

Adds a user to the organization with the given role. Requires the caller to be an Owner or Admin.

post/v1/organizations/{organization_id}/membersRequires a bearer token

Parameters

NameInTypeDescription
organization_id*pathstring<uuid>Organization id

Request bodyAddMemberRequest

FieldTypeDescription
role*string"admin" or "user""owner" is rejected. Every organization gets exactly one Owner, assigned at creation (organizations::create::create_organization); there is no membership transfer operation yet to reassign it.
user_id*string

Responses

StatusBodyDescription
201MemberSummaryThe newly created membership
400ErrorBodyrole is not "admin" or "user"
401ErrorBodyMissing, invalid, or expired bearer token
403ErrorBodyThe caller is a member but not an Owner or Admin
404ErrorBodyNo organization with this id exists, or the caller is not a member of it
409ErrorBodyThis user is already a member of the organization

Changes a member's role to Admin or User. Never accepts `"owner"` — see [`db::organization_members::update_role`], there is no membership transfer operation yet.

patch/v1/organizations/{organization_id}/members/{member_id}Requires a bearer token

Requires the caller to be an Owner or Admin — and if the caller is only an Admin, the target member must currently have the User role: per docs/architecture/tenancy.md's permission table, an Admin cannot touch the Owner's or another Admin's role, only the Owner can.

Parameters

NameInTypeDescription
organization_id*pathstring<uuid>Organization id
member_id*pathstring<uuid>Membership id

Request bodyUpdateMemberRoleRequest

FieldTypeDescription
role*string

Responses

StatusBodyDescription
200MemberSummaryThe updated membership
400ErrorBodyrole is not "admin" or "user"
401ErrorBodyMissing, invalid, or expired bearer token
403ErrorBodyThe caller is a member but not an Owner or Admin, or is an Admin trying to change the Owner's or another Admin's role
404ErrorBodyNo organization or membership with this id exists, or the caller is not a member of the organization
409ErrorBodyThe target membership is the organization's Owner, or role is "owner"

Removes a member from the organization. The Owner can never be removed this way (see [`db::organization_members::remove_member`]).

delete/v1/organizations/{organization_id}/members/{member_id}Requires a bearer token

Requires the caller to be an Owner or Admin, with the same Admin-cannot-touch-Owner-or-another-Admin restriction as [crate::members::update_role::update_member_role].

Parameters

NameInTypeDescription
organization_id*pathstring<uuid>Organization id
member_id*pathstring<uuid>Membership id

Responses

StatusBodyDescription
204The member was removed
401ErrorBodyMissing, invalid, or expired bearer token
403ErrorBodyThe caller is a member but not an Owner or Admin, or is an Admin trying to remove the Owner or another Admin
404ErrorBodyNo organization or membership with this id exists, or the caller is not a member of the organization
409ErrorBodyThe target membership is the organization's Owner

Lists a member's granted environment access.

get/v1/organizations/{organization_id}/members/{member_id}/environment-accessRequires a bearer token

Requires the caller to be an Owner or Admin — like granting/revoking, this is an org-management action per docs/architecture/tenancy.md's permission table, not something a User-role member can inspect about themselves through this endpoint.

Parameters

NameInTypeDescription
organization_id*pathstring<uuid>Organization id
member_id*pathstring<uuid>Membership id

Responses

StatusBodyDescription
200The member's granted environment access
401ErrorBodyMissing, invalid, or expired bearer token
403ErrorBodyThe caller is a member but not an Owner or Admin
404ErrorBodyNo organization or membership with this id exists, or the caller is not a member of the organization

Grants a member access to one of the organization's environments.

post/v1/organizations/{organization_id}/members/{member_id}/environment-accessRequires a bearer token

Only meaningful for User-role members — Owners and Admins already implicitly access every environment in the org (see [db::organization_members::grant_environment_access]), so granting access to an Owner or Admin membership is rejected rather than silently accepted and ignored. Requires the caller to be an Owner or Admin.

Parameters

NameInTypeDescription
organization_id*pathstring<uuid>Organization id
member_id*pathstring<uuid>Membership id

Request bodyGrantEnvironmentAccessRequest

FieldTypeDescription
environment_id*string<uuid>

Responses

StatusBodyDescription
201EnvironmentAccessSummaryThe newly created grant
400ErrorBodyThe target membership does not have the User role
401ErrorBodyMissing, invalid, or expired bearer token
403ErrorBodyThe caller is a member but not an Owner or Admin
404ErrorBodyNo organization, membership, or environment with this id exists, or the caller is not a member of the organization
409ErrorBodyThis member already has access to this environment

Revokes a member's access to an environment. Idempotent.

delete/v1/organizations/{organization_id}/members/{member_id}/environment-access/{environment_id}Requires a bearer token

Revoking access that was never granted, or already revoked, still returns 204 (see [db::organization_members::revoke_environment_access]). Requires the caller to be an Owner or Admin.

Parameters

NameInTypeDescription
organization_id*pathstring<uuid>Organization id
member_id*pathstring<uuid>Membership id
environment_id*pathstring<uuid>Environment id

Responses

StatusBodyDescription
204The grant was revoked, or never existed
401ErrorBodyMissing, invalid, or expired bearer token
403ErrorBodyThe caller is a member but not an Owner or Admin
404ErrorBodyNo organization or membership with this id exists, or the caller is not a member of the organization