Skip to main content
The Organization Service provides endpoints for creating and managing organizations, which are the top-level containers for all resources in the system.

Authentication

All endpoints require a valid Bearer token in the Authorization header.

Base URL

Endpoints

List Organizations

Retrieve a list of organizations the authenticated user belongs to.
Endpoint: GET /api/org/list

Create Organization

Create a new organization.
Endpoint: POST /api/org/create_org Query Parameters: Response:

Add Member to Organization

Add an existing user as a member to an organization with a specific role.
Endpoint: POST /api/org/add_member Request Body: Response:
This endpoint requires the team_members feature to be enabled for the organization. It adds an existing user to the organization with the specified role and sets their status to β€œactive”.
To add a new user via invitation, use the Invitations Service instead. This endpoint only works for users who already have accounts in the system.

Error Responses

Implementation Notes

  • Every user automatically gets a personal organization upon signup
  • When an organization is created, default roles are automatically created:
    • Owner (Level 100): Full system access
    • Admin (Level 80): Administrative capabilities
    • Member (Level 20): Standard user access
    • Guest (Level 10): Limited access
  • The creating user is automatically assigned the Owner role
  • Organizations serve as isolated environments with their own resources, users, and permissions
  • All resources (knowledge bases, conversations, etc.) are created within the context of an organization