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

# Start an agent connect session

> No API key needed. Returns a link for the human to sign up, onboard and approve, a short `userCode` to show the human beside the link (the approval page shows the same code), and a poll token for the agent. Send `onboarding` (site, name, description, audiences, competitors, prompts, plan) and the human reviews it on one page and approves with one button that starts the trial, instead of walking the onboarding steps; the answer then adds `reviewUrl` and the quoted `plan`. An empty or unprintable `agentName`, a `domain` that is not a hostname, or an `onboarding` field that breaks an onboarding rule is a 400 with `details`. Rate limited per IP.



## OpenAPI

````yaml https://api.spreadjam.com/openapi.json post /v1/agent-connect
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/agent-connect:
    post:
      tags:
        - Agent connect
      summary: Start an agent connect session
      description: >-
        No API key needed. Returns a link for the human to sign up, onboard and
        approve, a short `userCode` to show the human beside the link (the
        approval page shows the same code), and a poll token for the agent. Send
        `onboarding` (site, name, description, audiences, competitors, prompts,
        plan) and the human reviews it on one page and approves with one button
        that starts the trial, instead of walking the onboarding steps; the
        answer then adds `reviewUrl` and the quoted `plan`. An empty or
        unprintable `agentName`, a `domain` that is not a hostname, or an
        `onboarding` field that breaks an onboarding rule is a 400 with
        `details`. Rate limited per IP.
      operationId: start_agent_connect
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentConnectStart'
      responses:
        '201':
          description: The session.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentConnectSession'
      security: []
components:
  schemas:
    AgentConnectStart:
      type: object
      properties:
        domain:
          type: string
          maxLength: 253
          description: >-
            The human's website hostname (for example `acme.com`), prefilled in
            onboarding. A value that is not a hostname is a 400.
          example: acme.com
        email:
          type: string
          maxLength: 254
          format: email
          description: The human's email, if the agent knows it.
        agentName:
          type: string
          description: >-
            Shown to the human on the approval step and used to name the key: 1
            to 60 printable characters. Omit it and the page says "Your agent".
          example: Claude Code
        onboarding:
          $ref: '#/components/schemas/AgentConnectOnboarding'
    AgentConnectSession:
      type: object
      properties:
        connectUrl:
          type: string
          description: >-
            Give this link to the human. It signs them up, onboards and asks
            them to approve.
          example: https://www.spreadjam.com/connect/ABCD234567
        userCode:
          type: string
          description: >-
            Show this code to the human with the link. The approval page shows
            the same code, so they can check the request came from you.
          example: K7M-Q2X
        pollToken:
          type: string
          description: >-
            Secret. Poll GET /v1/agent-connect/{pollToken} with it. Never show
            it to anyone.
        expiresAt:
          type: string
          description: When the session ends if nobody approves it.
        intervalSeconds:
          type: integer
          description: Poll no more often than this.
        reviewUrl:
          type: string
          description: >-
            With `onboarding`: the page where the human reviews your setup, pays
            and approves. The same link as `connectUrl`.
        plan:
          $ref: '#/components/schemas/PlanQuote'
        prompts:
          type: object
          properties:
            count:
              type: integer
            suggestedByJam:
              type: boolean
          required:
            - count
            - suggestedByJam
          description: >-
            With `onboarding`: how many prompts you sent, or that Jam will
            suggest them.
      required:
        - connectUrl
        - userCode
        - pollToken
        - expiresAt
        - intervalSeconds
    AgentConnectOnboarding:
      type: object
      properties:
        site:
          type: string
          maxLength: 253
          description: The founder's website (`acme.com` or a URL). Defaults to `domain`.
          example: acme.com
        brandName:
          type: string
          maxLength: 200
          description: The company name. Send it with `description`.
          example: Acme
        description:
          type: string
          maxLength: 4000
          description: >-
            What the company does, 20 to 2,000 characters. Send it with
            `brandName`.
        audience:
          type: array
          items:
            type: object
            properties:
              title:
                type: string
                maxLength: 200
              blurb:
                type: string
                maxLength: 1000
            required:
              - title
          maxItems: 20
          description: >-
            Who buys: 1 to 5 audiences, each a `title` (up to 60 characters) and
            a one-line `blurb` (up to 160).
        competitors:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
                maxLength: 200
              domain:
                type: string
                nullable: true
                maxLength: 253
              aliases:
                type: array
                items:
                  type: string
                  maxLength: 200
                maxItems: 20
                description: >-
                  Other names AI answers use for it, up to 8 (for example
                  `AthenaHQ` for Athena). A name the domain spells out
                  (athenahq.ai gives AthenaHQ) is matched without one.
            required:
              - name
          maxItems: 50
          description: >-
            Up to 25 competitors, each a `name` (up to 80 characters), an
            optional `domain` and optional `aliases`. Send the domain: answers
            are matched to it, and it gives citation share.
        prompts:
          type: array
          items:
            type: object
            properties:
              text:
                type: string
                maxLength: 1000
                description: 8 to 300 characters.
              topic:
                type: string
                maxLength: 200
                description: >-
                  Up to 70 characters; at most 15 distinct topics. Omitted:
                  "General".
              persona:
                type: string
                enum:
                  - discoverer
                  - buyer
                  - evaluator
                  - competitor
                  - branded
                description: The buyer-journey persona; defaults to discoverer.
              intent:
                type: string
                maxLength: 400
              audience:
                type: string
                maxLength: 200
                description: The `title` of one of `audience` this prompt is written for.
            required:
              - text
          maxItems: 1000
          description: >-
            The prompts to track, at most `plan.promptCapacity`. Jam tracks
            exactly the prompts you send and leaves the other slots empty; fill
            them later with POST /v1/prompts/suggestions. Omit them and Jam
            suggests prompts from the site, description, audiences and
            competitors, the human reviews them, and Jam fills the rest of the
            plan capacity after checkout.
        locale:
          type: string
          enum:
            - us-en
            - uk-en
            - es-es
            - de-de
            - fr-fr
            - br-pt
          description: The market and language prompts are asked in. Defaults to us-en.
        plan:
          type: object
          properties:
            promptCapacity:
              type: integer
            cadence:
              type: string
              enum:
                - weekly
                - every_other_day
                - daily
            platforms:
              type: array
              items:
                type: string
                enum:
                  - chatgpt
                  - gemini
                  - perplexity
                  - google_ai_mode
                  - google_ai_overview
                  - copilot
                  - claude
              minItems: 1
            workCredits:
              type: integer
              description: One of 1000, 2000, 5000, 10000; defaults to 2000.
          required:
            - promptCapacity
            - cadence
            - platforms
          description: >-
            The plan the review page opens on (the human can change it). GET
            /v1/pricing lists the options. Defaults to the plan page default.
      description: >-
        The setup you prepared for the human. With it, the link opens ONE review
        page (site, description, audiences, competitors, prompts, plan and
        price) instead of the onboarding steps; the human approves and starts
        the trial with one button. Validated with the rules onboarding applies;
        each problem is a 400 entry in `details`. If the human already has a
        set-up workspace (an active plan or a finished project), they approve
        for it as it is and this setup is not applied; a workspace left from an
        earlier attempt that was approved but never paid takes this setup.
    PlanQuote:
      type: object
      properties:
        configuration:
          type: object
          properties:
            promptCapacity:
              type: integer
            cadence:
              type: string
              enum:
                - weekly
                - every_other_day
                - daily
            platforms:
              type: array
              items:
                type: string
                enum:
                  - chatgpt
                  - gemini
                  - perplexity
                  - google_ai_mode
                  - google_ai_overview
                  - copilot
                  - claude
            workCredits:
              type: integer
          required:
            - promptCapacity
            - cadence
            - platforms
            - workCredits
        currency:
          type: string
          enum:
            - usd
        monthlyCents:
          type: integer
          example: 39900
        monthlyUsd:
          type: number
          description: The same price in dollars, as the plan page shows it.
      required:
        - configuration
        - currency
        - monthlyCents
        - monthlyUsd
      description: >-
        With `onboarding`: the plan the review page opens on and its monthly
        price, as the plan page prices it.

````

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