> ## Documentation Index
> Fetch the complete documentation index at: https://www.c1.ai/docs/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:
            - SPEND_DENY_REASON_UNSPECIFIED
            - SPEND_DENY_REASON_TENANT_FROZEN
            - SPEND_DENY_REASON_SUSPENDED_BY_ADMIN
            - SPEND_DENY_REASON_APP_SUSPENDED
            - SPEND_DENY_REASON_APP_PAUSED_BY_YOU
            - SPEND_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.api.spendinsights.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.api.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.api.spendinsights.v1.AuthorityRef:
      description: AuthorityRef identifies a configuration and the revision admission read.
      properties:
        absent:
          description: Whether admission found no configuration of this kind.
          type: boolean
        appEntitlementId:
          description: Application entitlement ID, for entitlement-binding authorities.
          type: string
        appId:
          description: Application ID the configuration applies to.
          type: string
        appUserId:
          description: Application user ID, for application-user authorities.
          type: string
        kind:
          description: Type of configuration.
          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: Fund rule ID, for fund-rule authorities.
          type: string
        userId:
          description: User ID the configuration applies to.
          type: string
        version:
          description: Configuration revision read during admission.
          format: int64
          type: string
      title: Authority Ref
      type: object
      x-speakeasy-name-override: AuthorityRef
    c1.api.funds.v1.AccountScope:
      description: >
        AccountScope identifies the tenant, user, application, or
        user-application
         account against which spending was admitted.

        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.api.funds.v1.AppScope'
            - type: 'null'
        subject:
          oneOf:
            - $ref: '#/components/schemas/c1.api.funds.v1.SubjectScope'
            - type: 'null'
        subjectApp:
          oneOf:
            - $ref: '#/components/schemas/c1.api.funds.v1.SubjectAppScope'
            - type: 'null'
        tenant:
          oneOf:
            - $ref: '#/components/schemas/c1.api.funds.v1.TenantScope'
            - type: 'null'
      title: Account Scope
      type: object
      x-speakeasy-name-override: FundsAccountScope
    c1.api.funds.v1.AppScope:
      description: AppScope identifies one application's account.
      properties:
        appId:
          description: Application ID of the account.
          type: string
      title: App Scope
      type: object
      x-speakeasy-name-override: FundsAppScope
    c1.api.funds.v1.SubjectScope:
      description: SubjectScope identifies one user's account.
      properties:
        userId:
          description: User ID of the account owner.
          type: string
      title: Subject Scope
      type: object
      x-speakeasy-name-override: FundsSubjectScope
    c1.api.funds.v1.SubjectAppScope:
      description: SubjectAppScope identifies one user's account for an application.
      properties:
        appId:
          description: Application ID of the account.
          type: string
        userId:
          description: User ID of the account owner.
          type: string
      title: Subject App Scope
      type: object
      x-speakeasy-name-override: FundsSubjectAppScope
    c1.api.funds.v1.TenantScope:
      description: TenantScope identifies the organization-wide account.
      title: Tenant Scope
      type: object
      x-speakeasy-name-override: FundsTenantScope
  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

````