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
    Re-trigger Organization Prepaid Recharge
    client.Organizations.Billing.Recharge(ctx, organizationID, body) (*OrganizationBillingSummary, error)
    POST/v1/organizations/{organization_id}/billing/recharge
    Get Organization Usage Statement
    client.Organizations.Billing.Statements(ctx, organizationID, query) (*OrganizationUsageStatement, error)
    GET/v1/organizations/{organization_id}/billing/statements
    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.

    FundingPurpose BillingHistoryEntryFundingPurposeOptional

    Funding flow that produced this entry, for a grant: “first_charge”, “auto_recharge”, “manual_top_up”, or “manual_recharge”. Null for adjustments.

    One of the following:
    const BillingHistoryEntryFundingPurposeFirstCharge BillingHistoryEntryFundingPurpose = "first_charge"
    const BillingHistoryEntryFundingPurposeAutoRecharge BillingHistoryEntryFundingPurpose = "auto_recharge"
    const BillingHistoryEntryFundingPurposeManualTopUp BillingHistoryEntryFundingPurpose = "manual_top_up"
    const BillingHistoryEntryFundingPurposeManualRecharge BillingHistoryEntryFundingPurpose = "manual_recharge"
    ReceiptURL stringOptional

    Link to the hosted receipt for the payment behind this entry, when one is available. Present for prepaid credits funded by a card charge; absent for manual adjustments and while a payment’s receipt is still being finalized.

    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.

    FundingPurpose BillingHistoryEntryFundingPurposeOptional

    Funding flow that produced this entry, for a grant: “first_charge”, “auto_recharge”, “manual_top_up”, or “manual_recharge”. Null for adjustments.

    One of the following:
    const BillingHistoryEntryFundingPurposeFirstCharge BillingHistoryEntryFundingPurpose = "first_charge"
    const BillingHistoryEntryFundingPurposeAutoRecharge BillingHistoryEntryFundingPurpose = "auto_recharge"
    const BillingHistoryEntryFundingPurposeManualTopUp BillingHistoryEntryFundingPurpose = "manual_top_up"
    const BillingHistoryEntryFundingPurposeManualRecharge BillingHistoryEntryFundingPurpose = "manual_recharge"
    ReceiptURL stringOptional

    Link to the hosted receipt for the payment behind this entry, when one is available. Present for prepaid credits funded by a card charge; absent for manual adjustments and while a payment’s receipt is still being finalized.

    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).

    type OrganizationUsageStatement struct{…}

    Itemized usage statement for a billing month: consumption grouped by project, resource type, and dimension. Costs are recorded at consumption time, not re-priced.

    Currency string

    ISO 4217 currency code.

    Month string

    Billing month the statement covers, as YYYY-MM (UTC).

    Projects []StatementProject

    One entry per project with consumption in the month, ordered by name.

    ProjectID string

    Project identifier.

    ProjectName string

    Human-readable project name.

    ResourceTypes []StatementResourceType

    Consumption grouped by resource type.

    Top-level metered dimensions; a dimension expanded into components carries them in children.

    Component dimensions nested under this one (e.g. vCPU and memory under an instance type). Empty for a leaf.

    Cost string

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

    formatdecimal
    Dimension string

    Metered dimension identifier (e.g. “compute_vcpu”, “compute_memory_gb”).

    DisplayName string

    Human-readable label for the dimension.

    QuantityHours string

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

    formatdecimal
    UnitPrice string

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

    formatdecimal
    Cost string

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

    formatdecimal
    Dimension string

    Metered dimension identifier (e.g. “compute_n1_standard_8”, “storage_abs_gb”).

    DisplayName string

    Human-readable label for the dimension.

    QuantityHours string

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

    formatdecimal
    UnitPrice stringOptional

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

    formatdecimal
    ResourceType string

    Resource type the line items belong to (e.g. “vm”, “volume”, “nks_node_pool”).

    Subtotal string

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

    formatdecimal
    Subtotal string

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

    formatdecimal
    Total string

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

    formatdecimal
    type StatementLineItem struct{…}

    A top-level metered dimension. Heads nest components as children (cost is the subtotal, unit_price null); standalone dimensions carry a unit price and an empty children array.

    Component dimensions nested under this one (e.g. vCPU and memory under an instance type). Empty for a leaf.

    Cost string

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

    formatdecimal
    Dimension string

    Metered dimension identifier (e.g. “compute_vcpu”, “compute_memory_gb”).

    DisplayName string

    Human-readable label for the dimension.

    QuantityHours string

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

    formatdecimal
    UnitPrice string

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

    formatdecimal
    Cost string

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

    formatdecimal
    Dimension string

    Metered dimension identifier (e.g. “compute_n1_standard_8”, “storage_abs_gb”).

    DisplayName string

    Human-readable label for the dimension.

    QuantityHours string

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

    formatdecimal
    UnitPrice stringOptional

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

    formatdecimal
    type StatementLineItemLeaf struct{…}

    A priced dimension line: a component nested under a head, or one rate segment of a dimension whose price changed mid-period.

    Cost string

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

    formatdecimal
    Dimension string

    Metered dimension identifier (e.g. “compute_vcpu”, “compute_memory_gb”).

    DisplayName string

    Human-readable label for the dimension.

    QuantityHours string

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

    formatdecimal
    UnitPrice string

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

    formatdecimal
    type StatementProject struct{…}

    A single project’s consumption within a usage statement.

    ProjectID string

    Project identifier.

    ProjectName string

    Human-readable project name.

    ResourceTypes []StatementResourceType

    Consumption grouped by resource type.

    Top-level metered dimensions; a dimension expanded into components carries them in children.

    Component dimensions nested under this one (e.g. vCPU and memory under an instance type). Empty for a leaf.

    Cost string

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

    formatdecimal
    Dimension string

    Metered dimension identifier (e.g. “compute_vcpu”, “compute_memory_gb”).

    DisplayName string

    Human-readable label for the dimension.

    QuantityHours string

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

    formatdecimal
    UnitPrice string

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

    formatdecimal
    Cost string

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

    formatdecimal
    Dimension string

    Metered dimension identifier (e.g. “compute_n1_standard_8”, “storage_abs_gb”).

    DisplayName string

    Human-readable label for the dimension.

    QuantityHours string

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

    formatdecimal
    UnitPrice stringOptional

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

    formatdecimal
    ResourceType string

    Resource type the line items belong to (e.g. “vm”, “volume”, “nks_node_pool”).

    Subtotal string

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

    formatdecimal
    Subtotal string

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

    formatdecimal
    type StatementResourceType struct{…}

    Consumption for one resource type within a project (e.g. every VM, every volume).

    Top-level metered dimensions; a dimension expanded into components carries them in children.

    Component dimensions nested under this one (e.g. vCPU and memory under an instance type). Empty for a leaf.

    Cost string

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

    formatdecimal
    Dimension string

    Metered dimension identifier (e.g. “compute_vcpu”, “compute_memory_gb”).

    DisplayName string

    Human-readable label for the dimension.

    QuantityHours string

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

    formatdecimal
    UnitPrice string

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

    formatdecimal
    Cost string

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

    formatdecimal
    Dimension string

    Metered dimension identifier (e.g. “compute_n1_standard_8”, “storage_abs_gb”).

    DisplayName string

    Human-readable label for the dimension.

    QuantityHours string

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

    formatdecimal
    UnitPrice stringOptional

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

    formatdecimal
    ResourceType string

    Resource type the line items belong to (e.g. “vm”, “volume”, “nks_node_pool”).

    Subtotal string

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

    formatdecimal

    OrganizationsBillingRecharge Policy

    Get Organization Recharge Policy
    client.Organizations.Billing.RechargePolicy.Get(ctx, organizationID) (*OrganizationRechargePolicy, error)
    GET/v1/organizations/{organization_id}/billing/recharge_policy
    Update Organization Recharge Policy
    client.Organizations.Billing.RechargePolicy.Update(ctx, organizationID, body) (*OrganizationRechargePolicy, error)
    PATCH/v1/organizations/{organization_id}/billing/recharge_policy
    ModelsExpand Collapse
    type AutomaticPolicyArgs struct{…}

    PolicyArgs carries the threshold parameters. Required when policy is “automatic”; must be omitted when policy is “manual”.

    Fixed string

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

    formatdecimal
    RunwayDays string

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

    formatdecimal
    MonthlyCap stringOptional

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

    formatdecimal
    type OrganizationRechargePolicy struct{…}

    An organization’s current recharge policy. policy_args is null for a manual policy.

    Policy is the top-up mode.

    One of the following:
    const RechargePolicyModeManual RechargePolicyMode = "manual"
    const RechargePolicyModeAutomatic RechargePolicyMode = "automatic"

    PolicyArgs carries the threshold parameters. Required when policy is “automatic”; must be omitted when policy is “manual”.

    Fixed string

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

    formatdecimal
    RunwayDays string

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

    formatdecimal
    MonthlyCap stringOptional

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

    formatdecimal
    PolicySince Time

    PolicySince is when the policy currently in force took effect. Any change moves it, including an edit to the threshold parameters of an automatic policy.

    formatdate-time
    type RechargePolicyMode string

    Policy is the top-up mode.

    One of the following:
    const RechargePolicyModeManual RechargePolicyMode = "manual"
    const RechargePolicyModeAutomatic RechargePolicyMode = "automatic"