SuperAI Flow Platform

Sections

Theme switcher

Update organization

Update organization properties with partial update support.

This endpoint allows modification of organization name and active status. All fields are optional, enabling partial updates where only specified fields are changed. Useful for renaming organizations or toggling active status.

Context: - Supports partial updates (only provided fields are updated) - Organization ID cannot be changed (immutable identifier) - Name uniqueness validated if name is being updated - Updating is_active affects user login ability - Timestamps automatically updated on modification - For deactivation with cascade, use PATCH /deactivate endpoint instead

Behavior: 1. Validates organization exists by ID 2. Checks name uniqueness if name is being updated 3. Applies only the provided field updates 4. Updates modified_at timestamp 5. Persists changes to database 6. Returns updated organization Use Cases: - Rename organization after company rebrand - Temporarily disable organization access (set is_active=False) - Re-enable previously disabled organization (set is_active=True) - Correct typos in organization names - Bulk organization updates via automation

Related Endpoints: - GET /admin/organizations/{id} - Retrieve current organization state - PATCH /admin/organizations/{id}/deactivate - Deactivate with user cascade - POST /admin/organizations - Create new organization - DELETE /admin/organizations/{id} - Delete organization

Header Parameters

Authorizationstring

Path Parameters

organization_idstring Required

Unique identifier of the organization to update. Must exist in database.

Body Parameters

is_activenull
namenull
Min length
1
Max length
200

Response

200
Object
Organization updated 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 or UUID 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
404
Object
Organization not found

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?

PUT

/

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