Skip to content
Product Docs

Organizations

List Organizations
client.organizations.list(OrganizationListParams { name, page_size, page_token } query?, RequestOptionsoptions?): PaginatedCursor<Organization { id, name, created_at, 2 more } >
GET/api/v2/organizations
Create Organization
client.organizations.create(OrganizationCreateParams { name } body, RequestOptionsoptions?): Organization { id, name, created_at, 2 more }
POST/api/v2/organizations
Get Organization
client.organizations.get(stringorganizationID, RequestOptionsoptions?): Organization { id, name, created_at, 2 more }
GET/api/v2/organizations/{organization_id}
Update Organization
client.organizations.update(stringorganizationID, OrganizationUpdateParams { name } body, RequestOptionsoptions?): Organization { id, name, created_at, 2 more }
PUT/api/v2/organizations/{organization_id}
Delete Organization
client.organizations.delete(stringorganizationID, RequestOptionsoptions?): void
DELETE/api/v2/organizations/{organization_id}
Get Organization Usage
client.organizations.getUsage(stringorganizationID, OrganizationGetUsageParams { get_current_invoice_total } query?, RequestOptionsoptions?): UsageAndPlan { plan, usage }
GET/api/v1/organizations/{organization_id}/usage
ModelsExpand 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
OrganizationMember { id, organization_id, roles, 7 more }

A user’s membership in an organization, including roles.

id: string

Unique identifier

formatuuid
organization_id: string

The organization’s ID.

formatuuid
roles: Array<UserOrganizationRole { id, organization_id, role, 4 more } >

The roles of the user in the organization.

id: string

Unique identifier

formatuuid
organization_id: string

The organization’s ID.

formatuuid
role: Role { id, name, permissions, 2 more }

The role.

id: string

Unique identifier

formatuuid
name: string

A name for the role.

maxLength3000
minLength1
permissions: Array<Permission>

The actual permissions of the role.

id: string

Unique identifier

formatuuid
access: boolean

Whether the permission is granted or not.

description: string | null

A description for the permission.

name: string

A name for the permission.

maxLength3000
minLength1
created_at?: string | null

Creation datetime

formatdate-time
updated_at?: string | null

Update datetime

formatdate-time
created_at?: string | null

Creation datetime

formatdate-time
updated_at?: string | null

Update datetime

formatdate-time
user_id: string

The user’s ID.

created_at?: string | null

Creation datetime

formatdate-time
project_ids?: Array<string> | null

The project ID scope.

updated_at?: string | null

Update datetime

formatdate-time
created_at?: string | null

Creation datetime

formatdate-time
email?: string | null

The user’s email address.

formatemail
Deprecatedinvited_by_user_email?: string | null

The email address of the user who added the user to the organization.

formatemail
invited_by_user_id?: string | null

The user ID of the user who added the user to the organization.

pending?: boolean

Whether the user’s membership is pending account signup.

updated_at?: string | null

Update datetime

formatdate-time
user_id?: string | null

The user’s ID.

Role { id, name, permissions, 2 more }

Schema for a role.

id: string

Unique identifier

formatuuid
name: string

A name for the role.

maxLength3000
minLength1
permissions: Array<Permission>

The actual permissions of the role.

id: string

Unique identifier

formatuuid
access: boolean

Whether the permission is granted or not.

description: string | null

A description for the permission.

name: string

A name for the permission.

maxLength3000
minLength1
created_at?: string | null

Creation datetime

formatdate-time
updated_at?: string | null

Update datetime

formatdate-time
created_at?: string | null

Creation datetime

formatdate-time
updated_at?: string | null

Update datetime

formatdate-time
UsageAndPlan { plan, usage }
plan: Plan { limits, name, plan_frequency, 7 more }
limits: Limits { allow_pay_as_you_go, max_concurrent_index_jobs, max_concurrent_parse_jobs_other, 24 more }
allow_pay_as_you_go: boolean

Whether usage is allowed after credit grants are exhausted

max_concurrent_index_jobs: number | null
max_concurrent_parse_jobs_other: number | null
max_concurrent_parse_jobs_premium: number | null
max_data_sinks: number | null
max_data_sources: number | null
max_embedding_models: number | null
max_extraction_agents: number | null
max_extraction_jobs: number | null
max_extraction_runs: number | null
max_files_per_index: number | null
max_indexes: number | null
max_monthly_invoice_total_usd: number | null
max_organizations: number | null
max_pages_per_index: number | null
max_projects: number | null
max_published_agents: number | null
max_report_agent_sessions: number | null
max_users: number | null
mfa_enabled: boolean
sso_enabled: boolean
subscription_cost_usd: number
max_directories?: number | null
max_directory_files_per_directory?: number | null
max_directory_ingest_files?: number | null
max_directory_sync_plan_actions?: number | null
spending_soft_alerts_usd_cents?: Array<number> | null

The amount of USD cents at which a soft alert should be triggered

name: "enterprise" | "enterprise_contract" | "enterprise_poc" | 12 more
One of the following:
"enterprise"
"enterprise_contract"
"enterprise_poc"
"free"
"free_contract"
"free_v1"
"free_v2"
"llama_parse"
"pro"
"pro_v1"
"pro_v2"
"starter_v1"
"starter_v2"
"unknown"
"yc_deal_v1"
plan_frequency: "ANNUAL" | "MONTHLY" | "QUARTERLY"
One of the following:
"ANNUAL"
"MONTHLY"
"QUARTERLY"
id?: string | null

The ID of the plan in Metronome

current_billing_period?: CurrentBillingPeriod | null

The current billing period

end_date: string
start_date: string
ending_before?: string | null

The date the plan ends on

formatdate-time
failure_count?: number

The number of payment failures for this organization

is_payment_failed?: boolean

Whether the organization has a failed payment that requires support contact

recurring_credits?: Array<RecurringCredit> | null
credit_amount: number
credit_type: CreditType { id, name }
id: string
name: string
name: string
priority: number
product_id: string

The ID of the product in Metronome used to represent the credit grant

rollover_fraction: number

The fraction of the credit that will roll over to the next period, between 0 and 1

periods_duration?: number

How many billing periods the credit grant will last for

starting_on?: string | null

The date the plan starts on

formatdate-time
usage: Usage { active_alerts, active_free_credits_usage, current_invoice_total_usd_cents, 4 more }

Account usage totals shown alongside the plan.

active_alerts?: Array<"configured_spend_limit_exceeded" | "free_credits_exhausted" | "has_spending_alert" | 3 more>
One of the following:
"configured_spend_limit_exceeded"
"free_credits_exhausted"
"has_spending_alert"
"internal_spending_alert"
"plan_spend_limit_exceeded"
"plan_spend_limit_soft_alert"
active_free_credits_usage?: Array<ActiveFreeCreditsUsage>
expires_at: string
grant_name: string
remaining_balance: number
starting_balance: number
current_invoice_total_usd_cents?: number | null
total_extraction_agents?: number
total_indexed_pages?: number
total_indexes?: number
total_users?: number
UserOrganizationRole { id, organization_id, role, 4 more }

Schema for a user’s role in an organization.

id: string

Unique identifier

formatuuid
organization_id: string

The organization’s ID.

formatuuid
role: Role { id, name, permissions, 2 more }

The role.

id: string

Unique identifier

formatuuid
name: string

A name for the role.

maxLength3000
minLength1
permissions: Array<Permission>

The actual permissions of the role.

id: string

Unique identifier

formatuuid
access: boolean

Whether the permission is granted or not.

description: string | null

A description for the permission.

name: string

A name for the permission.

maxLength3000
minLength1
created_at?: string | null

Creation datetime

formatdate-time
updated_at?: string | null

Update datetime

formatdate-time
created_at?: string | null

Creation datetime

formatdate-time
updated_at?: string | null

Update datetime

formatdate-time
user_id: string

The user’s ID.

created_at?: string | null

Creation datetime

formatdate-time
project_ids?: Array<string> | null

The project ID scope.

updated_at?: string | null

Update datetime

formatdate-time

OrganizationsUsers

List Organization Users
client.organizations.users.listMembers(stringorganizationID, RequestOptionsoptions?): UserListMembersResponse { id, organization_id, roles, 7 more }
GET/api/v1/organizations/{organization_id}/users
Add Users To Organization
client.organizations.users.add(stringorganizationID, UserAddParams { body } params, RequestOptionsoptions?): UserAddResponse { id, organization_id, roles, 7 more }
PUT/api/v1/organizations/{organization_id}/users
Remove Users From Organization
client.organizations.users.delete(stringmemberUserID, UserDeleteParams { organization_id, body } params, RequestOptionsoptions?): void
DELETE/api/v1/organizations/{organization_id}/users/{member_user_id}
Assign Role To User In Organization
client.organizations.users.assignRole(stringorganizationID, UserAssignRoleParams { organization_id, role_id, user_id } body, RequestOptionsoptions?): UserOrganizationRole { id, organization_id, role, 4 more }
PUT/api/v1/organizations/{organization_id}/users/roles
List Projects By User
client.organizations.users.listProjects(stringuserID, UserListProjectsParams { organization_id } params, RequestOptionsoptions?): UserListProjectsResponse { id, name, organization_id, 3 more }
GET/api/v1/organizations/{organization_id}/users/{user_id}/projects
Add User To Project
client.organizations.users.addToProject(stringuserID, UserAddToProjectParams { organization_id, project_id } params, RequestOptionsoptions?): UserAddToProjectResponse
PUT/api/v1/organizations/{organization_id}/users/{user_id}/projects
Remove User From Project
client.organizations.users.removeFromProject(stringprojectID, UserRemoveFromProjectParams { organization_id, user_id } params, RequestOptionsoptions?): UserRemoveFromProjectResponse
DELETE/api/v1/organizations/{organization_id}/users/{user_id}/projects/{project_id}
ModelsExpand Collapse
UserListMembersResponse = Array<OrganizationMember { id, organization_id, roles, 7 more } >
id: string

Unique identifier

formatuuid
organization_id: string

The organization’s ID.

formatuuid
roles: Array<UserOrganizationRole { id, organization_id, role, 4 more } >

The roles of the user in the organization.

id: string

Unique identifier

formatuuid
organization_id: string

The organization’s ID.

formatuuid
role: Role { id, name, permissions, 2 more }

The role.

id: string

Unique identifier

formatuuid
name: string

A name for the role.

maxLength3000
minLength1
permissions: Array<Permission>

The actual permissions of the role.

id: string

Unique identifier

formatuuid
access: boolean

Whether the permission is granted or not.

description: string | null

A description for the permission.

name: string

A name for the permission.

maxLength3000
minLength1
created_at?: string | null

Creation datetime

formatdate-time
updated_at?: string | null

Update datetime

formatdate-time
created_at?: string | null

Creation datetime

formatdate-time
updated_at?: string | null

Update datetime

formatdate-time
user_id: string

The user’s ID.

created_at?: string | null

Creation datetime

formatdate-time
project_ids?: Array<string> | null

The project ID scope.

updated_at?: string | null

Update datetime

formatdate-time
created_at?: string | null

Creation datetime

formatdate-time
email?: string | null

The user’s email address.

formatemail
Deprecatedinvited_by_user_email?: string | null

The email address of the user who added the user to the organization.

formatemail
invited_by_user_id?: string | null

The user ID of the user who added the user to the organization.

pending?: boolean

Whether the user’s membership is pending account signup.

updated_at?: string | null

Update datetime

formatdate-time
user_id?: string | null

The user’s ID.

UserAddResponse = Array<OrganizationMember { id, organization_id, roles, 7 more } >
id: string

Unique identifier

formatuuid
organization_id: string

The organization’s ID.

formatuuid
roles: Array<UserOrganizationRole { id, organization_id, role, 4 more } >

The roles of the user in the organization.

id: string

Unique identifier

formatuuid
organization_id: string

The organization’s ID.

formatuuid
role: Role { id, name, permissions, 2 more }

The role.

id: string

Unique identifier

formatuuid
name: string

A name for the role.

maxLength3000
minLength1
permissions: Array<Permission>

The actual permissions of the role.

id: string

Unique identifier

formatuuid
access: boolean

Whether the permission is granted or not.

description: string | null

A description for the permission.

name: string

A name for the permission.

maxLength3000
minLength1
created_at?: string | null

Creation datetime

formatdate-time
updated_at?: string | null

Update datetime

formatdate-time
created_at?: string | null

Creation datetime

formatdate-time
updated_at?: string | null

Update datetime

formatdate-time
user_id: string

The user’s ID.

created_at?: string | null

Creation datetime

formatdate-time
project_ids?: Array<string> | null

The project ID scope.

updated_at?: string | null

Update datetime

formatdate-time
created_at?: string | null

Creation datetime

formatdate-time
email?: string | null

The user’s email address.

formatemail
Deprecatedinvited_by_user_email?: string | null

The email address of the user who added the user to the organization.

formatemail
invited_by_user_id?: string | null

The user ID of the user who added the user to the organization.

pending?: boolean

Whether the user’s membership is pending account signup.

updated_at?: string | null

Update datetime

formatdate-time
user_id?: string | null

The user’s ID.

UserListProjectsResponse = Array<UserListProjectsResponseItem>
id: string

Unique identifier

formatuuid
name: string
organization_id: string

The Organization ID the project is under.

formatuuid
created_at?: string | null

Creation datetime

formatdate-time
is_default?: boolean

Whether this project is the default project for the user.

updated_at?: string | null

Update datetime

formatdate-time
UserAddToProjectResponse = unknown
UserRemoveFromProjectResponse = unknown

OrganizationsRoles

List Roles
client.organizations.roles.list(stringorganizationID, RequestOptionsoptions?): RoleListResponse { id, name, permissions, 2 more }
GET/api/v1/organizations/{organization_id}/roles
ModelsExpand Collapse
RoleListResponse = Array<Role { id, name, permissions, 2 more } >
id: string

Unique identifier

formatuuid
name: string

A name for the role.

maxLength3000
minLength1
permissions: Array<Permission>

The actual permissions of the role.

id: string

Unique identifier

formatuuid
access: boolean

Whether the permission is granted or not.

description: string | null

A description for the permission.

name: string

A name for the permission.

maxLength3000
minLength1
created_at?: string | null

Creation datetime

formatdate-time
updated_at?: string | null

Update datetime

formatdate-time
created_at?: string | null

Creation datetime

formatdate-time
updated_at?: string | null

Update datetime

formatdate-time