Create Organization
Create a new organization and automatically switch to it. The user becomes the owner of the new organization.
Requirements:
- User must be authenticated
- User must have
create/organizationpermission
Behavior:
- If user has an existing owned organization with hubs, hub fields are optional (will copy from source)
- If user has no owned organization, hub fields (hubName, hubLat, hubLng) are required
- If
copyDataFromFirstOrgis true, copies configuration, hubs, and flows from user’s first owned organization - Creates default flows from templates
- Generates sample data (vehicles, data sources, tasks) via background job
Note: After creation, the previous access token is revoked. You must use the new token returned in the response.
Authorizations
Use a valid Bearer token to authenticate.
Body
Name for the new organization
3 - 100Hub name. Required if user has no existing owned organization with hubs.
100Hub latitude. Required if user has no existing owned organization with hubs.
-90 <= x <= 90Hub longitude. Required if user has no existing owned organization with hubs.
-180 <= x <= 180Whether to copy data from user's first organization where they have 'owner' role. When enabled, copies: (1) Organization configuration (language, currency, settings), (2) All hubs the user has access to, (3) Custom roles with system permissions only (custom module permissions are excluded), (4) All flows. Note: Default roles (owner, admin, planner, field user) always use standard templates regardless of this setting.
Response
Organization created successfully - returns new access token and user data
Operation success status
Success message
New access token for the created organization
Token expiration time in seconds
User data for the new organization
Always true for new organizations
Updated list of all user's organizations