Skip to content

Create organization

client.organizations.create(OrganizationCreateParams { name, type } body, RequestOptionsoptions?): OrganizationCreateResponse { id, idp_org_id, idp_provider, 3 more }
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).

ParametersExpand Collapse
body: OrganizationCreateParams { name, type }
name: string
maxLength255
minLength1
type?: "BROKERAGE" | "TPA" | "GENERAL_AGENT" | 3 more | null
  • BROKERAGE - BROKERAGE
  • TPA - TPA
  • GENERAL_AGENT - GENERAL_AGENT
  • CHANNEL_PARTNER - CHANNEL_PARTNER
  • CONSULTING_FIRM - CONSULTING_FIRM
  • API_PLATFORM - API_PLATFORM
One of the following:
"BROKERAGE"
"TPA"
"GENERAL_AGENT"
"CHANNEL_PARTNER"
"CONSULTING_FIRM"
"API_PLATFORM"
ReturnsExpand Collapse
OrganizationCreateResponse { id, idp_org_id, idp_provider, 3 more }
id: string

Prefixed organization identifier (org_<base64-encoded-uuid>).

idp_org_id: string | null

IdP-issued tenant id (WorkOS org id).

idp_provider: "workos" | "vitable" | null
  • workos - WorkOS
  • vitable - Vitable
One of the following:
"workos"
"vitable"
name: string

Human-readable organization name.

super_in: boolean

Whether this organization reads across every organization.

type: "BROKERAGE" | "TPA" | "GENERAL_AGENT" | 3 more | null
  • BROKERAGE - Brokerage
  • TPA - TPA
  • GENERAL_AGENT - General Agent
  • CHANNEL_PARTNER - Channel Partner
  • CONSULTING_FIRM - Consulting Firm
  • API_PLATFORM - API Platform
One of the following:
"BROKERAGE"
"TPA"
"GENERAL_AGENT"
"CHANNEL_PARTNER"
"CONSULTING_FIRM"
"API_PLATFORM"

Create organization

import VitableConnect from '@vitable-inc/vitable-connect';

const client = new VitableConnect();

const organization = await client.organizations.create({
  name: 'Acme Brokerage',
  type: 'BROKERAGE',
});

console.log(organization.id);
{
  "id": "org_abc123def456",
  "name": "Acme Brokerage",
  "type": "BROKERAGE",
  "idp_org_id": "org_01J0WORKOS",
  "idp_provider": "workos",
  "super_in": false
}
Returns Examples
{
  "id": "org_abc123def456",
  "name": "Acme Brokerage",
  "type": "BROKERAGE",
  "idp_org_id": "org_01J0WORKOS",
  "idp_provider": "workos",
  "super_in": false
}