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).
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
}