## Create organization `organizations.create(**kwargs) -> OrganizationCreateResponse` **post** `/v1/organizations` Onboards the authenticated user's partner Organization: creates the local Organization + the creator's admin membership atomically, then mirrors it to WorkOS (creates the WorkOS org and binds the creator as admin). 409 `organization_already_exists` when the user already has an organization (v0: one organization per user). ### Parameters - `name: String` - `type: :BROKERAGE | :TPA | :GENERAL_AGENT | 3 more` * `BROKERAGE` - BROKERAGE * `TPA` - TPA * `GENERAL_AGENT` - GENERAL_AGENT * `CHANNEL_PARTNER` - CHANNEL_PARTNER * `CONSULTING_FIRM` - CONSULTING_FIRM * `API_PLATFORM` - API_PLATFORM - `:BROKERAGE` - `:TPA` - `:GENERAL_AGENT` - `:CHANNEL_PARTNER` - `:CONSULTING_FIRM` - `:API_PLATFORM` ### Returns - `class OrganizationCreateResponse` - `id: String` Prefixed organization identifier (`org_`). - `idp_org_id: String` IdP-issued tenant id (WorkOS org id). - `idp_provider: :workos | :vitable` * `workos` - WorkOS * `vitable` - Vitable - `:workos` - `:vitable` - `name: String` Human-readable organization name. - `super_in: bool` Whether this organization reads across every organization. - `type: :BROKERAGE | :TPA | :GENERAL_AGENT | 3 more` * `BROKERAGE` - Brokerage * `TPA` - TPA * `GENERAL_AGENT` - General Agent * `CHANNEL_PARTNER` - Channel Partner * `CONSULTING_FIRM` - Consulting Firm * `API_PLATFORM` - API Platform - `:BROKERAGE` - `:TPA` - `:GENERAL_AGENT` - `:CHANNEL_PARTNER` - `:CONSULTING_FIRM` - `:API_PLATFORM` ### Example ```ruby require "vitable_connect" vitable_connect = VitableConnect::Client.new( environment: "environment_1" # defaults to "production" ) organization = vitable_connect.organizations.create(name: "Acme Brokerage") puts(organization) ``` #### Response ```json { "id": "org_abc123def456", "name": "Acme Brokerage", "type": "BROKERAGE", "idp_org_id": "org_01J0WORKOS", "idp_provider": "workos", "super_in": false } ```