> ## 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.

# The brief to write an article from

> Everything an agent needs to write the article: the opportunity, the prompts it answers, the brand voice, the research sources, the article plan, the frontmatter the GitHub destination requires, and the exact `POST /v1/content` body to store the result. COST: the first read researches and plans the article with one metered model call, charges credits for it (usually a few credits; the amount is returned as `creditsCharged`) and takes 30 to 60 seconds, so use a client timeout of at least 90 s. Every later read returns the stored plan in under a second and charges 0. Concurrent first reads are charged once: while one read writes the plan, the others answer 409; read again shortly. 402 when credits cannot cover the plan. Requires a paid plan. To act on the Plan, start from `GET /v1/actions`: an opportunity is the article behind a `new_page` action.



## OpenAPI

````yaml https://api.spreadjam.com/openapi.json get /v1/opportunities/{opportunityId}/brief
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/opportunities/{opportunityId}/brief:
    get:
      tags:
        - Opportunities
      summary: The brief to write an article from
      description: >-
        Everything an agent needs to write the article: the opportunity, the
        prompts it answers, the brand voice, the research sources, the article
        plan, the frontmatter the GitHub destination requires, and the exact
        `POST /v1/content` body to store the result. COST: the first read
        researches and plans the article with one metered model call, charges
        credits for it (usually a few credits; the amount is returned as
        `creditsCharged`) and takes 30 to 60 seconds, so use a client timeout of
        at least 90 s. Every later read returns the stored plan in under a
        second and charges 0. Concurrent first reads are charged once: while one
        read writes the plan, the others answer 409; read again shortly. 402
        when credits cannot cover the plan. Requires a paid plan. To act on the
        Plan, start from `GET /v1/actions`: an opportunity is the article behind
        a `new_page` action.
      operationId: get_opportunity_brief
      parameters:
        - schema:
            type: string
            format: uuid
            example: 0b6f2c1e-6d2a-4c3e-9a1f-5e8d7c4b3a21
          required: true
          name: opportunityId
          in: path
      responses:
        '200':
          description: The brief.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpportunityBrief'
        '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:
    OpportunityBrief:
      type: object
      properties:
        opportunityId:
          type: string
        kind:
          type: string
          enum:
            - create_page
            - update_page
        title:
          type: string
        rationale:
          type: string
        topic:
          type: string
        persona:
          type: string
        intent:
          type: string
        targetPrompts:
          type: array
          items:
            type: string
          description: The questions users ask that this article should answer.
        voice:
          type: object
          properties:
            brand:
              type: object
              nullable: true
              properties:
                name:
                  type: string
                  nullable: true
                positioning:
                  type: string
                  nullable: true
                audience:
                  type: string
                  nullable: true
                productDescription:
                  type: string
                  nullable: true
                tone:
                  type: string
                  nullable: true
                contentStyle:
                  type: string
                  nullable: true
                excludedTopics:
                  type: array
                  items:
                    type: string
              required:
                - name
                - positioning
                - audience
                - productDescription
                - tone
                - contentStyle
                - excludedTopics
            language:
              type: object
              properties:
                code:
                  type: string
                name:
                  type: string
                nativeName:
                  type: string
                country:
                  type: string
                  nullable: true
              required:
                - code
                - name
                - nativeName
                - country
          required:
            - brand
            - language
        research:
          type: object
          nullable: true
          properties:
            evidenceBundleId:
              type: string
            sources:
              type: array
              items:
                type: object
                properties:
                  url:
                    type: string
                    nullable: true
                  facts:
                    type: array
                    items:
                      type: string
                required:
                  - url
                  - facts
          required:
            - evidenceBundleId
            - sources
          description: The sources Jam read and the facts it recorded from each.
        articlePlan:
          $ref: '#/components/schemas/ArticlePlan'
        creditsCharged:
          type: integer
          description: >-
            Credits this read charged. The first read writes the article plan
            with one metered model call and charges for it; every later read
            returns the stored plan and charges 0.
        planUnavailable:
          type: string
          nullable: true
          description: Why no plan could be written, when `articlePlan` is null.
        delivery:
          type: object
          nullable: true
          properties:
            repository:
              type: string
            contentRoot:
              type: string
            fileExtension:
              type: string
            requiredFrontmatter:
              type: array
              items:
                type: string
            publicRoutePattern:
              type: string
          required:
            - repository
            - contentRoot
            - fileExtension
            - requiredFrontmatter
            - publicRoutePattern
          description: >-
            The GitHub destination the article will be delivered to, when the
            project has one configured.
        submit:
          type: object
          properties:
            method:
              type: string
              enum:
                - POST
            path:
              type: string
              enum:
                - /v1/content
            body:
              type: object
              properties:
                opportunityId:
                  type: string
                bundleId:
                  type: string
                  nullable: true
                article:
                  type: object
                  properties:
                    title:
                      type: string
                    metaDescription:
                      type: string
                    slug:
                      type: string
                    keywords:
                      type: array
                      items:
                        type: string
                    bodyMarkdown:
                      type: string
                  required:
                    - title
                    - metaDescription
                    - slug
                    - keywords
                    - bodyMarkdown
              required:
                - opportunityId
                - bundleId
                - article
          required:
            - method
            - path
            - body
          description: >-
            The exact request that stores the finished article; fill the
            `article` fields.
      required:
        - opportunityId
        - kind
        - title
        - rationale
        - topic
        - persona
        - intent
        - targetPrompts
        - voice
        - research
        - articlePlan
        - creditsCharged
        - planUnavailable
        - delivery
        - submit
    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
    ArticlePlan:
      type: object
      nullable: true
      properties:
        title:
          type: string
        intent:
          type: string
        persona:
          type: string
        angle:
          type: string
        evidenceIds:
          type: array
          items:
            type: string
        outline:
          type: array
          items:
            type: object
            properties:
              heading:
                type: string
              intent:
                type: string
              evidenceIds:
                type: array
                items:
                  type: string
            required:
              - heading
              - intent
              - evidenceIds
      required:
        - title
        - intent
        - persona
        - angle
        - evidenceIds
        - outline
  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.