Skip to content
Product Docs

Organizations

List Organizations
OrganizationListPage organizations().list(OrganizationListParamsparams = OrganizationListParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/api/v2/organizations
Create Organization
Organization organizations().create(OrganizationCreateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/api/v2/organizations
Get Organization
Organization organizations().get(OrganizationGetParamsparams = OrganizationGetParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/api/v2/organizations/{organization_id}
Update Organization
Organization organizations().update(OrganizationUpdateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
PUT/api/v2/organizations/{organization_id}
Delete Organization
organizations().delete(OrganizationDeleteParamsparams = OrganizationDeleteParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
DELETE/api/v2/organizations/{organization_id}
Get Organization Usage
UsageAndPlan organizations().getUsage(OrganizationGetUsageParamsparams = OrganizationGetUsageParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/api/v1/organizations/{organization_id}/usage
ModelsExpand Collapse
class Organization:

API response schema for an organization.

String id

The organization’s unique identifier.

String name

The organization’s display name.

Optional<LocalDateTime> createdAt

Creation datetime

formatdate-time
Optional<Metadata> metadata

Additional organization metadata.

Optional<LocalDateTime> updatedAt

Update datetime

formatdate-time
class OrganizationMember:

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

String id

Unique identifier

formatuuid
String organizationId

The organization’s ID.

formatuuid

The roles of the user in the organization.

String id

Unique identifier

formatuuid
String organizationId

The organization’s ID.

formatuuid
Role role

The role.

String id

Unique identifier

formatuuid
String name

A name for the role.

maxLength3000
minLength1
List<Permission> permissions

The actual permissions of the role.

String id

Unique identifier

formatuuid
boolean access

Whether the permission is granted or not.

Optional<String> description

A description for the permission.

String name

A name for the permission.

maxLength3000
minLength1
Optional<LocalDateTime> createdAt

Creation datetime

formatdate-time
Optional<LocalDateTime> updatedAt

Update datetime

formatdate-time
Optional<LocalDateTime> createdAt

Creation datetime

formatdate-time
Optional<LocalDateTime> updatedAt

Update datetime

formatdate-time
String userId

The user’s ID.

Optional<LocalDateTime> createdAt

Creation datetime

formatdate-time
Optional<List<String>> projectIds

The project ID scope.

Optional<LocalDateTime> updatedAt

Update datetime

formatdate-time
Optional<LocalDateTime> createdAt

Creation datetime

formatdate-time
Optional<String> email

The user’s email address.

formatemail
DeprecatedOptional<String> invitedByUserEmail

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

formatemail
Optional<String> invitedByUserId

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

Optional<Boolean> pending

Whether the user’s membership is pending account signup.

Optional<LocalDateTime> updatedAt

Update datetime

formatdate-time
Optional<String> userId

The user’s ID.

class Role:

Schema for a role.

String id

Unique identifier

formatuuid
String name

A name for the role.

maxLength3000
minLength1
List<Permission> permissions

The actual permissions of the role.

String id

Unique identifier

formatuuid
boolean access

Whether the permission is granted or not.

Optional<String> description

A description for the permission.

String name

A name for the permission.

maxLength3000
minLength1
Optional<LocalDateTime> createdAt

Creation datetime

formatdate-time
Optional<LocalDateTime> updatedAt

Update datetime

formatdate-time
Optional<LocalDateTime> createdAt

Creation datetime

formatdate-time
Optional<LocalDateTime> updatedAt

Update datetime

formatdate-time
class UsageAndPlan:
Plan plan
Limits limits
boolean allowPayAsYouGo

Whether usage is allowed after credit grants are exhausted

Optional<Long> maxConcurrentIndexJobs
Optional<Long> maxConcurrentParseJobsOther
Optional<Long> maxConcurrentParseJobsPremium
Optional<Long> maxDataSinks
Optional<Long> maxDataSources
Optional<Long> maxEmbeddingModels
Optional<Long> maxExtractionAgents
Optional<Long> maxExtractionJobs
Optional<Long> maxExtractionRuns
Optional<Long> maxFilesPerIndex
Optional<Long> maxIndexes
Optional<Long> maxMonthlyInvoiceTotalUsd
Optional<Long> maxOrganizations
Optional<Long> maxPagesPerIndex
Optional<Long> maxProjects
Optional<Long> maxPublishedAgents
Optional<Long> maxReportAgentSessions
Optional<Long> maxUsers
boolean mfaEnabled
boolean ssoEnabled
long subscriptionCostUsd
Optional<Long> maxDirectories
Optional<Long> maxDirectoryFilesPerDirectory
Optional<Long> maxDirectoryIngestFiles
Optional<Long> maxDirectorySyncPlanActions
Optional<List<Long>> spendingSoftAlertsUsdCents

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

Name name
One of the following:
ENTERPRISE("enterprise")
ENTERPRISE_CONTRACT("enterprise_contract")
ENTERPRISE_POC("enterprise_poc")
FREE("free")
FREE_CONTRACT("free_contract")
FREE_V1("free_v1")
FREE_V2("free_v2")
LLAMA_PARSE("llama_parse")
PRO("pro")
PRO_V1("pro_v1")
PRO_V2("pro_v2")
STARTER_V1("starter_v1")
STARTER_V2("starter_v2")
UNKNOWN("unknown")
YC_DEAL_V1("yc_deal_v1")
PlanFrequency planFrequency
One of the following:
ANNUAL("ANNUAL")
MONTHLY("MONTHLY")
QUARTERLY("QUARTERLY")
Optional<String> id

The ID of the plan in Metronome

Optional<CurrentBillingPeriod> currentBillingPeriod

The current billing period

LocalDateTime endDate
LocalDateTime startDate
Optional<LocalDateTime> endingBefore

The date the plan ends on

formatdate-time
Optional<Long> failureCount

The number of payment failures for this organization

Optional<Boolean> isPaymentFailed

Whether the organization has a failed payment that requires support contact

Optional<List<RecurringCredit>> recurringCredits
long creditAmount
CreditType creditType
String id
String name
String name
double priority
String productId

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

double rolloverFraction

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

Optional<Double> periodsDuration

How many billing periods the credit grant will last for

Optional<LocalDateTime> startingOn

The date the plan starts on

formatdate-time
Usage usage

Account usage totals shown alongside the plan.

Optional<List<ActiveAlert>> activeAlerts
One of the following:
CONFIGURED_SPEND_LIMIT_EXCEEDED("configured_spend_limit_exceeded")
FREE_CREDITS_EXHAUSTED("free_credits_exhausted")
HAS_SPENDING_ALERT("has_spending_alert")
INTERNAL_SPENDING_ALERT("internal_spending_alert")
PLAN_SPEND_LIMIT_EXCEEDED("plan_spend_limit_exceeded")
PLAN_SPEND_LIMIT_SOFT_ALERT("plan_spend_limit_soft_alert")
Optional<List<ActiveFreeCreditsUsage>> activeFreeCreditsUsage
LocalDateTime expiresAt
String grantName
long remainingBalance
long startingBalance
Optional<Long> currentInvoiceTotalUsdCents
Optional<Long> totalExtractionAgents
Optional<Long> totalIndexedPages
Optional<Long> totalIndexes
Optional<Long> totalUsers
class UserOrganizationRole:

Schema for a user’s role in an organization.

String id

Unique identifier

formatuuid
String organizationId

The organization’s ID.

formatuuid
Role role

The role.

String id

Unique identifier

formatuuid
String name

A name for the role.

maxLength3000
minLength1
List<Permission> permissions

The actual permissions of the role.

String id

Unique identifier

formatuuid
boolean access

Whether the permission is granted or not.

Optional<String> description

A description for the permission.

String name

A name for the permission.

maxLength3000
minLength1
Optional<LocalDateTime> createdAt

Creation datetime

formatdate-time
Optional<LocalDateTime> updatedAt

Update datetime

formatdate-time
Optional<LocalDateTime> createdAt

Creation datetime

formatdate-time
Optional<LocalDateTime> updatedAt

Update datetime

formatdate-time
String userId

The user’s ID.

Optional<LocalDateTime> createdAt

Creation datetime

formatdate-time
Optional<List<String>> projectIds

The project ID scope.

Optional<LocalDateTime> updatedAt

Update datetime

formatdate-time

OrganizationsUsers

List Organization Users
List<OrganizationMember> organizations().users().listMembers(UserListMembersParamsparams = UserListMembersParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/api/v1/organizations/{organization_id}/users
Add Users To Organization
List<OrganizationMember> organizations().users().add(UserAddParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
PUT/api/v1/organizations/{organization_id}/users
Remove Users From Organization
organizations().users().delete(UserDeleteParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
DELETE/api/v1/organizations/{organization_id}/users/{member_user_id}
Assign Role To User In Organization
UserOrganizationRole organizations().users().assignRole(UserAssignRoleParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
PUT/api/v1/organizations/{organization_id}/users/roles
List Projects By User
List<UserListProjectsResponse> organizations().users().listProjects(UserListProjectsParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
GET/api/v1/organizations/{organization_id}/users/{user_id}/projects
Add User To Project
JsonValue organizations().users().addToProject(UserAddToProjectParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
PUT/api/v1/organizations/{organization_id}/users/{user_id}/projects
Remove User From Project
JsonValue organizations().users().removeFromProject(UserRemoveFromProjectParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
DELETE/api/v1/organizations/{organization_id}/users/{user_id}/projects/{project_id}

OrganizationsRoles

List Roles
List<Role> organizations().roles().list(RoleListParamsparams = RoleListParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/api/v1/organizations/{organization_id}/roles