> ## 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 Denial

> Get one budget-denial episode by its unique ID.



## OpenAPI

````yaml https://spec.speakeasy.com/conductor-one/conductorone/my-source-with-code-samples get /api/v1/spend-insights/denials/{block_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/denials/{block_id}:
    get:
      tags:
        - Spend Insights
      summary: Get Denial
      description: Get one budget-denial episode by its unique ID.
      operationId: c1.api.spendinsights.v1.SpendInsightsService.GetDenial
      parameters:
        - in: path
          name: block_id
          required: true
          schema:
            description: Unique identifier for the denial episode.
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/c1.api.spendinsights.v1.GetDenialResponse'
          description: >-
            GetDenialResponse contains a denial episode and its first-refusal
            context.
      x-codeSamples:
        - lang: go
          label: GetDenial
          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.GetDenial(ctx, operations.C1APISpendinsightsV1SpendInsightsServiceGetDenialRequest{\n        BlockID: \"<id>\",\n    })\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.GetDenialResponse != nil {\n        // handle response\n    }\n}"
components:
  schemas:
    c1.api.spendinsights.v1.GetDenialResponse:
      description: >-
        GetDenialResponse contains a denial episode and its first-refusal
        context.
      properties:
        episode:
          oneOf:
            - $ref: '#/components/schemas/c1.api.spendinsights.v1.DenialEpisode'
            - type: 'null'
        firstDenialMoney:
          oneOf:
            - $ref: '#/components/schemas/c1.api.spendinsights.v1.DenialMoneySnapshot'
            - type: 'null'
        historicalTrace:
          oneOf:
            - $ref: '#/components/schemas/c1.models.rrsp.v1.AdmissionTrace'
            - type: 'null'
      title: Get Denial Response
      type: object
      x-speakeasy-name-override: GetDenialResponse
    c1.api.spendinsights.v1.DenialEpisode:
      description: >-
        DenialEpisode represents repeated budget refusals for one scope and
        budget period.
      properties:
        attemptCount:
          description: >-
            Best-effort lower bound for refused calls in this episode.
            Concurrent
             retry exhaustion can under-report; denial_events is exact for a window.
          format: int64
          type: string
        authorityId:
          description: Identifier of the configuration that supplied the denying limit.
          type: string
        authorityKind:
          description: Type of configuration that supplied the denying limit.
          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
        authorityVersion:
          description: Version of the configuration used for the first refusal.
          format: int64
          type: string
        blockId:
          description: Unique identifier for this denial episode.
          type: string
        budgetKey:
          description: Stable identifier for the budget account that denied the calls.
          type: string
        closedAt:
          format: date-time
          type:
            - string
            - 'null'
        firstDeniedAt:
          format: date-time
          type:
            - string
            - 'null'
        lastDeniedAt:
          format: date-time
          type:
            - string
            - 'null'
        periodEnd:
          format: date-time
          type:
            - string
            - 'null'
        periodKey:
          description: Stable key for the denied budget period.
          type: string
        periodKind:
          description: Length of the denied 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'
        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
        requestTaskId:
          description: ID of the access request task associated with this episode.
          type: string
        requestTaskState:
          description: Current state of the associated access request task.
          enum:
            - TICKET_STATE_UNSPECIFIED
            - TICKET_STATE_OPEN
            - TICKET_STATE_CLOSED
          type: string
          x-speakeasy-unknown-values: allow
        scopeAppId:
          description: Application ID for application-scoped episodes.
          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
        scopeUserId:
          description: User ID for user-scoped episodes.
          type: string
        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: Denial Episode
      type: object
      x-speakeasy-name-override: DenialEpisode
    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.models.rrsp.v1.AdmissionTrace:
      description: |-
        AdmissionTrace is the bounded authority decision committed with a
         reservation. It stores typed row references and resolved limits, never full
         authority rows. Relevant absences remain explicit because a row created
         between resolution and commit is the fail-open half of the pin set.

         Reservation.expires_at is the Dynamo TTL attribute, so this trace supports
         in-flight atomicity and bounded operational diagnosis only. The durable copy
         belongs on M2's per-call usage record.
      properties:
        allocations:
          description: The allocations field.
          items:
            $ref: '#/components/schemas/c1.models.rrsp.v1.TraceAllocation'
          type:
            - array
            - 'null'
        authorityRefs:
          description: >-
            Every row the decision depended on: policy, optional
            assignment/caps,
             winning rule, membership binding, and current user/app-user identities.
             Missing optional rows are present with absent=true and version=0.
          items:
            $ref: '#/components/schemas/c1.models.rrsp.v1.AuthorityRef'
          type:
            - array
            - 'null'
      title: Admission Trace
      type: object
      x-speakeasy-name-override: AdmissionTrace
    c1.models.rrsp.v1.TraceAllocation:
      description: |-
        TraceAllocation records one admitted scope, the row that supplied its
         resolved limit, and the historical limit and period.
      properties:
        budgetKey:
          description: The budgetKey field.
          type: string
        limit:
          oneOf:
            - $ref: '#/components/schemas/c1.models.rrsp.v1.ResolvedLimit'
            - type: 'null'
        period:
          description: The period field.
          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
        source:
          oneOf:
            - $ref: '#/components/schemas/c1.models.rrsp.v1.AuthorityRef'
            - type: 'null'
      title: Trace Allocation
      type: object
      x-speakeasy-name-override: TraceAllocation
    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.rrsp.v1.ResolvedLimit:
      description: >
        ResolvedLimit is funds.v1.SpendLimit minus `blocked` — a blocked scope
        fails
         closed during resolution and never creates an account — with Money flattened
         to nano.

        This message contains a oneof named kind. Only a single field of the
        following list may be set at a time:
          - unlimited
          - amount
      properties:
        amount:
          oneOf:
            - $ref: '#/components/schemas/c1.models.rrsp.v1.ResolvedAmount'
            - type: 'null'
        unlimited:
          oneOf:
            - $ref: '#/components/schemas/c1.models.rrsp.v1.ResolvedUnlimited'
            - type: 'null'
      title: Resolved Limit
      type: object
      x-speakeasy-name-override: ResolvedLimit
    c1.models.rrsp.v1.ResolvedAmount:
      description: The ResolvedAmount message.
      properties:
        amountNano:
          description: The amountNano field.
          format: int64
          type: string
      title: Resolved Amount
      type: object
      x-speakeasy-name-override: ResolvedAmount
    c1.models.rrsp.v1.ResolvedUnlimited:
      description: The ResolvedUnlimited message.
      title: Resolved Unlimited
      type: object
      x-speakeasy-name-override: ResolvedUnlimited
  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

````