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

# Get subscription

> Get billing subscription state.

Required scope: `billing:read`.

On success, `data` contains: `customers`, `subscriptions`, `subscription`, `products`.



## OpenAPI

````yaml https://sitegpt.ai/api/v2/openapi.json get /api/v2/billing/subscription
openapi: 3.1.0
info:
  title: SiteGPT Agent API
  version: 2.0.0
  description: >-
    Agent-facing API for managing SiteGPT chatbots, dashboard summaries,
    appearance media, knowledge, settings, conversations, leads, members,
    account profiles, usage, billing reads, and API tokens.
servers:
  - url: https://sitegpt.ai
security:
  - bearerAuth: []
tags:
  - name: Discovery
  - name: Onboarding
  - name: Account
  - name: Billing
  - name: Tokens
  - name: Chatbots
  - name: Knowledge
  - name: Knowledge Sync Jobs
  - name: Knowledge Sources
  - name: Custom Responses
  - name: Personas
  - name: Instructions
  - name: Settings
  - name: Conversation Starters
  - name: Conversation Followups
  - name: Members
  - name: Leads
  - name: Conversations
  - name: Messages
  - name: Tags
paths:
  /api/v2/billing/subscription:
    get:
      tags:
        - Billing
      summary: Get subscription
      description: >-
        Get billing subscription state.


        Required scope: `billing:read`.


        On success, `data` contains: `customers`, `subscriptions`,
        `subscription`, `products`.
      operationId: getBillingSubscription
      responses:
        '200':
          description: Successful SiteGPT API v2 response.
          content:
            application/json:
              schema:
                type: object
                required:
                  - ok
                  - data
                  - meta
                properties:
                  ok:
                    type: boolean
                    const: true
                  data:
                    type: object
                    additionalProperties: true
                    properties:
                      customers:
                        type: array
                        items:
                          $ref: '#/components/schemas/BillingCustomer'
                      subscriptions:
                        type: array
                        items:
                          anyOf:
                            - $ref: '#/components/schemas/BillingSubscription'
                            - type: 'null'
                      subscription:
                        anyOf:
                          - $ref: '#/components/schemas/BillingSubscription'
                          - type: 'null'
                      products:
                        type: object
                        additionalProperties: false
                        properties:
                          sitegpt:
                            anyOf:
                              - $ref: '#/components/schemas/BillingProduct'
                              - type: 'null'
                          watermarkAddon:
                            anyOf:
                              - $ref: '#/components/schemas/BillingProduct'
                              - type: 'null'
                          extraMessagesAddon:
                            anyOf:
                              - $ref: '#/components/schemas/BillingProduct'
                              - type: 'null'
                          webhookAddon:
                            anyOf:
                              - $ref: '#/components/schemas/BillingProduct'
                              - type: 'null'
                  meta:
                    $ref: '#/components/schemas/AgentResponseMeta'
                additionalProperties: false
              example:
                ok: true
                data:
                  customers:
                    - id: ctm_x
                      email: user@example.com
                      status: active
                  subscriptions:
                    - id: sub_x
                      status: active
                  subscription:
                    id: sub_x
                    status: active
                  products:
                    sitegpt:
                      productId: pro_x
                      pricingName: Growth
                      interval: month
                    watermarkAddon: null
                    extraMessagesAddon: null
                    webhookAddon: null
                meta:
                  requestId: request-id
        '400':
          $ref: '#/components/responses/AgentError'
        '401':
          $ref: '#/components/responses/AgentError'
        '403':
          $ref: '#/components/responses/AgentError'
        '404':
          $ref: '#/components/responses/AgentError'
        '405':
          $ref: '#/components/responses/AgentError'
      security:
        - bearerAuth:
            - billing:read
components:
  schemas:
    BillingCustomer:
      type: object
      description: A Paddle billing customer linked to this account.
      additionalProperties: true
      properties:
        id:
          type: string
        email:
          type: string
        name:
          type:
            - string
            - 'null'
        status:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    BillingSubscription:
      type: object
      description: A Paddle subscription as serialized for the agent API.
      additionalProperties: true
      properties:
        id:
          type: string
        status:
          type: string
        customerId:
          type: string
        currencyCode:
          type: string
        collectionMode:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        startedAt:
          type:
            - string
            - 'null'
          format: date-time
        firstBilledAt:
          type:
            - string
            - 'null'
          format: date-time
        nextBilledAt:
          type:
            - string
            - 'null'
          format: date-time
        pausedAt:
          type:
            - string
            - 'null'
          format: date-time
        canceledAt:
          type:
            - string
            - 'null'
          format: date-time
        currentBillingPeriod:
          anyOf:
            - $ref: '#/components/schemas/GenericObject'
              description: Current billing period start and end; null between periods.
            - type: 'null'
        billingCycle:
          $ref: '#/components/schemas/GenericObject'
          description: Billing interval and frequency.
        scheduledChange:
          anyOf:
            - $ref: '#/components/schemas/GenericObject'
              description: >-
                Scheduled pause, cancel, or resume; null when nothing is
                scheduled.
            - type: 'null'
        managementUrls:
          $ref: '#/components/schemas/GenericObject'
          description: Paddle-hosted management URLs for this subscription.
    BillingProduct:
      type: object
      description: One active subscription line item.
      additionalProperties: true
      properties:
        productId:
          type: string
        pricingName:
          type: string
        interval:
          type: string
        amount:
          type: string
        currencyCode:
          type: string
        quantity:
          type: integer
        nextBilledAt:
          type:
            - string
            - 'null'
          format: date-time
    AgentResponseMeta:
      type: object
      required:
        - requestId
      properties:
        requestId:
          type: string
        warnings:
          type: array
          items:
            type: string
        nextCursor:
          type:
            - string
            - 'null'
      additionalProperties: true
    GenericObject:
      type: object
      additionalProperties: true
    AgentError:
      type: object
      required:
        - ok
        - error
        - meta
      properties:
        ok:
          type: boolean
          const: false
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
            details: {}
          additionalProperties: false
        meta:
          type: object
          required:
            - requestId
          properties:
            requestId:
              type: string
          additionalProperties: true
      additionalProperties: false
  responses:
    AgentError:
      description: SiteGPT agent API error response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AgentError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: SiteGPT API token

````