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

# API overview

> Authenticate with a workspace API key and call the Jam REST API over HTTPS. Every endpoint is also an MCP tool.

The Jam REST API exposes everything the dashboard does: visibility, answers, prompts, brand, research, the Plan, content, delivery, credits, billing and webhooks. Every endpoint is listed under **Endpoints** in this section, built from the live [OpenAPI spec](https://api.spreadjam.com/openapi.json), so it matches what the API serves. Try requests in the browser in the [API playground](https://www.spreadjam.com/api-playground).

## Base URL and auth

```http theme={}
https://api.spreadjam.com/v1
```

Send your key as a bearer token on every request:

```http theme={}
Authorization: Bearer sk_...
```

Create a key in **Settings**, **Developer**, **Create API key**. It is shown once. Keys look like `sk_` followed by 64 hex characters and reach the workspace's real data; there are no test keys. A key acts with its creator's role, and revoking it takes effect immediately. An agent can also get a key for its human with [agent connect](https://docs.spreadjam.com/onboard-with-your-agent/agent-connect.md).

A missing or invalid key returns `401`. Every error uses one body with a stable `code` and a `requestId`: see [Errors and limits](https://docs.spreadjam.com/api-reference/errors.md).

## Try it

```bash theme={}
export JAM=https://api.spreadjam.com/v1
auth=(-H "Authorization: Bearer $JAM_API_KEY")

curl -sS "${auth[@]}" $JAM/me                  # which workspace this key is for
curl -sS "${auth[@]}" $JAM/analytics/overview  # visibility, mentions, citations
curl -sS "${auth[@]}" "$JAM/prompts?limit=20"  # what is tracked, one page
curl -sS "${auth[@]}" $JAM/actions             # the Plan: what to do next
curl -sS "${auth[@]}" $JAM/credits             # credits left and when they reset
```

Always send `limit` to `/v1/prompts`: without it the response also carries the older `tracked` and `archived` lists next to the first page, which is a few hundred KB on a large project.

## Projects

A project is one website Jam tracks. Project routes act on the newest active project unless you send `X-Jam-Project: <projectId>` (ids from `GET /v1/projects`). Routes for one item by id (`/v1/actions/{actionId}`, `/v1/content/{contentId}`, ...) act on that item wherever it lives in the workspace.

## Lists and pages

Lists that can grow are paged the same way: `limit` (1 to 100) and `cursor` in, `pageInfo` out.

```json theme={}
"pageInfo": { "limit": 100, "hasNextPage": true, "nextCursor": "eyJhIjo...", "totalCount": 326 }
```

When `hasNextPage` is true, send `nextCursor` back as `cursor` with the same filters. `totalCount` counts every match across all pages.

## Writes

* Send `Idempotency-Key` on writes you might retry.
* Work that hands off to Jam answers `202`; read the result back from the resource it names.
* Writes need an active plan. When a plan ends, writes answer `402 plan_inactive`; see [Plans and credits](https://docs.spreadjam.com/billing/plans-and-credits.md).

## Use it from an agent

The [MCP server](https://docs.spreadjam.com/api-reference/mcp.md) at `https://api.spreadjam.com/mcp` turns every endpoint into a tool, with the same auth, limits and errors. See [Onboard with your agent](https://docs.spreadjam.com/onboard-with-your-agent.md).

> [!TIP]
>
> **Python: set a `User-Agent` header.** The API sits behind Cloudflare, which blocks the default `Python-urllib/3.x` user agent with `403` ("error code: 1010"). Send your own, for example `{"User-Agent": "my-agent/1.0"}`.


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