Skip to content
Product Docs

Organizations

List Organizations
organizations.list(OrganizationListParams**kwargs) -> SyncPaginatedCursor[Organization]
GET/api/v2/organizations
Create Organization
organizations.create(OrganizationCreateParams**kwargs) -> Organization
POST/api/v2/organizations
Get Organization
organizations.get(strorganization_id) -> Organization
GET/api/v2/organizations/{organization_id}
Update Organization
organizations.update(strorganization_id, OrganizationUpdateParams**kwargs) -> Organization
PUT/api/v2/organizations/{organization_id}
Delete Organization
organizations.delete(strorganization_id)
DELETE/api/v2/organizations/{organization_id}
Get Organization Usage
organizations.get_usage(strorganization_id, OrganizationGetUsageParams**kwargs) -> UsageAndPlan
GET/api/v1/organizations/{organization_id}/usage
ModelsExpand Collapse
class Organization:

API response schema for an organization.

id: str

The organization’s unique identifier.

name: str

The organization’s display name.

created_at: Optional[datetime]

Creation datetime

formatdate-time
metadata: Optional[Dict[str, object]]

Additional organization metadata.

updated_at: Optional[datetime]

Update datetime

formatdate-time
class OrganizationMember:

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

id: str

Unique identifier

formatuuid
organization_id: str

The organization’s ID.

formatuuid

The roles of the user in the organization.

id: str

Unique identifier

formatuuid
organization_id: str

The organization’s ID.

formatuuid
role: Role

The role.

id: str

Unique identifier

formatuuid
name: str

A name for the role.

maxLength3000
minLength1
permissions: List[Permission]

The actual permissions of the role.

id: str

Unique identifier

formatuuid
access: bool

Whether the permission is granted or not.

description: Optional[str]

A description for the permission.

name: str

A name for the permission.

maxLength3000
minLength1
created_at: Optional[datetime]

Creation datetime

formatdate-time
updated_at: Optional[datetime]

Update datetime

formatdate-time
created_at: Optional[datetime]

Creation datetime

formatdate-time
updated_at: Optional[datetime]

Update datetime

formatdate-time
user_id: str

The user’s ID.

created_at: Optional[datetime]

Creation datetime

formatdate-time
project_ids: Optional[List[str]]

The project ID scope.

updated_at: Optional[datetime]

Update datetime

formatdate-time
created_at: Optional[datetime]

Creation datetime

formatdate-time
email: Optional[str]

The user’s email address.

formatemail
Deprecatedinvited_by_user_email: Optional[str]

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

formatemail
invited_by_user_id: Optional[str]

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

pending: Optional[bool]

Whether the user’s membership is pending account signup.

updated_at: Optional[datetime]

Update datetime

formatdate-time
user_id: Optional[str]

The user’s ID.

class Role:

Schema for a role.

id: str

Unique identifier

formatuuid
name: str

A name for the role.

maxLength3000
minLength1
permissions: List[Permission]

The actual permissions of the role.

id: str

Unique identifier

formatuuid
access: bool

Whether the permission is granted or not.

description: Optional[str]

A description for the permission.

name: str

A name for the permission.

maxLength3000
minLength1
created_at: Optional[datetime]

Creation datetime

formatdate-time
updated_at: Optional[datetime]

Update datetime

formatdate-time
created_at: Optional[datetime]

Creation datetime

formatdate-time
updated_at: Optional[datetime]

Update datetime

formatdate-time
class UsageAndPlan:
plan: Plan
limits: PlanLimits
allow_pay_as_you_go: bool

Whether usage is allowed after credit grants are exhausted

max_concurrent_index_jobs: Optional[int]
max_concurrent_parse_jobs_other: Optional[int]
max_concurrent_parse_jobs_premium: Optional[int]
max_data_sinks: Optional[int]
max_data_sources: Optional[int]
max_embedding_models: Optional[int]
max_extraction_agents: Optional[int]
max_extraction_jobs: Optional[int]
max_extraction_runs: Optional[int]
max_files_per_index: Optional[int]
max_indexes: Optional[int]
max_monthly_invoice_total_usd: Optional[int]
max_organizations: Optional[int]
max_pages_per_index: Optional[int]
max_projects: Optional[int]
max_published_agents: Optional[int]
max_report_agent_sessions: Optional[int]
max_users: Optional[int]
mfa_enabled: bool
sso_enabled: bool
subscription_cost_usd: int
max_directories: Optional[int]
max_directory_files_per_directory: Optional[int]
max_directory_ingest_files: Optional[int]
max_directory_sync_plan_actions: Optional[int]
spending_soft_alerts_usd_cents: Optional[List[int]]

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

name: Literal["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: Literal["ANNUAL", "MONTHLY", "QUARTERLY"]
One of the following:
"ANNUAL"
"MONTHLY"
"QUARTERLY"
id: Optional[str]

The ID of the plan in Metronome

current_billing_period: Optional[PlanCurrentBillingPeriod]

The current billing period

end_date: datetime
start_date: datetime
ending_before: Optional[datetime]

The date the plan ends on

formatdate-time
failure_count: Optional[int]

The number of payment failures for this organization

is_payment_failed: Optional[bool]

Whether the organization has a failed payment that requires support contact

recurring_credits: Optional[List[PlanRecurringCredit]]
credit_amount: int
credit_type: PlanRecurringCreditCreditType
id: str
name: str
name: str
priority: float
product_id: str

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

rollover_fraction: float

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

periods_duration: Optional[float]

How many billing periods the credit grant will last for

starting_on: Optional[datetime]

The date the plan starts on

formatdate-time
usage: Usage

Account usage totals shown alongside the plan.

active_alerts: Optional[List[Literal["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: Optional[List[UsageActiveFreeCreditsUsage]]
expires_at: datetime
grant_name: str
remaining_balance: int
starting_balance: int
current_invoice_total_usd_cents: Optional[int]
total_extraction_agents: Optional[int]
total_indexed_pages: Optional[int]
total_indexes: Optional[int]
total_users: Optional[int]
class UserOrganizationRole:

Schema for a user’s role in an organization.

id: str

Unique identifier

formatuuid
organization_id: str

The organization’s ID.

formatuuid
role: Role

The role.

id: str

Unique identifier

formatuuid
name: str

A name for the role.

maxLength3000
minLength1
permissions: List[Permission]

The actual permissions of the role.

id: str

Unique identifier

formatuuid
access: bool

Whether the permission is granted or not.

description: Optional[str]

A description for the permission.

name: str

A name for the permission.

maxLength3000
minLength1
created_at: Optional[datetime]

Creation datetime

formatdate-time
updated_at: Optional[datetime]

Update datetime

formatdate-time
created_at: Optional[datetime]

Creation datetime

formatdate-time
updated_at: Optional[datetime]

Update datetime

formatdate-time
user_id: str

The user’s ID.

created_at: Optional[datetime]

Creation datetime

formatdate-time
project_ids: Optional[List[str]]

The project ID scope.

updated_at: Optional[datetime]

Update datetime

formatdate-time

OrganizationsUsers

List Organization Users
organizations.users.list_members(strorganization_id) -> UserListMembersResponse
GET/api/v1/organizations/{organization_id}/users
Add Users To Organization
organizations.users.add(strorganization_id, UserAddParams**kwargs) -> UserAddResponse
PUT/api/v1/organizations/{organization_id}/users
Remove Users From Organization
organizations.users.delete(strmember_user_id, UserDeleteParams**kwargs)
DELETE/api/v1/organizations/{organization_id}/users/{member_user_id}
Assign Role To User In Organization
organizations.users.assign_role(strpath_organization_id, UserAssignRoleParams**kwargs) -> UserOrganizationRole
PUT/api/v1/organizations/{organization_id}/users/roles
List Projects By User
organizations.users.list_projects(struser_id, UserListProjectsParams**kwargs) -> UserListProjectsResponse
GET/api/v1/organizations/{organization_id}/users/{user_id}/projects
Add User To Project
organizations.users.add_to_project(struser_id, UserAddToProjectParams**kwargs) -> object
PUT/api/v1/organizations/{organization_id}/users/{user_id}/projects
Remove User From Project
organizations.users.remove_from_project(strproject_id, UserRemoveFromProjectParams**kwargs) -> object
DELETE/api/v1/organizations/{organization_id}/users/{user_id}/projects/{project_id}
ModelsExpand Collapse
id: str

Unique identifier

formatuuid
organization_id: str

The organization’s ID.

formatuuid

The roles of the user in the organization.

id: str

Unique identifier

formatuuid
organization_id: str

The organization’s ID.

formatuuid
role: Role

The role.

id: str

Unique identifier

formatuuid
name: str

A name for the role.

maxLength3000
minLength1
permissions: List[Permission]

The actual permissions of the role.

id: str

Unique identifier

formatuuid
access: bool

Whether the permission is granted or not.

description: Optional[str]

A description for the permission.

name: str

A name for the permission.

maxLength3000
minLength1
created_at: Optional[datetime]

Creation datetime

formatdate-time
updated_at: Optional[datetime]

Update datetime

formatdate-time
created_at: Optional[datetime]

Creation datetime

formatdate-time
updated_at: Optional[datetime]

Update datetime

formatdate-time
user_id: str

The user’s ID.

created_at: Optional[datetime]

Creation datetime

formatdate-time
project_ids: Optional[List[str]]

The project ID scope.

updated_at: Optional[datetime]

Update datetime

formatdate-time
created_at: Optional[datetime]

Creation datetime

formatdate-time
email: Optional[str]

The user’s email address.

formatemail
Deprecatedinvited_by_user_email: Optional[str]

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

formatemail
invited_by_user_id: Optional[str]

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

pending: Optional[bool]

Whether the user’s membership is pending account signup.

updated_at: Optional[datetime]

Update datetime

formatdate-time
user_id: Optional[str]

The user’s ID.

id: str

Unique identifier

formatuuid
organization_id: str

The organization’s ID.

formatuuid

The roles of the user in the organization.

id: str

Unique identifier

formatuuid
organization_id: str

The organization’s ID.

formatuuid
role: Role

The role.

id: str

Unique identifier

formatuuid
name: str

A name for the role.

maxLength3000
minLength1
permissions: List[Permission]

The actual permissions of the role.

id: str

Unique identifier

formatuuid
access: bool

Whether the permission is granted or not.

description: Optional[str]

A description for the permission.

name: str

A name for the permission.

maxLength3000
minLength1
created_at: Optional[datetime]

Creation datetime

formatdate-time
updated_at: Optional[datetime]

Update datetime

formatdate-time
created_at: Optional[datetime]

Creation datetime

formatdate-time
updated_at: Optional[datetime]

Update datetime

formatdate-time
user_id: str

The user’s ID.

created_at: Optional[datetime]

Creation datetime

formatdate-time
project_ids: Optional[List[str]]

The project ID scope.

updated_at: Optional[datetime]

Update datetime

formatdate-time
created_at: Optional[datetime]

Creation datetime

formatdate-time
email: Optional[str]

The user’s email address.

formatemail
Deprecatedinvited_by_user_email: Optional[str]

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

formatemail
invited_by_user_id: Optional[str]

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

pending: Optional[bool]

Whether the user’s membership is pending account signup.

updated_at: Optional[datetime]

Update datetime

formatdate-time
user_id: Optional[str]

The user’s ID.

List[UserListProjectsResponseItem]
id: str

Unique identifier

formatuuid
name: str
organization_id: str

The Organization ID the project is under.

formatuuid
created_at: Optional[datetime]

Creation datetime

formatdate-time
is_default: Optional[bool]

Whether this project is the default project for the user.

updated_at: Optional[datetime]

Update datetime

formatdate-time

OrganizationsRoles

List Roles
organizations.roles.list(strorganization_id) -> RoleListResponse
GET/api/v1/organizations/{organization_id}/roles
ModelsExpand Collapse
List[Role]
id: str

Unique identifier

formatuuid
name: str

A name for the role.

maxLength3000
minLength1
permissions: List[Permission]

The actual permissions of the role.

id: str

Unique identifier

formatuuid
access: bool

Whether the permission is granted or not.

description: Optional[str]

A description for the permission.

name: str

A name for the permission.

maxLength3000
minLength1
created_at: Optional[datetime]

Creation datetime

formatdate-time
updated_at: Optional[datetime]

Update datetime

formatdate-time
created_at: Optional[datetime]

Creation datetime

formatdate-time
updated_at: Optional[datetime]

Update datetime

formatdate-time