Skip to content
Product Docs

Create Organization

client.organizations.create(OrganizationCreateParams { name } body, RequestOptionsoptions?): Organization { id, name, created_at, 2 more }
POST/api/v2/organizations

Create a new organization.

ParametersExpand Collapse
body: OrganizationCreateParams { name }
name: string

The organization’s display name.

maxLength3000
minLength1
ReturnsExpand Collapse
Organization { id, name, created_at, 2 more }

API response schema for an organization.

id: string

The organization’s unique identifier.

name: string

The organization’s display name.

created_at?: string | null

Creation datetime

formatdate-time
metadata?: Record<string, unknown>

Additional organization metadata.

updated_at?: string | null

Update datetime

formatdate-time

Create Organization

import LlamaCloudAdmin from '@llamaindex/llama-cloud-admin';

const client = new LlamaCloudAdmin({
  apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted
});

const organization = await client.organizations.create({ name: 'x' });

console.log(organization.id);
{
  "id": "id",
  "name": "name",
  "created_at": "2019-12-27T18:11:19.117Z",
  "metadata": {
    "foo": "bar"
  },
  "updated_at": "2019-12-27T18:11:19.117Z"
}
Returns Examples
{
  "id": "id",
  "name": "name",
  "created_at": "2019-12-27T18:11:19.117Z",
  "metadata": {
    "foo": "bar"
  },
  "updated_at": "2019-12-27T18:11:19.117Z"
}