Skip to main content

Function: createOrg()

createOrg(client, props): Promise<{ id: number; name: string; description: string; visibility: "PRIVATE" | "PUBLIC"; location: string; createdAt: string; updatedAt: string; isPersonalOrg: boolean; socialLinks: object[]; }>

Creates a new organization.

Parameters​

client​

ApiClient

The API client instance

props​

The request properties

body​

{ name: string; description?: string; visibility: "PRIVATE" | "PUBLIC"; } = createOrgBodySchema

Request body with organization details

body.name​

string = ...

body.description?​

string = ...

body.visibility​

"PRIVATE" | "PUBLIC" = ...

Returns​

Promise<{ id: number; name: string; description: string; visibility: "PRIVATE" | "PUBLIC"; location: string; createdAt: string; updatedAt: string; isPersonalOrg: boolean; socialLinks: object[]; }>

Promise resolving to the created organization

Operation Id​

create-org

Example​

const org = await createOrg(client, {
body: { name: 'my-org', description: 'My organization', visibility: 'PUBLIC' }
});