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

# Get My Spend Status

> Get the caller's budget limits and current usage. An optional denial ID
 includes that denial only when it is visible to the caller.



## OpenAPI

````yaml https://spec.speakeasy.com/conductor-one/conductorone/my-source-with-code-samples get /api/v1/spend-insights/my/status
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/my/status:
    get:
      tags:
        - Spend Insights
      summary: Get My Spend Status
      description: |-
        Get the caller's budget limits and current usage. An optional denial ID
         includes that denial only when it is visible to the caller.
      operationId: c1.api.spendinsights.v1.SpendInsightsService.GetMySpendStatus
      parameters:
        - in: query
          name: app_id
          schema:
            description: Optional application used to include application-specific limits.
            type: string
        - in: query
          name: block_id
          schema:
            description: >-
              Optional denial episode to include when it is visible to the
              caller.
               app_id does not grant access to this episode.
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/c1.api.spendinsights.v1.GetMySpendStatusResponse
          description: >-
            GetMySpendStatusResponse contains the caller's effective limits and
            optional denial.
      x-codeSamples:
        - lang: go
          label: GetMySpendStatus
          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.GetMySpendStatus(ctx, operations.C1APISpendinsightsV1SpendInsightsServiceGetMySpendStatusRequest{})\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.GetMySpendStatusResponse != nil {\n        // handle response\n    }\n}"
components:
  schemas:
    c1.api.spendinsights.v1.GetMySpendStatusResponse:
      description: >-
        GetMySpendStatusResponse contains the caller's effective limits and
        optional denial.
      properties:
        block:
          oneOf:
            - $ref: '#/components/schemas/c1.api.spendinsights.v1.MySpendBlock'
            - type: 'null'
        currencyCode:
          description: Currency used for monetary values.
          type: string
        scopes:
          description: >-
            Ordered organization, user, application, and user-application
            scopes.
             Shared organization and application scopes contain no financial details.
          items:
            $ref: '#/components/schemas/c1.api.spendinsights.v1.MyEffectiveScope'
          type:
            - array
            - 'null'
        state:
          description: Result of resolving the caller'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: Get My Spend Status Response
      type: object
      x-speakeasy-name-override: GetMySpendStatusResponse
    c1.api.spendinsights.v1.MySpendBlock:
      description: |-
        MySpendBlock is a caller-visible denial projection. Organization and
         application episodes omit account amounts.
      properties:
        attemptCount:
          description: >-
            Best-effort lower bound for refused calls in this episode.
            Concurrent
             retry exhaustion can under-report.
          format: int64
          type: string
        audienceMessage:
          description: Authoritative user-facing explanation for this refusal.
          type: string
        blockId:
          description: Unique identifier for this denial episode.
          type: string
        closedAt:
          format: date-time
          type:
            - string
            - 'null'
        firstDeniedAt:
          format: date-time
          type:
            - string
            - 'null'
        lastDeniedAt:
          format: date-time
          type:
            - string
            - 'null'
        money:
          oneOf:
            - $ref: '#/components/schemas/c1.api.spendinsights.v1.DenialMoneySnapshot'
            - type: 'null'
        periodKey:
          description: Stable key for the denied budget period.
          type: string
        reason:
          description: Reason the calls were 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
        scopeAppId:
          description: Application ID for APP and SUBJECT_APP scopes.
          type: string
        scopeKind:
          description: Budget scope that denied the calls.
          enum:
            - SPEND_BLOCK_SCOPE_KIND_UNSPECIFIED
            - SPEND_BLOCK_SCOPE_KIND_TENANT
            - SPEND_BLOCK_SCOPE_KIND_SUBJECT
            - SPEND_BLOCK_SCOPE_KIND_APP
            - SPEND_BLOCK_SCOPE_KIND_SUBJECT_APP
          type: string
          x-speakeasy-unknown-values: allow
        state:
          description: Whether this denial episode remains open.
          enum:
            - SPEND_BLOCK_STATE_UNSPECIFIED
            - SPEND_BLOCK_STATE_OPEN
            - SPEND_BLOCK_STATE_CLOSED
          type: string
          x-speakeasy-unknown-values: allow
      title: My Spend Block
      type: object
      x-speakeasy-name-override: MySpendBlock
    c1.api.spendinsights.v1.MyEffectiveScope:
      description: |-
        MyEffectiveScope describes one budget scope that applies to the caller.
         Organization and application scopes never expose financial or authority data.
      properties:
        financials:
          oneOf:
            - $ref: >-
                #/components/schemas/c1.api.spendinsights.v1.MyEffectiveScopeFinancials
            - type: 'null'
        periodEnd:
          format: date-time
          type:
            - string
            - 'null'
        periodKey:
          description: Stable key for the current budget period.
          type: string
        periodKind:
          description: Length of the current 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'
        scope:
          oneOf:
            - $ref: '#/components/schemas/c1.models.funds.v1.AccountScope'
            - type: 'null'
      title: My Effective Scope
      type: object
      x-speakeasy-name-override: MyEffectiveScope
    c1.api.spendinsights.v1.DenialMoneySnapshot:
      description: DenialMoneySnapshot captures account amounts at the first refusal.
      properties:
        consumedNano:
          description: Spend already settled when the first refusal occurred.
          format: int64
          type: string
        currencyCode:
          description: Currency used for monetary values.
          type: string
        limitNano:
          description: Effective limit that caused the refusal.
          format: int64
          type: string
        requestedNano:
          description: Spend requested by the refused call.
          format: int64
          type: string
        reservedNano:
          description: Spend reserved by in-progress calls when the first refusal occurred.
          format: int64
          type: string
      title: Denial Money Snapshot
      type: object
      x-speakeasy-name-override: DenialMoneySnapshot
    c1.api.spendinsights.v1.MyEffectiveScopeFinancials:
      description: |-
        MyEffectiveScopeFinancials contains caller-owned budget amounts. It is
         present only for SUBJECT and SUBJECT_APP scopes that name the caller.
      properties:
        accountInitialized:
          description: Whether this budget account has recorded activity.
          type: boolean
        hasRemainingNano:
          description: Whether remaining_nano is available for this scope.
          type: boolean
        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
        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
        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: My Effective Scope Financials
      type: object
      x-speakeasy-name-override: MyEffectiveScopeFinancials
    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

````