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

# Organization subscriptions

> Get subscription and plan details for organizations the user is a member of



## OpenAPI

````yaml get /organizations/subscription-info
openapi: 3.0.3
info:
  title: Diversion Core API
  description: >-
    Definition of the Core API used to access low-level functionality of
    Diversion
  version: 0.2.0
servers:
  - url: https://api.diversion.dev/v0
    description: Base endpoint
security: []
paths:
  /organizations/subscription-info:
    get:
      tags:
        - Organization Management
      summary: Organization subscriptions
      description: >-
        Get subscription and plan details for organizations the user is a member
        of
      operationId: src.handlersv2.organization.list_subscription_info
      parameters:
        - in: query
          name: org_ids
          description: Optional list of organization IDs to filter results
          schema:
            type: array
            items:
              type: string
              minLength: 1
              maxLength: 128
      responses:
        '200':
          description: Organization subscription information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationSubscriptionInfoList'
        default:
          $ref: '#/components/responses/Error'
      security:
        - OAuth2:
            - coreapi/read
components:
  schemas:
    OrganizationSubscriptionInfoList:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/OrganizationSubscriptionInfo'
      required:
        - items
    OrganizationSubscriptionInfo:
      type: object
      properties:
        organization:
          $ref: '#/components/schemas/OrganizationBasicInfo'
        members:
          $ref: '#/components/schemas/MembershipInfo'
        storage:
          $ref: '#/components/schemas/StorageInfo'
        subscription:
          $ref: '#/components/schemas/SubscriptionInfo'
      required:
        - organization
        - members
        - storage
        - subscription
    Error:
      type: object
      properties:
        status:
          type: integer
          description: HTTP status code
        detail:
          type: string
        title:
          type: string
        type:
          type: string
      required:
        - status
        - detail
    OrganizationBasicInfo:
      type: object
      properties:
        id:
          type: string
          description: Organization identifier
        name:
          type: string
          description: Organization name
        owner:
          $ref: '#/components/schemas/User'
      required:
        - id
        - name
        - owner
    MembershipInfo:
      type: object
      properties:
        current_count:
          type: integer
          description: Current number of organization members
        allowed_count:
          type: integer
          description: Number of members allowed by subscription
      required:
        - current_count
        - allowed_count
    StorageInfo:
      type: object
      properties:
        current_gb:
          type: number
          format: float
          description: Current storage usage in GB
        allowed_gb:
          type: integer
          description: Storage allowed by subscription in GB
      required:
        - current_gb
        - allowed_gb
    SubscriptionInfo:
      type: object
      properties:
        is_on_trial:
          type: boolean
          description: Whether the organization is on trial
        trial_end_time:
          type: string
          format: date-time
          nullable: true
          description: When the trial ends (if on trial)
        in_exception_list:
          type: boolean
          description: Whether the organization is in the exception list
        has_subscription_diff:
          type: boolean
          description: Whether there are subscription breaches (usage exceeds plan)
      required:
        - is_on_trial
        - in_exception_list
        - has_subscription_diff
    User:
      description: User details
      type: object
      properties:
        image:
          type: string
          description: >-
            URL of the user image. If updating the image, could be a base64
            encoded image.
          maxLength: 524288
        email:
          type: string
          format: email
        full_name:
          type: string
        id:
          type: string
        name:
          type: string
        tier:
          $ref: '#/components/schemas/Tier'
      required:
        - id
    Tier:
      description: The tier of the user
      type: string
      enum:
        - EDUCATION
        - INDIE
        - PROFESSIONAL
        - ENTERPRISE
        - UNKNOWN
  responses:
    Error:
      description: An error occurred
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    OAuth2:
      type: oauth2
      x-tokenInfoFunc: src.token_info.token_auth
      description: This API uses OAuth 2 with the implicit grant flow
      flows:
        implicit:
          authorizationUrl: https://auth.diversion.dev/oauth2/authorize
          scopes:
            coreapi/read: Operations with no possible side-effects
            coreapi/write: Modifying operations
            coreapi/admin: >-
              Organizational operations like adding a repo or changing repo
              properties

````