> ## Documentation Index
> Fetch the complete documentation index at: https://docs.codecobra.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Org Get Billing

> Get organization billing summary.

Every role gets the same balance + payment-terms, because the client
spending guard (computeBillingBlocked) reads them and must behave
identically for everyone — sending a message bills the org wallet
regardless of who posts it. Over-redacting these from members (returning
only role + usage) made the task composer default account_balance to 0
and compute a false "balance depleted" block, hard-stopping members from
sending on a fully funded org. Members still don't get the payment-method
management surface (Stripe ids, billing email, saved cards, auto-reload):
topping up / changing payment settings stays owner-only and is enforced
on those endpoints.



## OpenAPI

````yaml /openapi.json get /api/organizations/{org_id}/billing
openapi: 3.1.0
info:
  description: >-
    Public CodeCobra API. Authenticate by sending a personal API key in the
    `Authorization: Bearer <key>` header. Generate keys from Settings → API keys
    in the CodeCobra dashboard.
  title: CodeCobra Public API
  version: 1.0.0
servers: []
security: []
paths:
  /api/organizations/{org_id}/billing:
    get:
      tags:
        - public
      summary: Org Get Billing
      description: >-
        Get organization billing summary.


        Every role gets the same balance + payment-terms, because the client

        spending guard (computeBillingBlocked) reads them and must behave

        identically for everyone — sending a message bills the org wallet

        regardless of who posts it. Over-redacting these from members (returning

        only role + usage) made the task composer default account_balance to 0

        and compute a false "balance depleted" block, hard-stopping members from

        sending on a fully funded org. Members still don't get the
        payment-method

        management surface (Stripe ids, billing email, saved cards,
        auto-reload):

        topping up / changing payment settings stays owner-only and is enforced

        on those endpoints.
      operationId: org_get_billing_api_organizations__org_id__billing_get
      parameters:
        - in: path
          name: org_id
          required: true
          schema:
            format: uuid
            title: Org Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    HTTPBearer:
      scheme: bearer
      type: http

````