SuperAI Flow Platform

Sections

Theme switcher

Create new organization

Create a new isolated tenant organization.

Each organization acts as a data boundary with its own users, flows, and executions. Organizations are the top-level entity for multi-tenancy and access control.

Context: - Organizations are created in active state by default - Each organization gets a unique UUID identifier - Organization names must be unique across the platform - New organizations start with no users (add users separately) - Organization isolation ensures data cannot leak across tenants - Creation timestamp tracked for audit purposes

Behavior: 1. Validates organization name is unique 2. Creates organization record in database 3. Generates UUID identifier 4. Sets timestamps for creation and modification 5. Returns created organization with all metadata

Use Cases: - Onboarding new customer or department - Creating sandbox/test organizations for development - Setting up multi-tenant environments - Organization provisioning via automated workflows

Related Endpoints: - GET /admin/organizations - List all organizations - PUT /admin/organizations/{id} - Update organization details - POST /admin/organizations/{id}/users - Add users to organization - DELETE /admin/organizations/{id} - Delete organization

Header Parameters

Authorizationstring

Body Parameters

is_activeboolean

Whether the organization is active. Active organizations allow user logins and flow executions. Inactive organizations are read-only. Default: True (organization created in active state)

Default value
true
namestring Required

Organization display name. Must be unique across the platform. Used in UI, reports, and organization selection interfaces. Constraints: 1-200 characters, cannot be empty or whitespace only.

Min length
1
Max length
200

Response

201
Object
Organization created successfully

Response Attributes

created_atstring Required

Timestamp when organization was created. Format: ISO 8601 UTC (e.g., '2025-01-23T15:30:00Z').

idstring Required

Unique identifier for the organization. Format: UUID v4

is_activeboolean

Whether the organization is active. Active organizations allow user logins and flow executions. Inactive organizations are read-only; users cannot log in. Set via PUT /admin/organizations/{id} or PATCH /deactivate endpoint.

Default value
true
modified_atstring Required

Timestamp when organization was last modified. Updated automatically on any field change. Format: ISO 8601 UTC (e.g., '2025-01-24T10:45:00Z'). Used for change tracking and audit logs.

namestring Required

Organization display name. Unique across the platform. Used in UI, reports, and organization selection. Can be updated via PUT /admin/organizations/{id}

400
Object
Invalid input - empty name, name too long, or invalid format

Response Attributes

errorobject Required

Standard error detail structure.

This model matches the error format returned by the centralized exception handlers in app/api/errors/handlers.py.

Show child attributes

request_idnull
403
Object
Forbidden - Insufficient permissions to access this resource

Response Attributes

errorobject Required

Standard error detail structure.

This model matches the error format returned by the centralized exception handlers in app/api/errors/handlers.py.

Show child attributes

request_idnull
409
Object
Organization with this name already exists

Response Attributes

errorobject Required

Standard error detail structure.

This model matches the error format returned by the centralized exception handlers in app/api/errors/handlers.py.

Show child attributes

request_idnull
422
Object
Validation Error

Response Attributes

detailarray

Show child attributes

500
Object
Internal Server Error - An unexpected error occurred

Response Attributes

errorobject Required

Standard error detail structure.

This model matches the error format returned by the centralized exception handlers in app/api/errors/handlers.py.

Show child attributes

request_idnull
Was this section helpful?

What made this section unhelpful for you?

POST

/

Select
1

Response

Was this section helpful?

What made this section unhelpful for you?

View as Markdown

Ask an AI

Open in ChatGPTOpen in ClaudeOpen in Perplexity

Code with AI

Open in Copilot