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

# Plan state and billing links

> The workspace's plan (status, trial or paid end, why it lapsed, what it includes), whether the key's creator may change it (the owner only), and the dashboard links where a person manages billing, resumes a lapsed plan, buys credits or changes the plan. Credit balances are at GET /v1/credits. A 402 answer carries the matching link as `resolveUrl`.



## OpenAPI

````yaml https://api.spreadjam.com/openapi.json get /v1/billing
openapi: 3.0.0
info:
  title: SpreadJam API
  version: 1.0.0
servers:
  - url: https://api.spreadjam.com
security: []
tags:
  - name: Meta
    description: Identity and metadata about the authenticated key.
  - name: Keywords
    description: Keyword and topic visibility rankings.
  - name: API keys
    description: Manage the workspace's API keys.
  - name: Analytics
    description: AI-visibility analytics for the workspace.
  - name: Brand
    description: The workspace's brand profile and competitors.
  - name: Prompts
    description: Tracked GEO prompts and their cap state.
  - name: Visibility runs
    description: Run the AI-visibility scan now.
  - name: Credits
    description: The workspace's credit balance and recent charges.
  - name: Actions
    description: Recommended visibility actions and reporting them done.
  - name: Agent connect
    description: >-
      Sign a human up from an agent with one link, then receive an API key once
      they approve. No API key needed.
  - name: Pricing
    description: >-
      The plans an agent can choose for a human and their monthly prices. No API
      key needed.
  - name: Site changes
    description: >-
      Code changes Jam prepares for page edits and technical fixes: preview,
      open the pull request, discard.
  - name: Research
    description: >-
      The research that writes the Plan: its state, its latest report, and
      running it again.
  - name: Answers
    description: >-
      What each AI platform answered to the tracked prompts, with the sources it
      cited.
  - name: Projects
    description: The workspace's projects and the status of each one.
  - name: Billing
    description: The workspace's plan and the links where a person manages billing.
  - name: Webhooks
    description: >-
      HTTP destinations the workspace notifications are POSTed to, signed with a
      per-webhook secret.
  - name: Notifications
    description: >-
      Which notifications reach which channels (including webhooks), per event
      category.
  - name: Opportunities
    description: >-
      Article opportunities: the article pipeline behind the Plan's `new_page`
      actions, and requests to create content from them.
  - name: Planning
    description: Run automatic content planning now.
  - name: Content
    description: Content items, their drafts, and requests to rewrite them.
  - name: Revisions
    description: A content item's revisions.
  - name: Publishing
    description: Publishing content to destinations, now or on a schedule.
  - name: Deliveries
    description: A content item's delivery history.
  - name: Publications
    description: Where a content item is live.
  - name: Destinations
    description: Where content is published, its publishing policy, and its connection.
paths:
  /v1/billing:
    get:
      tags:
        - Billing
      summary: Plan state and billing links
      description: >-
        The workspace's plan (status, trial or paid end, why it lapsed, what it
        includes), whether the key's creator may change it (the owner only), and
        the dashboard links where a person manages billing, resumes a lapsed
        plan, buys credits or changes the plan. Credit balances are at GET
        /v1/credits. A 402 answer carries the matching link as `resolveUrl`.
      operationId: get_billing
      responses:
        '200':
          description: The billing summary.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Billing'
        '400':
          description: >-
            Invalid request: a parameter or body field is wrong. `details` lists
            each problem with what is allowed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: >-
            Missing, malformed or revoked API key (`Authorization: Bearer
            sk_…`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: >-
            The resource, or the project the key or `X-Jam-Project` selects,
            does not exist in this workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '429':
          description: >-
            `rate_limited` (per-key rate) or `too_many_concurrent` (expensive
            reads in flight); retry after `Retry-After` seconds.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      security:
        - bearerAuth: []
components:
  schemas:
    Billing:
      type: object
      properties:
        plan:
          $ref: '#/components/schemas/PlanState'
        canManage:
          type: boolean
          description: >-
            True when the key's creator is the workspace owner. Only the owner
            can change billing, as in the dashboard; anyone else should pass the
            links to the owner.
        links:
          type: object
          properties:
            manageBilling:
              type: string
              description: >-
                Billing settings: plan, payment method and invoices (the Stripe
                portal opens from here).
              example: https://www.spreadjam.com/settings?section=billing
            resumePlan:
              type: string
              description: >-
                Choose a plan again after it ended. The plan dialog opens on
                this page for a lapsed workspace.
            buyCredits:
              type: string
              description: Buy a credit pack or turn on auto top-up.
            changePlan:
              type: string
              description: >-
                Change prompt capacity, platforms or scan cadence (the pricing
                page for a legacy plan).
          required:
            - manageBilling
            - resumePlan
            - buyCredits
            - changePlan
          description: >-
            Pages a person opens, signed in, to act on billing. Hand them to a
            person; they are not API calls.
        nextStep:
          type: string
          description: What to do next, in one sentence.
      required:
        - plan
        - canManage
        - links
        - nextStep
    ApiError:
      type: object
      required:
        - error
        - code
      properties:
        error:
          type: string
          description: What went wrong and how to fix the request.
        code:
          type: string
          description: >-
            Stable machine-readable code, e.g. invalid_request, unauthorized,
            rate_limited.
        requestId:
          type: string
          description: Echoes the X-Request-Id header; quote it to support.
        docs:
          type: string
          description: Where the error is explained.
        resolveUrl:
          type: string
          description: '402/403 plan errors: the dashboard page that resolves it.'
        details:
          type: array
          description: >-
            One entry per problem: path, message, and when known allowed,
            minimum, maximum, expected, received.
          items:
            type: object
            additionalProperties: true
    PlanState:
      type: object
      properties:
        status:
          type: string
          enum:
            - trialing
            - active
            - lapsed
            - other_workspace
            - legacy
          description: >-
            trialing or active: the plan is on and writes work. lapsed: the plan
            ended (see lapseCause); the workspace is read-only and writes answer
            402 until it is resumed (GET /v1/billing has the link).
            other_workspace: the owner's plan is attached to another workspace.
            legacy: an older plan with no prompt-priced offer.
        accessUntil:
          type: string
          nullable: true
          description: >-
            ISO-8601 end of the current paid or trial period; null when not
            active.
        trialEndsAt:
          type: string
          nullable: true
          description: ISO-8601 end of the trial while trialing; null otherwise.
        lapseCause:
          type: string
          nullable: true
          enum:
            - trial_ended
            - plan_ended
            - payment_failed
            - null
          description: Why the plan lapsed, when status is lapsed.
        promptCapacity:
          type: integer
          nullable: true
          description: Tracked prompts the plan allows.
        platforms:
          type: array
          nullable: true
          items:
            type: string
          description: AI platforms the plan scans, e.g. chatgpt, perplexity.
        cadence:
          type: string
          nullable: true
          enum:
            - weekly
            - every_other_day
            - daily
            - null
          description: How often the plan scans.
        workCredits:
          type: integer
          nullable: true
          description: Work credits the plan grants per period.
      required:
        - status
        - accessUntil
        - trialEndsAt
        - lapseCause
        - promptCapacity
        - platforms
        - cadence
        - workCredits
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A workspace API key issued in Settings → Developer, sent as `Bearer
        sk_…`.

````

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