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

# Get Subscription

> Retrieve information about



## OpenAPI

````yaml /api-reference/openapi.json get /v1/billing/subscription/
openapi: 3.1.0
info:
  title: Diga API
  version: 0.1.0
servers:
  - url: https://api.diga.io
    description: Production
security: []
paths:
  /v1/billing/subscription/:
    get:
      tags:
        - Billing - Subscriptions
      summary: Get Subscription
      description: Retrieve information about
      operationId: get_subscription_v1_billing_subscription__get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionSchema'
        '403':
          description: Forbidden - Insufficient permissions
          content:
            application/json:
              example:
                status: error
                error_code: INTERNAL_SERVER_ERROR
                message: Missing required permissions
              schema:
                $ref: '#/components/schemas/ErrorResponseSchema'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              example:
                status: error
                error_code: INTERNAL_SERVER_ERROR
                message: 'Error: Internal Server Error'
              schema:
                $ref: '#/components/schemas/ErrorResponseSchema'
      security:
        - CustomHTTPBearer: []
components:
  schemas:
    SubscriptionSchema:
      properties:
        name:
          type: string
          title: Name
          description: Name of the subscription plan
        next_invoice_date:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Next Invoice Date
          description: >-
            Date of the next invoice. If null, the plan has been cancelled: it
            will not renew and no more invoiced willbe charged.
        next_invoice_amount:
          anyOf:
            - type: number
            - type: 'null'
          title: Next Invoice Amount
          description: Amount of the next invoice, including metered usage
        period_start:
          type: string
          format: date-time
          title: Period Start
          description: Start date of the current billing period
        period_end:
          type: string
          format: date-time
          title: Period End
          description: End date of the current billing period
        included_minutes:
          type: integer
          title: Included Minutes
          description: Number of included minutes in the plan
        active_since:
          type: string
          format: date-time
          title: Active Since
          description: Date when the subscription became active
        price:
          type: number
          title: Price
          description: Price of the subscription plan
        currency:
          type: string
          title: Currency
          description: Currency of the subscription plan
        period:
          type: string
          enum:
            - month
            - year
            - day
            - week
          title: Period
          description: Billing period of the subscription plan
        overage_price_per_minute:
          anyOf:
            - type: number
            - type: 'null'
          title: Overage Price Per Minute
          description: >-
            Price per minute for usage beyond the included minutes, null if
            metered usage is disabled.
        usage_based_billing_enabled:
          type: boolean
          title: Usage Based Billing Enabled
          description: Indicates if metered usage is enabled for the company
        minutes_count:
          type: integer
          title: Minutes Count
          description: Total number of minutes used in the current billing period
        rollover_minutes_count:
          type: integer
          title: Rollover Minutes Count
          description: Number of rollover minutes available in the current billing period
        next_phase:
          anyOf:
            - $ref: '#/components/schemas/SubscriptionPhaseSchema'
            - type: 'null'
          description: Information about the next scheduled subscription phase
        next_payment_date:
          type: string
          format: date-time
          title: Next Payment Date
          description: >-
            Date of the next payment. If usage-based billing is enabled, this is
            the next invoice date. Otherwise, it's the period end (subscription
            renewal date).
        knowledge_storage_used_bytes:
          type: integer
          title: Knowledge Storage Used Bytes
          description: Total bytes used by knowledge items
        knowledge_storage_limit_bytes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Knowledge Storage Limit Bytes
          description: >-
            Maximum storage bytes allowed by the plan (null if no limit
            configured)
        knowledge_items_count:
          type: integer
          title: Knowledge Items Count
          description: Total number of knowledge items
        copilot_usage_percent:
          type: number
          title: Copilot Usage Percent
          description: Percentage of weekly copilot budget used (0-100)
          default: 0
      type: object
      required:
        - name
        - next_invoice_date
        - period_start
        - period_end
        - included_minutes
        - active_since
        - price
        - currency
        - period
        - overage_price_per_minute
        - usage_based_billing_enabled
        - minutes_count
        - rollover_minutes_count
        - next_payment_date
        - knowledge_storage_used_bytes
        - knowledge_items_count
      title: SubscriptionSchema
    ErrorResponseSchema:
      properties:
        status:
          type: string
          title: Status
          description: Status of the response, always 'error' for error responses
          default: error
        error_code:
          type: string
          title: Error Code
          description: Machine-readable error code in SCREAMING_SNAKE_CASE format
          examples:
            - PROJECT_NOT_FOUND
            - INVALID_EMAIL
            - UNAUTHORIZED_ROLE
        message:
          type: string
          title: Message
          description: Human-readable error message with details
          examples:
            - Project with id 550e8400-e29b-41d4-a716-446655440000 not found
            - The email invalid@email is not valid
            - Insufficient permissions to perform this action
      type: object
      required:
        - error_code
        - message
      title: ErrorResponseSchema
      description: Standard error response format for all API errors.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SubscriptionPhaseSchema:
      properties:
        name:
          type: string
          title: Name
          description: Name of the next subscription plan
        period:
          type: string
          enum:
            - month
            - year
          title: Period
          description: Billing period of the next subscription plan
        price:
          type: number
          title: Price
          description: Price of the next subscription plan
      type: object
      required:
        - name
        - period
        - price
      title: SubscriptionPhaseSchema
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    CustomHTTPBearer:
      type: http
      scheme: bearer

````