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

# List subscription plans



## OpenAPI

````yaml /api-reference/openapi.yaml get /subscription/plans
openapi: 3.0.3
info:
  title: Gapstack API
  version: '1.0'
  description: >-
    REST API for Gapstack tenants, projects, environments, resources, and
    integrations.
servers:
  - url: https://9nr7sbhimh.execute-api.us-west-1.amazonaws.com/prod
    description: Production
security:
  - BearerAuth: []
tags:
  - name: healthcheck
    description: Service health
  - name: tenants
    description: Tenants, members, infrastructure, and API keys
  - name: invitations
    description: Tenant invitations
  - name: projects
    description: Projects, variables, webhooks, and integrations
  - name: environments
    description: Environments, deploys, artifacts, and variables
  - name: resources
    description: Cloud resources
  - name: workflows
    description: Deployment and infrastructure workflows
  - name: aws-accounts
    description: Linked AWS accounts
  - name: integrations
    description: Marketplace integrations
  - name: github
    description: GitHub App install and webhooks
  - name: costs
    description: Aggregated cloud costs
  - name: summary
    description: Tenant dashboard summary
  - name: subscription
    description: Plans, usage, and billing webhooks
  - name: settings
    description: System settings, permissions, and superadmins
paths:
  /subscription/plans:
    get:
      tags:
        - subscription
      summary: List subscription plans
      operationId: listSubscriptionPlans
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SubscriptionPlan'
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SubscriptionPlan:
      type: object
      description: >
        Billing plan (models.Plan). Exact JSON keys follow Go encoding/json for
        paas-lib models.
      properties:
        active:
          type: boolean
        addon:
          type: boolean
        created_at_sk:
          type: string
        currency:
          type: string
        description:
          type: string
        entitlements:
          $ref: '#/components/schemas/PlanEntitlements'
        name:
          type: string
        id:
          type: string
          x-go-name: Pk
        planId:
          type: string
        productID:
          type: string
        recurring:
          $ref: '#/components/schemas/PlanRecurring'
        sk:
          type: string
        type_pk:
          type: string
        unitAmount:
          type: integer
        updated_at:
          type: string
    ErrorResponse:
      type: object
      description: >
        JSON body returned by WriteJsonError (internal/app/util.go
        errorResponse).

        Field `error` carries the human-readable message; `code` is set for
        Gapstack errors.
      properties:
        code:
          description: >
            Machine-readable code from paas-lib when the error is a
            GapstackError; omitted when not.
          nullable: true
          allOf:
            - $ref: '#/components/schemas/PaasLibErrorCode'
        error:
          type: string
          description: Human-readable error message (JSON key `error`, not `message`).
        meta:
          type: object
          additionalProperties:
            type: string
          description: Optional metadata (e.g. validation field names).
    PlanEntitlements:
      type: object
      description: models.PlanEntitlements (paas-lib).
      properties:
        environments:
          type: integer
        projects:
          type: integer
        resources:
          type: integer
        tenants:
          type: integer
    PlanRecurring:
      type: object
      description: models.PlanRecurring (paas-lib).
      properties:
        interval:
          type: string
        interval_count:
          type: integer
        trial_period_days:
          type: integer
    PaasLibErrorCode:
      type: string
      description: >
        Machine-readable code from paas-lib (errors.Code). Matches
        github.com/gapai-io/paas-lib/pkg/errors.Code.
      enum:
        - common.internal_error
        - common.unavailable
        - common.timeout
        - common.conflict
        - common.not_implemented
        - validation.invalid
        - validation.required
        - auth.unauthorized
        - auth.forbidden
        - storage.not_found
        - storage.already_exists
        - storage.db_error
        - storage.constraint_violation
        - service.invalid_state
        - service.rule_violation
        - service.aborted
        - external.error
        - external.timeout
        - external.bad_response
        - stack.manual_deletion
        - subscription.invalid_state
        - subscription.rule_violation
        - subscription.canceled
        - subscription.not_found
        - subscription.limit_reached
      x-enum-varnames:
        - ErrInternalErrorCode
        - ErrUnavailableErrorCode
        - ErrTimeoutErrorCode
        - ErrConflictErrorCode
        - ErrNotImplementedErrorCode
        - ErrValidationInvalidCode
        - ErrValidationRequiredCode
        - ErrUnauthorizedCode
        - ErrForbiddenCode
        - ErrRepoNotFoundErrorCode
        - ErrRepoAlreadyExistsErrorCode
        - ErrRepoDBErrorCode
        - ErrRepoConstraintViolationErrorCode
        - ErrInvalidStateCode
        - ErrBusinessRuleCode
        - ErrOperationAbortCode
        - ErrExternalErrorCode
        - ErrExternalTimeoutCode
        - ErrExternalBadRespCode
        - ErrStackManualDeletionCode
        - ErrSubscriptionInvalidStateCode
        - ErrSubscriptionBusinessRuleCode
        - ErrSubscriptionCanceledCode
        - ErrSubscriptionNotFoundCode
        - ErrSubscriptionLimitReachedCode
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Bearer token in the Authorization header (e.g. JWT / Cognito access
        token).

````