> ## Documentation Index
> Fetch the complete documentation index at: https://conductorone-docs-google-workspace-action-examples.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Resolve Effective Limits

> Resolve the budget limits and current usage that apply to a user.
 Optionally includes application-specific limits.



## OpenAPI

````yaml https://spec.speakeasy.com/conductor-one/conductorone/my-source-with-code-samples get /api/v1/spend-insights/effective-limits/{user_id}
openapi: 3.1.0
info:
  description: The C1 API is a HTTP API for managing C1 resources.
  title: C1 API
  version: 0.1.0-alpha
servers:
  - description: The C1 API server for the current tenant.
    url: https://{tenantDomain}.conductor.one
    variables:
      tenantDomain:
        default: example
        description: The domain of the tenant to use for this request.
security:
  - bearerAuth: []
    oauth: []
paths:
  /api/v1/spend-insights/effective-limits/{user_id}:
    get:
      tags:
        - Spend Insights
      summary: Resolve Effective Limits
      description: |-
        Resolve the budget limits and current usage that apply to a user.
         Optionally includes application-specific limits.
      operationId: c1.api.spendinsights.v1.SpendInsightsService.ResolveEffectiveLimits
      parameters:
        - in: path
          name: user_id
          required: true
          schema:
            description: User whose effective limits should be resolved.
            type: string
        - in: query
          name: app_id
          schema:
            description: Optional application used to include application-specific limits.
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/c1.api.spendinsights.v1.ResolveEffectiveLimitsResponse
          description: >-
            ResolveEffectiveLimitsResponse contains the limits currently
            applying to a user.
      x-codeSamples:
        - lang: go
          label: ResolveEffectiveLimits
          source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/conductorone/conductorone-sdk-go/pkg/models/shared\"\n\tconductoronesdkgo \"github.com/conductorone/conductorone-sdk-go\"\n\t\"github.com/conductorone/conductorone-sdk-go/pkg/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    s := conductoronesdkgo.New(\n        conductoronesdkgo.WithSecurity(shared.Security{\n            BearerAuth: \"<YOUR_BEARER_TOKEN_HERE>\",\n            Oauth: \"<YOUR_OAUTH_HERE>\",\n        }),\n    )\n\n    res, err := s.SpendInsights.ResolveEffectiveLimits(ctx, operations.C1APISpendinsightsV1SpendInsightsServiceResolveEffectiveLimitsRequest{\n        UserID: \"<id>\",\n    })\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.ResolveEffectiveLimitsResponse != nil {\n        // handle response\n    }\n}"
components:
  schemas:
    c1.api.spendinsights.v1.ResolveEffectiveLimitsResponse:
      description: >-
        ResolveEffectiveLimitsResponse contains the limits currently applying to
        a user.
      properties:
        currencyCode:
          description: Currency used for monetary values.
          type: string
        denialReason:
          description: Reason spend is denied. Present only when state is DENIED.
          enum:
            - DENY_REASON_UNSPECIFIED
            - DENY_REASON_TENANT_FROZEN
            - DENY_REASON_SUSPENDED_BY_ADMIN
            - DENY_REASON_APP_SUSPENDED
            - DENY_REASON_APP_PAUSED_BY_YOU
            - DENY_REASON_NO_SUPPLY
          type: string
          x-speakeasy-unknown-values: allow
        denialScopeName:
          description: Scope that denies spend. Present only when state is DENIED.
          type: string
        scopes:
          description: >-
            Ordered organization, user, application, and user-application
            scopes.
          items:
            $ref: '#/components/schemas/c1.api.spendinsights.v1.EffectiveScope'
          type:
            - array
            - 'null'
        state:
          description: Result of resolving the user's effective limits.
          enum:
            - EFFECTIVE_LIMITS_STATE_UNSPECIFIED
            - EFFECTIVE_LIMITS_STATE_RESOLVED
            - EFFECTIVE_LIMITS_STATE_NO_POLICY
            - EFFECTIVE_LIMITS_STATE_NO_CEILING
            - EFFECTIVE_LIMITS_STATE_DENIED
          type: string
          x-speakeasy-unknown-values: allow
      title: Resolve Effective Limits Response
      type: object
      x-speakeasy-name-override: ResolveEffectiveLimitsResponse
    c1.api.spendinsights.v1.EffectiveScope:
      description: EffectiveScope describes one budget scope that applies to a user.
      properties:
        accountInitialized:
          description: Whether this budget account has recorded activity.
          type: boolean
        authority:
          oneOf:
            - $ref: '#/components/schemas/c1.models.rrsp.v1.AuthorityRef'
            - type: 'null'
        authorityFromExtension:
          description: Whether an extension supplied the effective configuration.
          type: boolean
        budgetKey:
          description: Stable identifier for the scope's budget account.
          type: string
        lifetimeConsumedNano:
          description: Spend settled over the lifetime of the budget account.
          format: int64
          type: string
        limitNano:
          description: Effective spend limit. Zero when tracking is true.
          format: int64
          type: string
        periodEnd:
          format: date-time
          type:
            - string
            - 'null'
        periodKey:
          description: Stable key for the current budget period.
          type: string
        periodKind:
          description: Length of the budget period.
          enum:
            - PERIOD_KIND_UNSPECIFIED
            - PERIOD_KIND_DAILY
            - PERIOD_KIND_WEEKLY
            - PERIOD_KIND_MONTHLY
            - PERIOD_KIND_QUARTERLY
            - PERIOD_KIND_YEARLY
          type: string
          x-speakeasy-unknown-values: allow
        periodStart:
          format: date-time
          type:
            - string
            - 'null'
        remainingNano:
          description: Spend headroom after settled and reserved spend.
          format: int64
          type: string
        reservedNano:
          description: Spend reserved by in-progress calls.
          format: int64
          type: string
        scope:
          oneOf:
            - $ref: '#/components/schemas/c1.models.funds.v1.AccountScope'
            - type: 'null'
        tracking:
          description: Whether this scope records spend without enforcing a finite limit.
          type: boolean
        windowCommittedNano:
          description: Settled plus reserved spend in the current budget period.
          format: int64
          type: string
        windowConsumedNano:
          description: Spend settled in the current budget period.
          format: int64
          type: string
      title: Effective Scope
      type: object
      x-speakeasy-name-override: EffectiveScope
    c1.models.rrsp.v1.AuthorityRef:
      description: >-
        AuthorityRef identifies one authority row at the revision admission
        read.
         The reservation already carries tenant_id; the remaining fields are the
         row's typed primary-key components. Absent rows have version zero.
      properties:
        absent:
          description: The absent field.
          type: boolean
        appEntitlementId:
          description: The appEntitlementId field.
          type: string
        appId:
          description: The appId field.
          type: string
        appUserId:
          description: The appUserId field.
          type: string
        kind:
          description: The kind field.
          enum:
            - AUTHORITY_KIND_UNSPECIFIED
            - AUTHORITY_KIND_FUND_POLICY
            - AUTHORITY_KIND_FUND_ASSIGNMENT
            - AUTHORITY_KIND_FUND_RULE
            - AUTHORITY_KIND_TENANT_APP_CAP
            - AUTHORITY_KIND_SUBJECT_APP_LIMIT
            - AUTHORITY_KIND_ENTITLEMENT_BINDING
            - AUTHORITY_KIND_APP_USER
            - AUTHORITY_KIND_USER
          type: string
          x-speakeasy-unknown-values: allow
        ruleId:
          description: The ruleId field.
          type: string
        userId:
          description: The userId field.
          type: string
        version:
          description: The version field.
          format: int64
          type: string
      title: Authority Ref
      type: object
      x-speakeasy-name-override: AuthorityRef
    c1.models.funds.v1.AccountScope:
      description: >
        AccountScope names one of the four accounting scopes a spend is admitted
         against. The arm is the scope kind — no separate kind enum to keep in step.

         It lives in funds/v1, not beside the ledger row that stores it, because both
         sides need the same declaration: resolution produces a scope, the ledger
         stores it on BudgetAccount, and the account key is derived from it.

        This message contains a oneof named kind. Only a single field of the
        following list may be set at a time:
          - tenant
          - subject
          - app
          - subjectApp
      properties:
        app:
          oneOf:
            - $ref: '#/components/schemas/c1.models.funds.v1.AppScope'
            - type: 'null'
        subject:
          oneOf:
            - $ref: '#/components/schemas/c1.models.funds.v1.SubjectScope'
            - type: 'null'
        subjectApp:
          oneOf:
            - $ref: '#/components/schemas/c1.models.funds.v1.SubjectAppScope'
            - type: 'null'
        tenant:
          oneOf:
            - $ref: '#/components/schemas/c1.models.funds.v1.TenantScope'
            - type: 'null'
      title: Account Scope
      type: object
      x-speakeasy-name-override: AccountScope
    c1.models.funds.v1.AppScope:
      description: The AppScope message.
      properties:
        appId:
          description: The appId field.
          type: string
      title: App Scope
      type: object
      x-speakeasy-name-override: AppScope
    c1.models.funds.v1.SubjectScope:
      description: The SubjectScope message.
      properties:
        userId:
          description: Canonical c1.models.user.v2.User id, every UserType.
          type: string
      title: Subject Scope
      type: object
      x-speakeasy-name-override: SubjectScope
    c1.models.funds.v1.SubjectAppScope:
      description: The SubjectAppScope message.
      properties:
        appId:
          description: The appId field.
          type: string
        userId:
          description: The userId field.
          type: string
      title: Subject App Scope
      type: object
      x-speakeasy-name-override: SubjectAppScope
    c1.models.funds.v1.TenantScope:
      description: The TenantScope message.
      title: Tenant Scope
      type: object
      x-speakeasy-name-override: TenantScope
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http
    oauth:
      description: >-
        This API uses OAuth2 with the Client Credential flow.

        Client Credentials must be sent in the BODY, not the headers.

        For an example of how to implement this, refer to the
        [c1TokenSource.Token()](https://github.com/ConductorOne/conductorone-sdk-go/blob/3375fe7c0126d17e7ec4e711693dee7b791023aa/token_source.go#L101-L187)
        function.
      flows:
        clientCredentials:
          scopes: {}
          tokenUrl: /auth/v1/token
      type: oauth2

````