Skip to content
Docs

Organizations

Create Organization
client.Organizations.New(ctx, body) (*Organization, error)
POST/v1/organizations
Get Organization Details
client.Organizations.Get(ctx, organizationID) (*Organization, error)
GET/v1/organizations/{organization_id}
Update Organization
client.Organizations.Update(ctx, organizationID, body) (*Organization, error)
PATCH/v1/organizations/{organization_id}
List Organizations
client.Organizations.List(ctx, query) (*Cursor[Organization], error)
GET/v1/organizations
Leave Organization
client.Organizations.Leave(ctx, organizationID) error
POST/v1/organizations/{organization_id}/leave
ModelsExpand Collapse
type Organization struct{…}

Organization response.

ID string

Organization ID.

BillingEmail string

Billing email. Null when no custom billing email is set (reverts to the oldest owner’s email).

BillingState OrganizationBillingState

Organization billing lifecycle state.

One of the following:
const OrganizationBillingStateUnfunded OrganizationBillingState = "unfunded"
const OrganizationBillingStateActive OrganizationBillingState = "active"
const OrganizationBillingStateRequiresAction OrganizationBillingState = "requires_action"
const OrganizationBillingStateSuspended OrganizationBillingState = "suspended"
const OrganizationBillingStateClosed OrganizationBillingState = "closed"
BillingStateSince Time

When the organization entered its current billing state.

formatdate-time
ChargingModel OrganizationChargingModel

How the organization is charged for resource usage.

One of the following:
const OrganizationChargingModelManual OrganizationChargingModel = "manual"
const OrganizationChargingModelPrepaid OrganizationChargingModel = "prepaid"
CreatedAt Time

When the Organization was created.

formatdate-time

Domains associated with the organization.

ID string

Domain ID.

Domain string

Domain name.

Verified bool

Whether the domain has been verified.

Name string

Organization name.

Personal bool

Whether the organization is a personal Organization.

Services that the Organization has access to.

Cloud bool

Whether cloud services are enabled for the organization.

JitProvisioning bool

Whether just-in-time provisioning is enabled for the organization.

SCIM bool

Whether SCIM provisioning is enabled for the organization.

SIEM bool

Whether SIEM integration is enabled for the organization.

SSO bool

Whether single sign-on is enabled for the organization.

StripeCustomerID string

Stripe customer ID.

Organization type.

One of the following:
const OrganizationTypePersonal OrganizationType = "personal"
const OrganizationTypeCompany OrganizationType = "company"
UpdatedAt Time

When the Organization was updated.

formatdate-time
AuthID stringOptional

Authentication provider organization ID.

type OrganizationDomain struct{…}

Organization domain details.

ID string

Domain ID.

Domain string

Domain name.

Verified bool

Whether the domain has been verified.

type OrganizationList struct{…}
Items []Organization
ID string

Organization ID.

BillingEmail string

Billing email. Null when no custom billing email is set (reverts to the oldest owner’s email).

BillingState OrganizationBillingState

Organization billing lifecycle state.

One of the following:
const OrganizationBillingStateUnfunded OrganizationBillingState = "unfunded"
const OrganizationBillingStateActive OrganizationBillingState = "active"
const OrganizationBillingStateRequiresAction OrganizationBillingState = "requires_action"
const OrganizationBillingStateSuspended OrganizationBillingState = "suspended"
const OrganizationBillingStateClosed OrganizationBillingState = "closed"
BillingStateSince Time

When the organization entered its current billing state.

formatdate-time
ChargingModel OrganizationChargingModel

How the organization is charged for resource usage.

One of the following:
const OrganizationChargingModelManual OrganizationChargingModel = "manual"
const OrganizationChargingModelPrepaid OrganizationChargingModel = "prepaid"
CreatedAt Time

When the Organization was created.

formatdate-time

Domains associated with the organization.

ID string

Domain ID.

Domain string

Domain name.

Verified bool

Whether the domain has been verified.

Name string

Organization name.

Personal bool

Whether the organization is a personal Organization.

Services that the Organization has access to.

Cloud bool

Whether cloud services are enabled for the organization.

JitProvisioning bool

Whether just-in-time provisioning is enabled for the organization.

SCIM bool

Whether SCIM provisioning is enabled for the organization.

SIEM bool

Whether SIEM integration is enabled for the organization.

SSO bool

Whether single sign-on is enabled for the organization.

StripeCustomerID string

Stripe customer ID.

Organization type.

One of the following:
const OrganizationTypePersonal OrganizationType = "personal"
const OrganizationTypeCompany OrganizationType = "company"
UpdatedAt Time

When the Organization was updated.

formatdate-time
AuthID stringOptional

Authentication provider organization ID.

type OrganizationServices struct{…}

Services that the Organization has access to.

Cloud bool

Whether cloud services are enabled for the organization.

JitProvisioning bool

Whether just-in-time provisioning is enabled for the organization.

SCIM bool

Whether SCIM provisioning is enabled for the organization.

SIEM bool

Whether SIEM integration is enabled for the organization.

SSO bool

Whether single sign-on is enabled for the organization.

type OrganizationType string

Organization type.

One of the following:
const OrganizationTypePersonal OrganizationType = "personal"
const OrganizationTypeCompany OrganizationType = "company"

OrganizationsMemberships

Get Organization Membership
client.Organizations.Memberships.Get(ctx, organizationID, membershipID) (*OrganizationMembership, error)
GET/v1/organizations/{organization_id}/memberships/{membership_id}
List Organization Memberships
client.Organizations.Memberships.List(ctx, organizationID, query) (*Cursor[OrganizationMembership], error)
GET/v1/organizations/{organization_id}/memberships
ModelsExpand Collapse
type OrganizationMembership struct{…}

Organization membership details.

ID string

Membership ID.

CreatedAt Time

When the membership was created.

formatdate-time
OrganizationID string

Organization ID.

Role OrganizationMembershipRole

Role of the user in the organization.

One of the following:
const OrganizationMembershipRoleOwner OrganizationMembershipRole = "owner"
const OrganizationMembershipRoleMember OrganizationMembershipRole = "member"
UpdatedAt Time

When the membership was updated.

formatdate-time
UserID string

User ID.

type OrganizationMembershipList struct{…}
ID string

Membership ID.

CreatedAt Time

When the membership was created.

formatdate-time
OrganizationID string

Organization ID.

Role OrganizationMembershipRole

Role of the user in the organization.

One of the following:
const OrganizationMembershipRoleOwner OrganizationMembershipRole = "owner"
const OrganizationMembershipRoleMember OrganizationMembershipRole = "member"
UpdatedAt Time

When the membership was updated.

formatdate-time
UserID string

User ID.

OrganizationsAddress

Create Organization Address
client.Organizations.Address.New(ctx, organizationID, body) (*OrganizationAddress, error)
POST/v1/organizations/{organization_id}/address
Get Organization Address
client.Organizations.Address.Get(ctx, organizationID) (*OrganizationAddress, error)
GET/v1/organizations/{organization_id}/address
Update Organization Address
client.Organizations.Address.Update(ctx, organizationID, body) (*OrganizationAddress, error)
PATCH/v1/organizations/{organization_id}/address
ModelsExpand Collapse
type OrganizationAddress struct{…}

Organization address details.

ID string

Address ID.

City string

City or locality.

Country string

Two-letter ISO 3166-1 alpha-2 country code.

CreatedAt Time

When the address was created.

formatdate-time
Line1 string

First line of the street address.

Line2 string

Second line of the street address. Null when not provided.

OrganizationID string

Organization ID the address belongs to.

PostalCode string

Postal or ZIP code.

State string

State, province, or region. Null when not provided.

TaxID string

Tax identification number. Null when not provided.

TaxIDType string

Type of the tax identification number. Null when not provided.

UpdatedAt Time

When the address was updated.

formatdate-time

OrganizationsBilling

Get Organization Billing Summary
client.Organizations.Billing.Summary(ctx, organizationID) (*OrganizationBillingSummary, error)
GET/v1/organizations/{organization_id}/billing/summary
Get Organization Daily Cost
client.Organizations.Billing.Cost(ctx, organizationID, query) (*OrganizationDailyCost, error)
GET/v1/organizations/{organization_id}/billing/cost
List Organization Billing History
client.Organizations.Billing.History(ctx, organizationID, query) (*BillingHistoryEntryList, error)
GET/v1/organizations/{organization_id}/billing/history
Top Up Organization Prepaid Balance
client.Organizations.Billing.TopUp(ctx, organizationID, params) (*OrganizationBillingSummary, error)
POST/v1/organizations/{organization_id}/billing/topup
ModelsExpand Collapse
type BillingHistoryEntry struct{…}

A single billing history line item: a prepaid credit or a manual adjustment.

ID string

Unique identifier for the entry.

Amount string

Arbitrary-precision decimal serialized as a string (e.g. “58.40”).

formatdecimal
CreatedAt Time

When the entry was recorded.

formatdate-time
Currency string

ISO 4217 currency code.

Kind of entry.

One of the following:
const BillingHistoryEntryTypeGrant BillingHistoryEntryType = "grant"
const BillingHistoryEntryTypeAdjustment BillingHistoryEntryType = "adjustment"
Description stringOptional

Human-readable note describing the entry, when available.

type BillingHistoryEntryList struct{…}
ID string

Unique identifier for the entry.

Amount string

Arbitrary-precision decimal serialized as a string (e.g. “58.40”).

formatdecimal
CreatedAt Time

When the entry was recorded.

formatdate-time
Currency string

ISO 4217 currency code.

Kind of entry.

One of the following:
const BillingHistoryEntryTypeGrant BillingHistoryEntryType = "grant"
const BillingHistoryEntryTypeAdjustment BillingHistoryEntryType = "adjustment"
Description stringOptional

Human-readable note describing the entry, when available.

type BillingHistoryEntryType string

Kind of entry.

One of the following:
const BillingHistoryEntryTypeGrant BillingHistoryEntryType = "grant"
const BillingHistoryEntryTypeAdjustment BillingHistoryEntryType = "adjustment"
type DailyCostPoint struct{…}

Total usage cost for a single UTC day.

Cost string

Arbitrary-precision decimal serialized as a string (e.g. “58.40”).

formatdecimal
Date string

UTC calendar day (YYYY-MM-DD).

type OrganizationDailyCost struct{…}

Daily usage cost over a date range: one entry per UTC day (zero on idle days), summing open and closed resources. Suitable for a daily cost bar chart.

Currency string

ISO 4217 currency code.

One entry per UTC day in the range, oldest first.

Cost string

Arbitrary-precision decimal serialized as a string (e.g. “58.40”).

formatdecimal
Date string

UTC calendar day (YYYY-MM-DD).

From string

Inclusive start of the range, as a UTC calendar day (YYYY-MM-DD).

To string

Inclusive end of the range, as a UTC calendar day (YYYY-MM-DD).