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

# Get a workspace's plan and usage



## OpenAPI

````yaml /openapi.json get /workspaces/{workspaceId}/billing
openapi: 3.1.0
info:
  title: subscriber.dev API
  description: >-
    Trigger workflows, manage subscribers and send broadcasts. Authenticate with
    an API key in the X-API-Key header: the key decides the environment. Docs:
    https://docs.subscriber.dev
  version: '1.0'
  contact: {}
servers:
  - url: https://api.subscriber.dev
    description: Cloud
security: []
tags: []
paths:
  /workspaces/{workspaceId}/billing:
    get:
      tags:
        - Billing
      summary: Get a workspace's plan and usage
      operationId: getBilling
      parameters:
        - name: workspaceId
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingResponse'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limited. Wait a second and retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearer: []
        - api-key:
            - billing:read
components:
  schemas:
    BillingResponse:
      type: object
      properties:
        enabled:
          type: boolean
          description: False when billing is off, e.g. on a self-hosted install.
        plan:
          type: string
          enum:
            - free
            - starter
            - growth
            - scale
            - pro
            - business
          description: The current plan, e.g. "growth".
        interval:
          anyOf:
            - type: string
              enum:
                - month
                - year
            - type: 'null'
        status:
          anyOf:
            - type: string
              description: Stripe subscription status, e.g. "active" or "past_due".
            - type: 'null'
        currentPeriodEnd:
          anyOf:
            - type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
            - type: 'null'
        cancelAtPeriodEnd:
          type: boolean
        usage:
          type: object
          properties:
            subscribers:
              type: number
              description: >-
                Subscribers billed on: opted-in subscribers in production, or
                distinct subscribers emailed this period if that's more.
            subscriberLimit:
              type: number
            sendsThisMonth:
              type: number
              description: Email and webhook steps sent this calendar month (UTC).
            sendLimit:
              anyOf:
                - type: number
                  description: Monthly send limit; null when the plan doesn't limit sends.
                - type: 'null'
          required:
            - subscribers
            - subscriberLimit
            - sendsThisMonth
            - sendLimit
        overLimit:
          type: boolean
        ceiling:
          type: number
          description: >-
            Sends to subscribers past this aren't sent until an upgrade: the
            free plan's limit, or one plan up for paid plans.
        movesUpOn:
          anyOf:
            - type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
              description: >-
                When an over-limit paid workspace moves up one plan (3 days
                after going over); null when not over.
            - type: 'null'
        planAtRenewal:
          anyOf:
            - type: string
              description: >-
                The plan this workspace moves to at its next renewal, from its
                subscriber count; "custom" above the largest plan; null when it
                stays the same.
            - type: 'null'
      required:
        - enabled
        - plan
        - interval
        - status
        - currentPeriodEnd
        - cancelAtPeriodEnd
        - usage
        - overLimit
        - ceiling
        - movesUpOn
        - planAtRenewal
    ErrorResponse:
      type: object
      properties:
        statusCode:
          type: integer
          example: 404
        message:
          type: string
          example: Workflow not found
        error:
          type: string
          example: Not Found
        errors:
          description: Which fields failed validation, on a 400.
          type: array
          items:
            type: object
            properties:
              path:
                type: array
                items:
                  anyOf:
                    - type: string
                    - type: number
              message:
                type: string
              code:
                type: string
            required:
              - path
              - message
      required:
        - statusCode
        - message
  securitySchemes:
    bearer:
      scheme: bearer
      type: http
      description: >-
        A session token from `subscriber login`, used by subscriber.dev's own
        apps. Requests about an environment also need its ID in the
        `x-environment-id` header. From your own code, use an API key.
    api-key:
      type: apiKey
      in: header
      name: X-API-Key
      description: An environment API key. Keep it on your server.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.