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

# REST API endpoint reference

> Every Attensira REST endpoint — parameters, request bodies, response shapes, and which ones spend credits or delete data.

Every endpoint lives under `https://api.attensira.com/v1`. Every one takes `Authorization: Bearer atn_live_<32 hex>`, and every one also takes an optional `?project=<workspace id>` when the key's organisation has more than one workspace — see [authentication](https://docs.attensira.com/api/authentication.md).

Each endpoint below names the [MCP tool](https://docs.attensira.com/mcp/tools.md) it is the twin of, and answers with the same payload. Every MCP tool has one; the twins that came last are listed under [Proposals, topics, skills and sharing](#proposals-topics-skills-and-sharing) at the end of this page. The [OpenAPI document](https://docs.attensira.com/api/overview.md#openapi) describes every verb route.

A few routes below are the other way round: no MCP tool calls them yet, and they are not on `api.attensira.com` yet. They take the same key at `https://webapp.attensira.com` instead, which answers errors in its [own envelope](https://docs.attensira.com/api/errors.md#errors-from-the-webapp-host), and each says so: `POST /v1/today/{id}/asks/{askId}`, `GET`/`PATCH /v1/notifications`, `GET /v1/outreach-mailboxes/{provider}` and `PATCH /v1/brand-book` ([the Brand Book](#the-brand-book)).

The work agents do on other sites is reached over MCP through `get`, `list` and `act`, and over REST at `https://webapp.attensira.com` (not on `api.attensira.com` yet): [browser runs](#browser-runs), [directory listings](#directory-listings), [consent](https://docs.attensira.com/agent/consent.md#api), the [suppression list](#outreach-suppression-list), [outreach threads](#outreach-threads), [entity sync](https://docs.attensira.com/brand-book/entity-sync.md), [site policies](https://docs.attensira.com/agent/site-policies.md) and [community insights](https://docs.attensira.com/agent/community-answers.md#what-the-threads-tell-us).

`?project=` is always the workspace, never a project. A [project](https://docs.attensira.com/agent/projects.md) is a **work area** on the wire: it is read and steered under `/v1/work-areas`, and a goal or a deliverable that points at one carries its id as `work_area_id`. Creating a project and changing its settings are in the dashboard only.

## Before you start: what costs money and what destroys data

| Endpoint | Effect | Why |
| - | - | - |
| `POST /v1/prompts` | Spends credits | Each new prompt is read across your tracked platforms from the next run onward |
| `POST /v1/automations/{id}/runs` | Spends credits | Triggers an automation immediately instead of waiting for its schedule |
| `POST /v1/ask` | Spends credits | Runs the agent on an agent model |
| `POST /v1/sessions/{id}/context` with `run: true` | Spends credits | Queues the session again to act on the new context |
| `POST /v1/inbox/tasks/{id}/answer` | Spends credits when the run that asked had finished | A finished, failed or suspended run starts a new turn on the answer |
| `POST /v1/work-areas/{id}/steer` | The reply spends credits | Posting is free; the project's crew answers the post with an ordinary agent run |
| `POST /v1/prospect_audits/{id}/convert` | Spends credits | Adds a client workspace whose questions are read from its first run onward |
| `DELETE /v1/prompts/{prompt}` | Destructive | Stops tracking a prompt; its history goes with it |
| `DELETE /v1/competitors/{id}` | Destructive | Stops scoring a rival; past readings keep what they recorded |
| `DELETE /v1/automations/{id}` | Destructive | Removes the automation and its schedule. Past runs are kept as sessions |
| `DELETE /v1/sessions/{id}` | Destructive | Deletes a finished session and its trace |

Nothing else on this page produces a bill or erases history.

## Status codes

A `POST` that creates a durable resource answers `201`. `POST /v1/ask` and `POST /v1/automations/{id}/runs` answer `202`, because what they return is a handle to work in progress rather than a resource at a new URL. Everything else answers `200`. Failures are the [error envelope](https://docs.attensira.com/api/errors.md).

***

## Find and measure

### GET /v1/search

> [!NOTE]
>
> Read-only. No credits. MCP verb: `search`.

One search across questions, pages, Inbox asks, deliverables, automations and threads. Use it to locate something by wording when you do not have its uri.

| Parameter | In | Type | Default | Notes |
| - | - | - | - | - |
| `q` | query | string | — | Required. Matched against question text, page URLs and titles, automation names and instructions, Inbox and deliverable titles, and thread titles and transcripts |
| `types` | query | string\[] | all | Only hits of these [object types](https://docs.attensira.com/mcp/tools.md#uris). Repeat it (`types=question&types=page`) or separate with commas. A name that is not a type is a `400` listing the valid ones |
| `limit` | query | integer | 20 | 1 to 50; a larger number is clamped |
| `cursor` | query | string | — | `next_cursor` from the previous page. Omit for the first page |

```bash Shell theme={null}
curl -G https://api.attensira.com/v1/search \
  --data-urlencode "q=pricing" --data-urlencode "limit=2" \
  -H "Authorization: Bearer atn_live_<your key>"
```

```json Response theme={null}
{
  "hits": [
    {
      "uri": "attensira://ws_3f9a/question/prm_8f21",
      "type": "question",
      "title": "best crm for small teams pricing"
    },
    {
      "uri": "attensira://ws_3f9a/page/aHR0cHM6Ly9hY21lLmNvbS9wcmljaW5n",
      "type": "page",
      "title": "Pricing — Acme",
      "snippet": "https://acme.com/pricing"
    }
  ],
  "next_cursor": "2"
}
```

A hit is `{uri, type, title, snippet}` and nothing else: read the whole object with `get` on its `uri` (`GET /v1/objects?uri=`). `type` is the object type: `question`, `page`, `ask` (an Inbox row), `deliverable`, `automation` or `thread` (a session; a match inside its transcript opens the thread, with the matched words as `snippet`). A deliverable's `snippet` is its deliverable type. A hit whose label starts with the query ranks above one that merely contains it; at equal footing questions come before pages, then asks, deliverables, automations and threads. Answers themselves are not searched — they are read verbatim through [`GET /v1/memory/answers/history` and `GET /v1/memory/answers/slice`](#the-receipts).

> [!NOTE]
>
> **A `snippet` is at most 400 characters**, and the adapters cap every other string on a hit at 400 too. A complete model answer can never come back through search. Read the thread for the full text.

Page on `next_cursor`: it is `null` on the last page. A cursor this endpoint did not hand out is a `400`.

### GET /v1/analytics/\{area}

> [!NOTE]
>
> Read-only. No credits. MCP tool: `get_analytics`.

The main measurement endpoint. One call returns an aggregated, ranked slice of your tracking data for a window.

| Parameter | In | Type | Default | Notes |
| - | - | - | - | - |
| `area` | path | enum | — | Required. See the table below |
| `days` | query | integer | 30 | 1–365 |
| `order` | query | enum | `worst_first` | Or `best_first`. Rows nothing was measured for sort last either way |
| `limit` | query | integer | 20 | Maximum 100 |
| `filter` | query | string | — | Case-insensitive substring on row labels. For `area=platform` it names the platform and is required |

| `area` | One row per | Answers |
| - | - | - |
| `visibility` | tracked platform | Share of voice per platform, with the workspace's own rate alongside — the orienting call |
| `prompt` | tracked prompt | Which prompts you win and lose |
| `page` | page of yours | Which of your pages get cited, as a rate on every answer sampled |
| `source` | external domain | Which domains the models cite in your category, as a share of every citation |
| `competitor` | rival | Workspace-wide share of voice per competitor, with the competitor id |
| `topic` | prompt topic | Per-topic rollup; prompts under no topic are one row with id `no_topic` |
| `platform` | the platform named in `filter` | That platform end to end |
| `bot` | AI system that fetched your site | Reads, pages reached, purpose mix, when it last came |

```bash Shell theme={null}
curl -G https://api.attensira.com/v1/analytics/prompt \
  --data-urlencode "days=30" --data-urlencode "order=worst_first" --data-urlencode "limit=1" \
  -H "Authorization: Bearer atn_live_<your key>"
```

```json Response theme={null}
{
  "area": "prompt",
  "days": 30,
  "order": "worst_first",
  "filter": "",
  "total_rows": 12,
  "truncated": true,
  "visibility": { "value": 0.3, "n": 20 },
  "rows": [
    {
      "id": "prm_8f21",
      "label": "best crm for small teams",
      "topic": "buying intent",
      "country": "US",
      "visibility": { "value": 0.12, "n": 25 },
      "share_of_voice": { "value": 0.12, "n": 25 },
      "citation": { "value": 0.04, "n": 25 },
      "position": null,
      "delta": { "value": -0.05, "real": true },
      "platforms": {
        "chatgpt":    { "tracked": true, "readable": true,  "rate": { "value": 0.2, "n": 15 },
                        "delta": { "value": -0.03, "real": false } },
        "perplexity": { "tracked": true, "readable": false, "rate": { "value": null, "n": 0 } }
      },
      "answers_read": 25,
      "failures": 1
    }
  ]
}
```

`total_rows` is how many rows survived the filter and `truncated` whether `limit` cut them, so a short list can be told from a cut one. A tracked platform with no readings in the window appears as `tracked: true, readable: false` with a null rate — present, and not zero.

`area=bot` rows carry `visits`, `pages`, `purpose_mix`, `last_seen` (`null` when it never came) and `agents` instead of the rate fields. A model can only cite a page it has fetched, so check `bot` before concluding a page underperforms on content — but a row here counts only what our middleware recorded, so absence is no proof nothing came.

> [!NOTE]
>
> `competitor` and `source` are workspace-wide aggregates. For the rivals and cited sources of **one** prompt, `GET /v1/prompts/{prompt}` already returns both — no second call needed.

### GET /v1/prompts/\{prompt}

> [!NOTE]
>
> Read-only. No credits. MCP tool: `get_prompt`.

Everything recorded for one prompt: its topic and country, its per-platform rates and delta, the competitors seen in its answers, and the sources those answers cited.

| Parameter | In | Type | Default | Notes |
| - | - | - | - | - |
| `prompt` | path | string | — | Required. A prompt id, **or** the prompt's exact text, percent-encoded |
| `days` | query | integer | 30 | 1–365 |

```bash Shell theme={null}
curl https://api.attensira.com/v1/prompts/prm_8f21?days=30 \
  -H "Authorization: Bearer atn_live_<your key>"
```

```json Response theme={null}
{
  "id": "prm_8f21",
  "text": "best crm for small teams",
  "topic": "buying intent",
  "country": "US",
  "visibility": { "value": 0.12, "n": 25 },
  "citation": { "value": 0.04, "n": 25 },
  "delta": { "value": -0.05, "real": true },
  "position": 2,
  "answers_read": 25,
  "failures": 1,
  "platforms": {
    "chatgpt": { "tracked": true, "readable": true, "rate": { "value": 0.2, "n": 15 }, "citation": { "value": 0.07, "n": 15 } }
  },
  "competitors": [{ "name": "rival.com", "count": 15, "rate": { "value": 0.6, "n": 25 } }],
  "sources": [{ "url": "g2.com", "domain": "g2.com", "count": 11, "rate": { "value": 0.44, "n": 25 } }],
  "why": ["Named in 3 of 25 answers; rival.com was named in 15."]
}
```

`topic` is `null` when the prompt is not filed under one and `country` is `null` for the workspace default. Competitor and source rates are on this prompt's own `answers_read`.

Passing exact text saves a search round-trip when you already know the wording; inexact text will not match. Percent-encode it — a prompt containing `/` or `?` will otherwise change the route.

### GET /v1/pages

> [!NOTE]
>
> Read-only. No credits. MCP tool: `get_page`.

Everything recorded for one URL on your site: its citation rate overall and per platform, its delta, and the prompts whose answers cited it.

| Parameter | In | Type | Default | Notes |
| - | - | - | - | - |
| `url` | query | string | — | Required. Absolute URL, exactly as it appears on the site |
| `days` | query | integer | 30 | 1–365 |

```bash Shell theme={null}
curl -G https://api.attensira.com/v1/pages \
  --data-urlencode "url=https://acme.com/pricing" \
  -H "Authorization: Bearer atn_live_<your key>"
```

```json Response theme={null}
{
  "url": "https://acme.com/pricing",
  "title": "Pricing — Acme",
  "citations": 5,
  "total_answers": 120,
  "citation": { "value": 0.04, "n": 120 },
  "delta": { "value": null, "real": false },
  "platforms": {
    "perplexity": { "tracked": true, "readable": true, "rate": { "value": 0.08, "n": 60 }, "citations": 5 },
    "chatgpt":    { "tracked": true, "readable": true, "rate": { "value": 0, "n": 60 }, "citations": 0 }
  },
  "prompts": [{ "id": "prm_8f21", "text": "best crm for small teams", "citations": 2, "rate": { "value": 0.08, "n": 25 } }],
  "in_sitemap": true
}
```

The `delta` is always `{value: null, real: false}` here: the page fold has no earlier window to compare against, and the contract's word for that is "no basis", not a number.

If this comes back empty, check `GET /v1/analytics/bot` before rewriting the page — a model cannot cite a page it has never fetched.

### POST /v1/evidence/query

> [!NOTE]
>
> Read-only. No credits. MCP tool: `query_evidence`.

Your own data question as a table: one metric, grouped by up to two dimensions, filtered, over a window. It reads the same stored days and folds them the same way as the dashboard boards, so the numbers match what the dashboard shows for the same window.

The body is a JSON object with the same fields, values and limits as the MCP tool: `metric` (required), `group_by`, `days` or `from` and `to`, the filters `topic_ids`, `prompt_ids`, `engines`, `surface`, `country`, `markets`, `property_ids`, `competitor`, `intent`, `stage`, `state`, `domain` and `text_contains`, and `limit`. The [`query_evidence` reference](https://docs.attensira.com/mcp/tools#query_evidence) lists every metric with what it can be grouped and filtered by. A field the query does not know is refused rather than ignored, so a misspelt filter cannot come back as unfiltered numbers.

```bash Shell theme={null}
curl https://api.attensira.com/v1/evidence/query \
  -H "Authorization: Bearer atn_live_<your key>" \
  -H "Content-Type: application/json" \
  -d '{"metric": "gsc_clicks", "group_by": ["page"], "days": 28, "limit": 2}'
```

```json Response theme={null}
{
  "metric": "gsc_clicks",
  "group_by": ["page"],
  "window": { "from": "2026-09-05", "to": "2026-10-02", "days": 28 },
  "day_basis": "search_console",
  "unit": "count",
  "rows": [
    { "key": { "page": "acme.com/pricing" }, "value": 412, "n": 9310 },
    { "key": { "page": "acme.com/blog/crm-guide" }, "value": 0, "n": 220 }
  ],
  "gaps": [{ "key": "2026-09-30..2026-10-02", "reason": "not_recorded", "detail": "Search Console has not reported these days yet" }],
  "truncated": true
}
```

`value` is in `unit`, and `null` means unmeasured, never 0: the row's gap says why. `n` is on every row; for Search Console it is the impressions behind the row. `gaps` names everything the answer could not measure, and an empty list is the claim that nothing is missing. `day_basis` says which calendar the day labels count in (`slot_day`, `search_console` or `utc`; see [Google search](https://docs.attensira.com/measure/google-search.md#day-basis)).

A question with no honest answer — an unknown metric, a metric grouped or filtered in a way it does not support, a `from`–`to` span over 365 days, an id the workspace does not have — is a `400` with `type: "invalid_request"` and a `message` that names the problem and what to ask instead. A question too broad to answer in time is a `422` whose `message` says what to narrow. `days` and `limit` outside their ranges are clamped to the nearest bound rather than refused.

### GET /v1/deciding-sources

> [!NOTE]
>
> Read-only. No credits. MCP tool: `deciding_sources`.

Which pages and domains decided the AI answers, whether you already appear on each, and the next move for each. `GET /v1/analytics/source` ranks by citations; this ranks by influence over a decision. See [Deciding sources](https://docs.attensira.com/measure/deciding-sources.md).

| Parameter | In | Type | Default | Notes |
| - | - | - | - | - |
| `prompt` | query | string | — | Optional. One tracked prompt, by id or exact text. Omit for every prompt |
| `days` | query | integer | 30 | 1–365 |

Returns `groups`, most influential first, one per prompt, platform and surface. Each carries a `label`, `n`, `present`, a `recommendation`, and `sources` ranked by weight, each with `domain`, `url`, `citations`, `share`, `present` and `action`. The full row is described under [`deciding_sources`](https://docs.attensira.com/mcp/tools#deciding_sources).

### GET /v1/win-plan

> [!NOTE]
>
> Read-only. No credits. MCP tool: `win_plan`.

The ordered plan for winning one tracked prompt. See [Win this answer](https://docs.attensira.com/measure/win-this-answer.md).

| Parameter | In | Type | Default | Notes |
| - | - | - | - | - |
| `prompt` | query | string | — | Required. Prompt id or exact text |
| `days` | query | integer | 30 | 1–365 |

Returns `prompt`, `n`, `evidence`, the `steps` in order, `rereads_at` and `credits_estimate`, as described under [`win_plan`](https://docs.attensira.com/mcp/tools#win_plan).

***

## The receipts

The numbers above are folds over stored answers. These endpoints hand back the rows themselves, verbatim. See [Deep reads](https://docs.attensira.com/agent/deep-read.md).

### GET /v1/memory/answers/history

> [!NOTE]
>
> Read-only. No credits. MCP tool: `answer_history`.

Every sampled answer to one tracked prompt, verbatim and newest first, with citations and reading ids.

| Parameter | In | Type | Default | Notes |
| - | - | - | - | - |
| `prompt` | query | string | — | Required. The prompt id |
| `platform` | query | string | — | One platform; omit for all |
| `days` | query | integer | 28 | 1–365 |
| `limit` | query | integer | 10 | Readings per page, 1–50 |
| `cursor` | query | string | — | `next_cursor` from the previous page |

Returns `answers`, `readings`, `has_more` and `next_cursor`. An answer over 8 KB is cut and carries `truncated: true`, with `text_bytes` the full length. A failed sample is listed with `failed: true`, never dropped. The row shape is described under [`answer_history`](https://docs.attensira.com/mcp/tools#answer_history).

### GET /v1/memory/answers/slice

> [!NOTE]
>
> Read-only. No credits. MCP tool: `answer_slice`.

Every answer matching a predicate, verbatim. Terms AND together and select the sample; at least one is required.

| Parameter | In | Type | Default | Notes |
| - | - | - | - | - |
| `platform` | query | string | — | Repeat for several |
| `country` | query | string | — | ISO 3166-1 alpha-2 |
| `topic_id` | query | string | — | The prompts filed under this topic now |
| `prompt_ids` | query | string | — | Repeat, or comma-separate, for several; at most 100 |
| `surface` | query | enum | — | `consumer` or `api` |
| `model` | query | string | — | The start of the model's name, case-insensitive |
| `competitor` | query | string | — | A rival's domain the answer named or linked |
| `cited_domain` | query | string | — | A domain among the citations; subdomains match |
| `brand_named` | query | boolean | — | `true` or `false` |
| `sentiment` | query | enum | — | `positive`, `neutral`, `negative`, `none` (scored, no stance) or `unscored` (never scored) |
| `brand_position_min`, `brand_position_max` | query | integer | — | Your brand's place in the answer's order of brands, 1 for first, inclusive |
| `text_contains` | query | string | — | A phrase in the answer's text, literal and case-insensitive, at most 80 characters |
| `from`, `to` | query | string | — | `YYYY-MM-DD`, inclusive |
| `days` | query | integer | 28 | 1–365, when `from` and `to` are omitted |
| `limit`, `cursor` | query | | | As for answer history |

```bash Shell theme={null}
curl -G https://api.attensira.com/v1/memory/answers/slice \
  --data-urlencode "topic_id=top_41a2" --data-urlencode "sentiment=negative" \
  --data-urlencode "brand_position_min=3" --data-urlencode "days=60" \
  -H "Authorization: Bearer atn_live_<your key>"
```

The answer terms (`surface`, `model`, `competitor`, `cited_domain`, `brand_named`, `sentiment`, the brand positions and `text_contains`) must all hold for one sample, and only matching samples come back. Without `topic_id` or `prompt_ids`, `text_contains` covers at most 30 days; a wider window is a `400` saying what to narrow. The full semantics are in the [`answer_slice` reference](https://docs.attensira.com/mcp/tools#answer_slice).

### GET /v1/memory/citations/timeline

> [!NOTE]
>
> Read-only. No credits. MCP tool: `citation_timeline`.

One domain's or one page's citations per day, per platform.

| Parameter | In | Type | Default | Notes |
| - | - | - | - | - |
| `domain` | query | string | — | A site, e.g. `g2.com`. Or pass `url` for one page |
| `url` | query | string | — | One page's URL, instead of `domain` |
| `days` | query | integer | 28 | 1–365 |

Returns `domain`, `url`, `total`, `prompts` and `series`, one entry per platform, each with `points` for every day of the window: `day`, `citations`, `mean_position` (`null` when nothing that day carried a position) and `prompts`. A zero day is a real zero.

### GET /v1/memory/pages/history

> [!NOTE]
>
> Read-only. No credits. MCP tool: `page_history`.

One page's versions: every version captured, when, and what changed between them. It covers your own pages and the cited and competitor pages the workspace watches.

| Parameter | In | Type | Default | Notes |
| - | - | - | - | - |
| `url` | query | string | — | Required. Absolute: one of your own pages, or a cited or competitor page the workspace watches |

Metadata on a version taken before it was recorded reads `not_captured`, and is never reported as a change. Any other page on another domain is a `404`.

Returns `url`, `known`, and `versions` oldest first, each with what changed since the one before. The row shape is described under [`page_history`](https://docs.attensira.com/mcp/tools#page_history).

***

## Changes

> [!NOTE]
>
> Read-only. No credits. Served when your balance is spent. Needs `read`. Not yet on `api.attensira.com`: send these paths to `https://webapp.attensira.com` with the same key. Over MCP: `list` with type `change`, and `get` on `attensira://{workspace}/change/{id}`.

A change is one piece of work an agent filed: a page fix, a rewrite, an article, a listing, a post. Each is shown at its stage, in these words: `planned`, `drafted`, `shipping`, `live`, `checked`, or one of the four ends `stopped` (you used the veto), `reverted` (undone), `failed` (publishing gave up) and `declined`. `checked` means a check wrote a verdict, any verdict; what the verdict is lives on the change's [receipt](#receipts-of-changes).

To act on a change: undo is `POST /v1/changes/{id}/actions` with `{"action": "undo"}`, and ending the 48-hour veto window early is the same route with `{"action": "ship_now"}` (held to the approval rules: a key needs an `approve` scope covering the change's lane and effect class; a change stopped, declined or never scheduled is a `409` `state_conflict`); approve, decline and stop inside the veto window are [`act`](#post-/v1/actions). Its draft section by section is `GET /v1/changes/{id}/diff`. See [Changes](https://docs.attensira.com/agent/changes.md) for the lifecycle, the Weekly Ship and undo.

### GET /v1/changes

This workspace's changes, newest first.

| Parameter | In | Type | Notes |
| - | - | - | - |
| `lifecycle` | query | string | One stage from the list above. Anything else is a `400`. A change whose stage moved a moment ago may be left out of that page rather than shown under a stage it has left, so a filtered page can hold fewer rows than `limit` while `next_cursor` is set |
| `lane` | query | string | `own_site`, `offsite`, `outreach` or `social` |
| `kind` | query | string | `fix`, `rewrite`, `document`, `social_post`, `bundle` (the Weekly Ship), `brand_book_edit` (an edit to your [Brand Book](https://docs.attensira.com/brand-book/overview.md), which only a signed-in person approves or declines) or `review_request` (a [review-invite kit](https://docs.attensira.com/offsite/listings.md#asking-for-reviews) you send yourself). A company profile edit reads as `brand_book_edit`, not `document`, so `kind=document` no longer includes one. A change filed before kinds existed reads as `fix` |
| `bundle` | query | string | A Weekly Ship's change id: only the changes in that set |
| `live_status` | query | string | `live` or `no_longer_live`: the [weekly check](https://docs.attensira.com/measure/keeping-changes-live.md) of the shipped text on its page. Anything else is a `400` |
| `limit` | query | number | 1 to 100, default 50. A larger number is clamped |
| `cursor` | query | string | The `next_cursor` of the page before, unchanged |
| `project` | query | string | The workspace, on an org-wide key |

```json Response theme={null}
{
  "changes": [
    {
      "id": "6650…",
      "uri": "attensira://prj_123/change/6650…",
      "title": "Retitle the pricing page",
      "kind": "fix",
      "lane": "own_site",
      "lifecycle": "shipping",
      "effect_class": "reversible",
      "change_class": "safe",
      "target": "github",
      "resource": "docs/pricing.mdx",
      "level_at_time": "L3",
      "ran_at_level": null,
      "held_reason": null,
      "checks": {
        "quotable": null,
        "technical": null
      },
      "auto_approved": true,
      "ships_at": "2026-10-24T09:00:00Z",
      "url": null,
      "prompt_ids": ["prm_1"],
      "playbook_id": "write.title-and-meta",
      "skill_version": "1.1.0",
      "model_id": "provider/model",
      "undo": { "state": "not_reversible", "sentence": "Nothing has shipped that we can take back.", "step": null, "until": null, "url": null },
      "live_status": null,
      "last_live_check_at": null,
      "repair_attempts": [],
      "created_at": "2026-10-22T09:00:00Z",
      "updated_at": "2026-10-22T09:00:00Z",
      "links": {
        "actions": "/v1/changes/6650…/actions",
        "diff": "/v1/changes/6650…/diff",
        "receipt": null
      }
    }
  ],
  "next_cursor": null
}
```

| Field | Type | Notes |
| - | - | - |
| `level_at_time` | string or null | The lane's level when the change was filed. `null` on changes filed before levels existed |
| `ran_at_level`, `held_reason` | string or null | Set when something held the change below its lane's level, and why |
| `checks.quotable` | object or null | The [quotability bar](https://docs.attensira.com/agent/approval.md#a-page-rewrite-with-little-to-quote-waits-for-your-yes): `{score, threshold, held}`. `null` when it was not read |
| `checks.technical` | object or null | The [pre-ship check](https://docs.attensira.com/agent/approval.md#the-pre-ship-check): `{status, items, checked_at}`. `status` is `passed`, `failed` or `unchecked`, and each item is `{check, result, reason}`. Read-only. `null` until the change was about to ship without a person |
| `checks.claims` | object or null | [Which language the draft's claims were read in](https://docs.attensira.com/agent/approval.md#drafts-not-in-english): `{language, coverage, reason}`. `language` is a language code such as `en` or `de`, or `und` when it could not be told. `coverage` is `checked` or `unchecked`; any draft not in English is `unchecked`, with a `reason` such as `claims not checkable in German`, and runs at L3 at most. `reason` is `null` when checked. `null` until the draft was checked for claims |
| `auto_approved` | boolean | `true` when the yes was your lane's level, not a person's |
| `ships_at` | string or null | While the change is `shipping` inside its 48-hour veto window: when it ships unless you stop it. `null` otherwise |
| `playbook_id` | string or null | What wrote the change: the playbook the agent followed, by the same name `GET /v1/playbooks` lists it under (for example `write.title-and-meta`), `manual` when a person or your own assistant wrote it (including a change you edited before approving it: the words that ship are yours), or `system.…` for a check that files changes on its own (for example `system.claim-check`). [Entity sync](https://docs.attensira.com/brand-book/entity-sync.md)'s Changes carry `offpage.entity-sync` and structured-data Changes carry `technical.structured-data`: built-in playbooks like any other, listed by `GET /v1/playbooks`. Set by us when the change is filed; nothing you send can change it. `null` on changes filed before we recorded it, and when an agent followed no playbook |
| `skill_version` | string or null | The playbook's version when the change was written. `null` when no playbook was followed |
| `model_id` | string or null | The model that wrote the change, as the model provider reported it. `null` on a person's change, and when the provider did not say |
| `url` | string or null | Where the shipped change can be opened: the pull request, the CMS item, the page. `null` before anything was written |
| `undo` | object | Whether it can be undone and until when: `state`, the `sentence` a person reads, the manual `step` when there is no way back, `until` and `url` |
| `links.receipt` | string or null | The change's receipt once it went out (`live`, `checked` or `reverted`); `null` before |
| `live_status` | string or null | The [weekly check](https://docs.attensira.com/measure/keeping-changes-live.md) of a shipped change whose verdict is moved or that a win sits after: `live` when its shipped text was on the page, `no_longer_live` when the page answered without it. `null` before the first weekly read. A page we could not read never changes it |
| `last_live_check_at` | string or null | When that read answered. `null` before the first one |
| `repair_attempts` | array | What Attensira tried before the change shipped ([when a change cannot go out as it is](https://docs.attensira.com/agent/approval.md#when-a-change-cannot-go-out-as-it-is)), oldest first. Each has `id`, `at`, `trigger` (`already_answered`, `target_moved`, `dirty_pull_request`, `red_checks`, `destination_unavailable`, `auth_refused` or `destination_rejected`), `action` (`withdrawn`, `redrafted`, `regenerated`, `retried`, `reconnect` or `blocked`), the `reason` a person reads, `check` (the failing check's name, or `null`) and `pull_request` (its number, or `null`). Empty when nothing needed repair |

The draft itself (the text before and after) is not in the list; read it with `GET /v1/changes/{id}/diff`.

### GET /v1/changes/{id}

One change, the same fields as a list row. `404` (`not_found`) when the id is not a change in this workspace, including one in another workspace.

A change written for one market from another carries `translation`: `from` (the original change's id), `language` and `fact_ids`. See [Translated changes](https://docs.attensira.com/tracking/markets.md#translated-changes).

### POST /v1/changes/{id}/translate

Files a translation of change `{id}` for one market the workspace reads. Needs a key with the `steer` scope.

```json theme={null}
{
  "country": "DE",
  "language": "de",
  "text": "Ledgerline kostet 12 € pro Nutzer.",
  "target": { "plugin_id": "github", "resource_id": "de/pages/pricing.md" },
  "current_value": "Ledgerline kostet 10 € pro Nutzer."
}
```

`target` is the market's page, and `current_value` is what that page says there now, for an update. The answer is `201` with the filed change, in the same shape as `GET /v1/changes/{id}`, with its `translation`. Filing the same text again for the same market returns the same change. The translation waits for a person or for its lane's level like any other change.

| Status | When |
| - | - |
| `400` `invalid_argument` | The workspace does not read that market, the language is not a [market language](https://docs.attensira.com/tracking/markets.md#asking-in-a-language), the text or target is missing, the original has no check yet or a claim it could not trace, it states a claim true only in its own market, or the market's currency or legal entity it needs is not set yet |
| `404` `not_found` | The id is not a change in this workspace |

### Change events

Subscribe to these with [webhooks](https://docs.attensira.com/api/webhooks.md) to follow a change without polling:

| Event | Sent when |
| - | - |
| `change.shipping` | A change is on its way: you approved it, or your lane's level scheduled it to ship after its 48-hour veto window. `data.ships_at` says when. Once per change |
| `change.live` | A change went live: its pull request merged, an integration published it, or you marked it shipped. Sent beside `change.shipped`. Once per change |
| `change.reverted` | A shipped change was undone at your request. Once per change |
| `change.no_longer_live` | The weekly check read a shipped change's page and the shipped text was not on it. A re-ship is filed for your approval. Once per change per week it is found missing |
| `change.repaired` | A change that could not go out as it was was put back on its way: written again on top of a page that moved, or written again once after your site refused it, its pull request conflicted or a check failed. Once per repair attempt |
| `change.withdrawn` | A change was withdrawn before it shipped because every question it was for is already green. Once per change |
| `autonomy.raise_proposed` | A proposal to let agents do more in one lane was filed for a person: a streak of clean changes, or an agent or key asking. `data.confirm_url` is where a signed-in person confirms it. Once per proposal |

Each change event carries `change_id`, `project_id`, `kind`, `plugin`, `lane` and `uri`, and never an action to take.

***

## Receipts of changes

> [!NOTE]
>
> Read-only. No credits. Served when your balance is spent. Needs `read`. Over MCP: `get`/`list` on the `receipt` object type. See [Receipts](https://docs.attensira.com/measure/receipts.md).

### GET /v1/receipts

Every shipped change's receipt, newest first, without the answer excerpts. `limit` (at most 100; a larger number is clamped, a non-number is a `400`).

```json theme={null}
{
  "project_id": "665f…",
  "receipts": [
    {
      "id": "6650…",
      "title": "Rewrite the pricing page description",
      "lifecycle": "live",
      "where": "https://example.com/pricing",
      "shipped_at": "2026-09-01T09:00:00Z",
      "verdict": "pending",
      "verdict_label": "Checking",
      "verdict_reason": "Next check on 12 September 2026.",
      "decided_at_offset": 0,
      "next_check_at": "2026-09-12T09:00:00Z",
      "checks": [ … ]
    }
  ]
}
```

### GET /v1/receipts/{id}

One change's receipt by its change id. Fields, in order:

| Field | Type | Notes |
| - | - | - |
| `title`, `lifecycle`, `where`, `shipped_at` | | The change, its stage, the page it lives on, when it took effect (`null` until live) |
| `questions` | array | `{prompt_id, text, tracked}`; `text` is empty for a question no longer tracked |
| `engines` | array | Engines the checks read |
| `before` | object or null | A verbatim answer excerpt from before the change: `{prompt_id, engine, text, truncated, mentioned, answered_at}`. `null` when none could be read |
| `what_changed` | object | `{summary, field, before, after, truncated, pull_request_url}` |
| `checks` | array | One per offset: `{offset_days, check_at, status, verdict, label, reason, early, before, after}`. `check_at` is the day a verdict can exist. `status` is `not_booked`, `booked`, `checking`, `done`, `not_live`, `cancelled` or `unmeasurable`. `before`/`after` are `{value, n}` |
| `verdict` | string or null | `pending`, `moved`, `no_change`, `inside_noise`, `insufficient`, `not_live` or `dropped`. `null` only when no verdict can exist (checks called off, no tracked question) |
| `verdict_label`, `verdict_reason` | string | The chip text and the sentence behind it, with the counts |
| `decided_at_offset` | number | The check the verdict came from; `0` when none has |
| `next_check_at` | string or null | The next booked check's `check_at` |
| `after` | object or null | An excerpt from the week the deciding check measured, once one has |
| `engine_shift` | object or null | Set when the deciding check compared days inside an [engine-wide change](https://docs.attensira.com/measure/receipts.md#engine-wide-changes): `{engines, from, to, sentence}`, with `from`/`to` as UTC days. `verdict_reason` then leads with `sentence`; `verdict` is unchanged. `null` otherwise. Also on every row of `GET /v1/receipts` |

A difference inside the sampling noise is `inside_noise`, never `moved`. `404` when the id is not a change in this workspace.

## Attempts

> [!NOTE]
>
> Read-only. No credits. Served when your balance is spent. Not yet on `api.attensira.com` and not yet read by a listed MCP tool: MCP reaches it through `list(type=attempt)` and `get` once those verbs are listed to clients. See [What the win plan remembers](https://docs.attensira.com/measure/tried-before.md).

### GET /v1/attempts

Every piece of work filed for a tracked prompt in the last 180 days, one row per change and prompt, newest first. Filters: `prompt_id`, `tactic` (`fix_page`, `write_asset`, `get_listed`, `answer_thread` or `pitch`; anything else is a `400` listing the valid ones) and `target` (a domain or a page; a domain covers its pages).

```json theme={null}
{
  "project_id": "665f…",
  "attempts": [
    {
      "id": "change_6650…:k1",
      "uri": "attensira://665f…/attempt/change_6650…:k1",
      "prompt_id": "k1",
      "tactic": "fix_page",
      "target": "example.com/pricing",
      "tactic_recorded": true,
      "change_id": "change_6650…",
      "shipped_at": "2026-09-01T09:00:00Z",
      "stage": "checked",
      "verdict": "no_change",
      "final_verdict": "no_change",
      "decided_at_offset": 30,
      "final_at": "2026-10-05T09:00:00Z",
      "next_check_at": null,
      "blocked_until": "2026-12-04T09:00:00Z",
      "created_at": "2026-08-29T06:02:11Z"
    }
  ]
}
```

`final_verdict` is the +30-day check's alone. The same rows are `attempts` on `GET /v1/prompts/{prompt}/detail` (`null` when they could not be read) and on every step of [`GET /v1/win-plan`](#get-/v1/win-plan), beside `decision`, `skip_reason`, `reship_change_id` and `escalated_from`.

## Shared links

> [!NOTE]
>
> Public: no key. The token is the credential. Not an MCP tool, and not on `api.attensira.com`: these are served by `https://webapp.attensira.com`, which answers errors in its [own envelope](https://docs.attensira.com/api/errors.md#errors-from-the-webapp-host).

A shared board, client report, rewrite and the client reviewer page are one link format, `app.attensira.com/r/<token>` (the reviewer link also opens the [client portal](https://docs.attensira.com/agencies/client-reviewer-link.md#the-client-portal) at `/portal/<token>`), signed with the workspace's share secret, and one read. (A receipt keeps its own [`GET /v1/receipt/{token}`](https://docs.attensira.com/account/receipt#sharing-a-receipt-without-an-account), and a win card its `/w/<slug>`.) **Rotate** on the [receipt](https://docs.attensira.com/account/receipt.md#sharing-a-receipt-without-an-account) stops every one of them at once. Some kinds can also be taken back alone: a board's **Turn off link**, the reviewer link's **Turn off** and **New link**. Report and board links last 180 days, rewrite links 30, the reviewer link 90.

Every response is sent `X-Robots-Tag: noindex, nofollow, noarchive`, and two allowances apply: one per client address across every share link (a burst of 60, then two requests a second), checked before the link is looked up, and one per link (a burst of 30, then one a second). Past either, it answers `429` with `type: "rate_limited"`, `Retry-After` and `details.retry_after` in the same whole seconds; while the shared limiter is reachable, every answer also carries `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset`.

### GET /v1/share/\{token}

What the link opens: `kind` and exactly one payload named after it.

| `kind` | Payload | Notes |
| - | - | - |
| `board` | `board` | The board's name and each pin's title, view and answer. See [Boards](https://docs.attensira.com/measure/boards.md#what-the-reader-sees) |
| `report` | `report` | `{id, cadence, format, period, title, facts, narrative, markdown, created_at, branding}`. See [Client reports](https://docs.attensira.com/agencies/client-reports.md#sharing) |
| `rewrite` | `rewrite` | `{project, page_url, before, after, reason, evidence?, prompts?, class?, classifier_reason?, proposed_at, branding}` |
| `review` | `review` | `{workspace: {name, domain}, shared_by, expires_at, items}`. Each item is `{id, title, description?, reasons, source_urls, waiting_since, state, approvable, held?, change?}`, and `change` carries `class`. See [Client reviewer link](https://docs.attensira.com/agencies/client-reviewer-link.md) |

```json theme={null}
{
  "kind": "rewrite",
  "rewrite": {
    "project": "Acme",
    "page_url": "https://acme.com/pricing",
    "before": "…",
    "after": "…",
    "reason": "The page never says what it is.",
    "proposed_at": "2026-10-20T09:00:00Z",
    "branding": { "name": "Northwind Agency", "white_label": true }
  }
}
```

Two more top-level fields serve the page's **See how AI answers about you** link:

| Field | Type | Notes |
| - | - | - |
| `referral_code` | string | The sharing organisation's [give-a-month code](https://docs.attensira.com/account/referrals.md#on-the-pages-you-share), when it is eligible (it has a win) and not white-labelled. Absent otherwise. The code is the only thing about the sharer it adds: no id and no domain |
| `white_label` | boolean | `true` when the sharer is [white-labelled](https://docs.attensira.com/agencies/branding.md). Absent otherwise |

A link that is not ours, was copied only in part, has expired, or whose workspace rotated its links answers `401`. A link whose signature does not check out answers with the same words whether or not the workspace it names exists. A board link that was turned off, or whose board was deleted, answers `404`.

### POST /v1/share/\{token}/items/\{itemId}/approve

Approves one suggested change the [client reviewer](https://docs.attensira.com/agencies/client-reviewer-link.md) page shows. Only a reviewer link can; any other link is a `401`, and an item the page does not show is a `404`. The link approves at most `approve:own_site:safe`: an item with `approvable: false` answers `403` with `code: "scope_denied"` and `details.reason: "client_link_scope"`. Refused when the org's credits are used up. Answers the item: `{id, title, description?, reasons, source_urls, waiting_since, state, approvable, held?, change?}`. The approval is recorded as `client:<workspace name>`.

### POST /v1/share/\{token}/items/\{itemId}/decline

Declines it, with `{"reason": "wrong" | "not_now" | "already_done" | "never_touch"}`. The same rules, except that a spent balance never blocks a decline and the scope does not apply: the client can decline anything the page shows.

### GET /v1/share/\{token}/portal

The [client portal](https://docs.attensira.com/agencies/client-reviewer-link.md#the-client-portal) behind a reviewer link. Only a reviewer link opens it; any other link, and a reviewer link that expired, was replaced or was turned off, is a `401`.

| Field | Type | Notes |
| - | - | - |
| `review` | object | The same `review` payload as `GET /v1/share/{token}` |
| `scorecard` | object or `null` | The newest stored weekly scorecard: `{brand, week, label, sections, omitted}`, without next week's plan. `null` before the first one |
| `receipts` | array | `{week, label, lines}` for each of the last four weeks whose scorecard verified a receipt, newest first |
| `scorecard_unavailable` | boolean | `true` when the scorecards could not be read just now, in which case `scorecard` is `null` and `receipts` is empty. Absent otherwise |
| `branding` | object | `{name?, logo_url?, color?, white_label}` |
| `white_label` | boolean | `true` when the agency is white-labelled. Absent otherwise |

### POST /v1/share/\{token}/request-link

A client whose reviewer link no longer opens asks the agency for a new one. It adds one notice to the workspace's Inbox, and asking again while it is open adds nothing. Answers `202` with `{"requested": true}`. A link that still works answers `409`. Only a reviewer link whose signature still checks out can ask; anything else is a `401`.

## Track

### POST /v1/prompts

> [!WARNING]
>
> Spends credits. Answers `201`. MCP tool: `add_prompts`.

Starts tracking one or more prompts. From the next daily run, each is read across every platform your plan includes.

| Field | Type | Notes |
| - | - | - |
| `prompts` | string\[] | Required. One or more prompt texts, none blank, at most 50 per call, each at most 500 characters |
| `topic` | string | Optional. Created if it does not exist |
| `country` | string | Optional ISO 3166-1 alpha-2 code, e.g. `US`. Defaults to the workspace's country |

There is no `platform` field. Which surfaces a prompt runs on comes from your plan, not from the request.

```bash Shell theme={null}
curl -X POST https://api.attensira.com/v1/prompts \
  -H "Authorization: Bearer atn_live_<your key>" \
  -H "Content-Type: application/json" \
  -d '{"prompts":["best crm for small teams","crm with free tier"],"topic":"buying intent"}'
```

```json 201 Response theme={null}
{
  "added": [
    { "id": "prm_8f21", "text": "best crm for small teams" },
    { "id": "prm_2c07", "text": "crm with free tier" }
  ],
  "skipped": [],
  "credits_spent": null,
  "credits_remaining": null
}
```

A prompt that was already tracked comes back in `added` with its existing id, so a repeated call is idempotent all the way out; `skipped` is empty today. `credits_spent` and `credits_remaining` are `null` because tracking is charged as the prompts are read, not on this call. Your plan caps how many prompts you can hold at once, and a paste that would exceed it is refused with a `409` naming how many slots remain — see [Plans](https://docs.attensira.com/account/plans.md).

### DELETE /v1/prompts/\{prompt}

> [!WARNING]
>
> Destructive. MCP tool: `remove_prompt`.

Permanently stops tracking a prompt and frees its slot. Its historical data goes with it and this cannot be undone — fetch it first if you want it.

| Parameter | In | Type | Notes |
| - | - | - | - |
| `prompt` | path | string | Required. Prompt id |

```json Response theme={null}
{ "id": "prm_8f21", "removed": true }
```

### POST /v1/competitors

> [!NOTE]
>
> Answers `201`. No credits. MCP tool: `add_competitor`.

Registers a brand to detect alongside yours in answers already being collected. It creates no new readings, so it costs nothing.

| Field | Type | Notes |
| - | - | - |
| `domain` | string | Required. Bare hostname, e.g. `rival.com` — no scheme or path |
| `name` | string | Optional display name. Defaults to the domain |

```json 201 Response theme={null}
{ "id": "cmp_10b3", "domain": "rival.com", "name": "Rival" }
```

Competitor rates use the same denominator as your own, so adding one never changes your numbers.

### DELETE /v1/competitors/\{id}

> [!WARNING]
>
> Destructive. MCP tool: `remove_competitor`.

Stops scoring a rival. Past readings keep what they already recorded, so history does not move; the rival simply stops being scored from here on.

| Parameter | In | Type | Notes |
| - | - | - | - |
| `id` | path | string | Required. Competitor id, from `GET /v1/analytics/competitor` |

```json Response theme={null}
{ "id": "cmp_10b3", "tracked": false }
```

***

## Playbooks

### GET /v1/public/playbooks/win-rates

> [!NOTE]
>
> Read-only. No key needed. No credits. MCP: `analyze` with `view=playbook_win_rates`; with a key, also `GET /v1/views/playbook_win_rates`, and on `api.attensira.com``GET /v1/playbooks/win-rates`, which takes the same parameters and returns the same body.

The public playbook win rates, published once a night and never changed after: per playbook, lane, engine (or `all`) and window (14 and 30 days), the share of decided changes after which the brand was named more often, with its Wilson 95% interval. A cell is published only with at least 20 decided changes from at least 5 workspaces in at least 5 organisations; below that it says "not enough changes yet" and every number is `null`. See [Playbook win rates](https://docs.attensira.com/measure/playbook-win-rates.md).

| Parameter | In | Type | Notes |
| - | - | - | - |
| `day` | query | string | Optional. `YYYY-MM-DD` reads a past night; omit for the latest |
| `lane` | query | string | Optional. `own_site`, `offsite`, `outreach` or `social` returns only that lane's cells; omit, or `all`, for every lane |

Returns `day`, `published_at`, `min_changes`, `min_workspaces`, `method` (`wilson_95`), `engine_shifts` (the [engine-wide change](https://docs.attensira.com/measure/playbook-win-rates.md#engine-wide-changes) windows whose changes were left out: `{from, to, engines}`; an empty list when there were none, and `null` on a night published before engine-wide changes were detected) and `cells`, each with `playbook`, `playbook_label`, `lane` (`own_site`, `offsite` or `outreach`; a night published before lanes reads `own_site`), `engine`, `engine_label`, `window_days`, `published`, `rate`, `low`, `high`, `changes`, `workspaces`, `includes_own_workspaces` and `sentence`. A `day` that is not a date, or an unknown `lane`, is a `400`; a night with nothing published is a `404`.

### GET /v1/playbooks/recommend

> [!NOTE]
>
> Read-only. Needs the `read` scope. No credits. MCP: `analyze` with `view=playbook_model`. Served once the playbook model is turned on.

The playbooks ranked for your workspace by the cross-customer playbook model: each one's expected win rate in the segment you ask for, shrunk toward the other workspaces' rate in proportion to the segment's n, and over every segment, each with n and a 95% credible interval. The ranking uses only evidence that clears the floor (20 decided changes from 5 workspaces in 5 organisations): a playbook under it ranks as if nothing had been decided, whatever the seed. One ranking in ten explores; the seed makes a ranking replay. See [How agents choose](https://docs.attensira.com/measure/playbook-win-rates.md#how-agents-choose).

| Parameter | In | Type | Default | Notes |
| - | - | - | - | - |
| `engine` | query | string | `all` | `all` or one engine id (`chatgpt`, `perplexity`, ...) |
| `state` | query | enum | — | `red` or `amber`: the starting state to read the segment for |
| `size_band` | query | string | — | Optional segment |
| `category` | query | string | — | Optional segment |
| `playbooks` | query | string | every playbook | Comma-separated playbook names to rank, for example `audit.comparison-page,offpage.pitch-deciding-source` |
| `limit` | query | integer | 10 | 1–50 |
| `seed` | query | integer | the workspace and day | Pin the draw to replay a ranking |
| `project` | query | string | — | The workspace, on an org-wide key |

On this read every candidate counts as addressing the same questions at the same cost, so the model's rates order them.

```json Response theme={null}
{
  "engine": "chatgpt",
  "segment": { "state": "red" },
  "seed": "4",
  "explored": false,
  "fallback": false,
  "exploration": 0.1,
  "method": "beta_binomial_partial_pooling",
  "credible_mass": 0.95,
  "min_changes": 20,
  "min_workspaces": 5,
  "playbooks": [
    {
      "rank": 1,
      "name": "audit.comparison-page",
      "title": "The comparison page",
      "reach": 1,
      "prior_source": "fitted",
      "segment": { "published": true, "mean": 0.57, "low": 0.41, "high": 0.72, "n": 30, "n_holdout": 4, "workspaces": 30, "sentence": "57% expected to be named more often within 30 days (95% interval 41–72%, n=30 changes)" },
      "global": { "published": true, "mean": 0.52, "low": 0.44, "high": 0.6, "n": 140, "n_holdout": 12, "workspaces": 61, "sentence": "52% expected to be named more often within 30 days (95% interval 44–60%, n=140 changes)" }
    },
    {
      "rank": 2,
      "name": "offpage.pitch-deciding-source",
      "title": "Pitch a deciding source",
      "reach": 1,
      "prior_source": "insufficient",
      "segment": { "published": false, "mean": null, "low": null, "high": null, "n": null, "n_holdout": null, "workspaces": null, "sentence": "not enough changes yet" },
      "global": { "published": false, "mean": null, "low": null, "high": null, "n": null, "n_holdout": null, "workspaces": null, "sentence": "not enough changes yet" }
    }
  ]
}
```

`explored` is `true` on a ranking that drew from each playbook's uncertainty instead of its expected rate. `fallback` is `true` when no candidate clears the floor on the engine; the comparison-page audit then leads. `prior_source` is `fitted` when the playbook's changes on the engine clear the floor and `insufficient` otherwise, without saying whether there are a few changes or none. An unknown `engine` or `state` answers `400 invalid_argument` with the allowed values; an unknown playbook `404` naming the nearest.

***

## Alerts

### POST /v1/alerts/\{id}/counter

> [!NOTE]
>
> Needs a key with the `steer` scope. Answers `201` when this call filed the change, `200` when it was already filed.

**Counter it** on a [rival alert](https://docs.attensira.com/agent/rival-alerts.md): files one planned change in the queue to answer the rival on that prompt: a comparison page, or a pitch to a deciding source where both playbooks clear the floor on that engine and the [playbook model](https://docs.attensira.com/measure/playbook-win-rates.md#counter-it) says pitches do better (`playbook` is `comparison_page` or `pitch`). The change is keyed on the alert, so calling this again, from any door, returns the same change and files nothing new. Nothing is published from it without a yes.

| Parameter | In | Type | Notes |
| - | - | - | - |
| `id` | path | string | Required. The alert id, from the [`rival.gained` webhook](https://docs.attensira.com/api/webhooks#events) |
| `project` | query | string | The workspace, on an org-wide key |

```bash Shell theme={null}
curl -X POST https://api.attensira.com/v1/alerts/ra_4f1c09a2b7e3d5c6a8b9e0f1/counter \
  -H "Authorization: Bearer atn_live_<your key>"
```

```json Response theme={null}
{
  "alert_id": "ra_4f1c09a2b7e3d5c6a8b9e0f1",
  "action": "counter",
  "playbook": "comparison_page",
  "created": true,
  "change": {
    "id": "change_ra_4f1c09a2b7e3d5c6a8b9e0f1",
    "kind": "document",
    "lifecycle": "planned",
    "description": "Comparison page: us and rival.com, for \"best invoicing software for agencies\""
  }
}
```

An alert from another workspace answers `404 not_found`.

***

## Automations

Every automation route is the MCP `automate` verb, one `op` each, and answers `{automation, automations, status}`: `automation` is the uri the op acted on (`null` for `list`), `automations` the rows it read or wrote, `status` what happened (`listed`, `created`, `updated`, `started`, `deleted`, or the automation's own status for `get`).

An automation is written as a **spec**:

| Field | Type | Notes |
| - | - | - |
| `name` | string | Optional; the first words of `instructions` when omitted |
| `instructions` | string | Required to create. What it should do each run, in plain language |
| `schedule` | string or object | `manual` (the default), `once`, `daily`, `weekly`, `monthly`, `quarterly` or `event`, or an object `{every, at, weekday, timezone, events}`. `at` is the local time of day as `HH:MM` (24-hour; 09:00 when omitted). `weekday` is a weekly schedule's day, `monday` to `sunday`. `timezone` is an IANA zone such as `Europe/London`, the workspace's own when omitted (UTC only if it has none). `events` is what an `event` schedule listens for, any of `prompt_lost`, `rival_gained`, `citation_lost`, `new_deciding_source`, `competitor_changed`, `page_changed` (see [Event automations](https://docs.attensira.com/agent/autopilot.md#event-automations)); valid only then. `monthly` and `quarterly` fire on the 1st. `manual` and `once` run only through `POST /v1/automations/{id}/runs`, and `once` then retires |
| `status` | enum | Update only: `paused` or `active` |

A body in any other shape (the older `instruction`, `trigger`, `run_at_minute` or `tools` fields) is a `400` that names the spec. The tool allow-list is set in the app.

### GET /v1/automations

> [!NOTE]
>
> Read-only. No credits. MCP verb: `automate`, `op: list`.

Lists every automation with its schedule and last run. No parameters.

```json Response theme={null}
{
  "automation": null,
  "status": "listed",
  "automations": [
    {
      "uri": "attensira://ws_3f9a/automation/aut_71cd",
      "id": "aut_71cd",
      "name": "Monday visibility report",
      "instructions": "summarise last week's visibility and flag anything that moved",
      "schedule": { "every": "weekly", "at": "09:00", "weekday": "monday", "timezone": "Europe/London" },
      "status": "active",
      "last_run_at": "2026-09-01T08:00:00Z"
    }
  ]
}
```

A row's `status` is `active` (runs on its schedule), `paused` (does not), or `done` (a `once` schedule that already fired). Paused and retired automations are always listed. One the product paused on its own carries `retired_reason` and `retired_at`. `next_run_at` is `null` for an event automation.

### GET /v1/automations/\{id}

> [!NOTE]
>
> Read-only. No credits. MCP verb: `automate`, `op: get`.

One automation in full, with its most recent run inline — so "did my Monday report run?" costs one call, not two.

```json Response theme={null}
{
  "automation": "attensira://ws_3f9a/automation/aut_71cd",
  "status": "active",
  "automations": [{ "uri": "attensira://ws_3f9a/automation/aut_71cd", "name": "Monday visibility report", "schedule": { "every": "weekly", "at": "09:00" } }],
  "latest_run": { "id": "ses_9d02", "status": "complete", "thread": "attensira://ws_3f9a/thread/ses_9d02" }
}
```

`latest_run` is `null` when the automation has never run. Read its `thread` with `get` for the full trace. An id that is not this workspace's is a `404`.

### POST /v1/automations

> [!NOTE]
>
> Answers `201`. Creating is free; each run it performs spends credits. MCP verb: `automate`, `op: create`.

Takes `{spec}`, with the fields above.

```bash Shell theme={null}
curl -X POST https://api.attensira.com/v1/automations \
  -H "Authorization: Bearer atn_live_<your key>" \
  -H "Content-Type: application/json" \
  -d '{"spec":{"name":"Monday visibility report","instructions":"summarise last week","schedule":{"every":"weekly","at":"09:00","weekday":"monday","timezone":"Europe/London"}}}'
```

Returns `{automation, automations: [the new row], status: "created"}`.

```bash Shell — an event automation theme={null}
curl -X POST https://api.attensira.com/v1/automations \
  -H "Authorization: Bearer atn_live_<your key>" \
  -H "Content-Type: application/json" \
  -d '{"spec":{"name":"React to lost citations","instructions":"For each lost citation, propose one fix","schedule":{"every":"event","events":["citation_lost","prompt_lost"]}}}'
```

### PATCH /v1/automations/\{id}

> [!NOTE]
>
> No credits. MCP verb: `automate`, `op: update`.

A partial edit: `{spec}` with only the fields to change. A field you leave out is left alone (a `schedule` with no `every` keeps the schedule and changes only the time, day, zone or events it names), so pausing an automation (`{"spec":{"status":"paused"}}`) cannot quietly rewrite what it does. Returns `{automation, automations: [the row], status: "updated"}`.

### POST /v1/automations/\{id}/runs

> [!WARNING]
>
> Spends credits. Answers `202`. MCP verb: `automate`, `op: run`.

Runs an automation immediately, outside its schedule. Returns the run's thread, not a finished result.

| Parameter | In | Type | Notes |
| - | - | - | - |
| `id` | path | string | Required |
| `Idempotency-Key` | header | string | Strongly recommended. A repeat call with the same key does not start — or bill — a second run |

```bash Shell theme={null}
curl -X POST https://api.attensira.com/v1/automations/aut_71cd/runs \
  -H "Authorization: Bearer atn_live_<your key>" \
  -H "Idempotency-Key: 2026-09-02-monday-report"
```

```json Response theme={null}
{
  "automation": "attensira://ws_3f9a/automation/aut_71cd",
  "automations": [],
  "status": "started",
  "run": { "session_id": "ses_9d02", "id": "ses_9d02", "status": "running", "thread": "attensira://ws_3f9a/thread/ses_9d02", "poll_after_ms": 3000 }
}
```

Read `run.thread` with `get`, or poll `GET /v1/sessions/{id}`. Re-sending this `POST` without an `Idempotency-Key` starts a second billed run.

### DELETE /v1/automations/\{id}

> [!WARNING]
>
> Destructive. MCP verb: `automate`, `op: delete`.

Permanently deletes an automation and its schedule. This cannot be undone — confirm with `GET /v1/automations/{id}` first. Its past runs are kept as threads.

```json Response theme={null}
{ "automation": "attensira://ws_3f9a/automation/aut_71cd", "automations": [], "status": "deleted" }
```

***

## Inbox

Everything waiting on a person, and every act the dashboard's [Inbox](https://docs.attensira.com/agent/inbox.md) offers on it. Each act goes through the same path as a click in the dashboard, so a yes or an answer means the same thing wherever it was given, and the action log records your key as the one who gave it.

Each row's `type` says which endpoint acts on it, and its `ask_kind` (`approve`, `answer`, `do` or `info`) says what it asks of a person:

| Row | `ask_kind` | Act on it with |
| - | - | - |
| `work_item` | `approve` | `POST /v1/inbox/{id}/approve` (with an edit, for an article, post or rewrite) or `/decline` |
| `work_item` | `do` | Nothing to approve: a copy handoff or an outreach draft the person sends themselves |
| `ask` | `approve` | `POST /v1/inbox/asks/{ask_id}/approve` or `/decline` |
| `ask` | `answer` | Answered in its own session, not here |
| `task` | `answer` | `POST /v1/inbox/tasks/{id}/answer` |
| `task` | `do` | `POST /v1/inbox/tasks/{id}`, once the person has done it |

Every write here needs `steer`, and every yes an `approve` scope that covers the item; a **Read only** key gets `403` with the code `scope_denied`. Approve, answer and decline only on the person's instruction. Every act returns `next_item_ref` when something else is waiting: the row the ranking puts first now, readable with `GET /v1/inbox/items/{ref}`.

### GET /v1/inbox

> [!NOTE]
>
> Read-only. No credits. MCP tool: `list_inbox`.

What is waiting on a person: approvals the agent stopped for, questions, work it could not finish alone, failed automations, and approvals that expired unanswered.

| Parameter | In | Type | Default | Notes |
| - | - | - | - | - |
| `category` | query | string | `needs_you` | `needs_you` (waiting on a person) or `in_flight` (approved and running, and Done rows still being checked) |
| `view` | query | string | `list` | `list` returns every row, newest first, under `items`. `triage` returns the `needs_you` rows as decisions under `triage`, and is `400` with `category=in_flight` |
| `limit` | query | integer | 3 | `view=triage` only: how many decisions are ranked first. Held to 1–20, so a larger number is read as 20; `400` with `view=list` |

Each row in `items` carries `type` (`work_item`, `ask` or `task`), `id`, `ref`, `ask_kind`, `title`, `reason`, `session_id` and `updated_at`, plus `ask_id` on an ask. A task row also carries what it asks: `task.question` (`prompt`, up to six `options`, and `fact_ref` when it fills a profile field), `task.steps`, and `task.verification` while a Done is being checked. `list_approvable` is `true` only on a proposed change that may be approved without opening it: one whose effect can be undone and that is classed safe.

```bash Shell theme={null}
curl "https://api.attensira.com/v1/inbox?view=triage" \
  -H "Authorization: Bearer atn_live_<your key>"
```

```json Response theme={null}
{
  "triage": {
    "top": [
      {
        "key": "task:missing_integration:github",
        "ask_kind": "do",
        "label": "Connect GitHub · 7 waiting",
        "count": 7,
        "item_refs": ["t_66f1a2", "t_66f1b9", "…"],
        "oldest_waiting_since": "2026-09-28T07:12:00Z",
        "lead": { "type": "task", "ref": "t_66f1a2", "title": "Connect GitHub", "…": "…" }
      }
    ],
    "sections": [
      { "ask_kind": "answer", "label": "2 more questions", "count": 2, "decisions": ["…"] }
    ],
    "total_open": 12,
    "decisions": 5,
    "merged_count": 9
  }
}
```

The triage is the Inbox's own ranking, the same one the dashboard, the morning brief and the daily email read. Rows that wait on the same thing fold into one decision, and `top` holds the first `limit` of them; the rest are in `sections`, grouped by `ask_kind`. `total_open` counts rows, `decisions` counts decisions, and `merged_count` is how many sightings are not shown as rows of their own. See [At most three decisions first](https://docs.attensira.com/agent/inbox.md#at-most-three-decisions-first) for the order.

### GET /v1/inbox/items/\{ref}

> [!NOTE]
>
> Read-only. No credits. MCP tool: `get_inbox_item`.

One row by its ref, in any state, in full: the whole proposal a work item would make, the question a task asks and its answer once given, a done row as done.

| Parameter | In | Type | Notes |
| - | - | - | - |
| `ref` | path | string | Required. A row's `ref`, or any `next_item_ref`: `t_<task id>`, `w_<work item id>` or `a_<session id>_<ask id>` |

To approve a specific version, copy `work_item.change.proposal.captured_at` from here into the approve body. A row folded into another by the earlier duplicate check carries `merged_into`, the ref of the row to read instead; one it only suspected carries `possible_duplicate_of` and is not hidden. New rows are no longer folded this way. A malformed ref is `400`; a ref from another workspace is `404`, the same as one that names nothing.

### POST /v1/inbox/tasks/\{id}/answer

> [!WARNING]
>
> Spends credits when the run that asked had already finished. MCP tool: `answer_inbox_question`.

Answers a task whose `ask_kind` is `answer` with the person's words. The answer is saved to Company facts — the business profile field the question names, or a stated fact every later run reads — the row closes, and the run that asked is put back to work.

| Field | Type | Notes |
| - | - | - |
| `text` | string | Free text, at most 2,000 characters |
| `option` | string | One of the row's `task.question.options`, instead of `text` |

```json Request theme={null}
{ "text": "The launch is on 14 October." }
```

```json Response theme={null}
{
  "task": { "id": "66f1c0", "state": "done", "…": "…" },
  "fact": { "kind": "stated_fact", "ref": "stated:66f1c3" },
  "resume": { "status": "resumed", "session_id": "ses_9d02" },
  "next_item_ref": "w_66f0aa"
}
```

`resume.status` is `resumed` (a running run reads the answer from its next step; a finished, failed or suspended one starts a new turn on it, which spends credits), `queued_after_approval` (the run reads it once its pending approval is answered), `not_started` (the run was cancelled, or no run asked) or `failed` (the answer is saved, but the run could not be handed it; retry from the row's page in the dashboard). A second answer to the same row is `409`; a row that is not a question is `400`.

### POST /v1/inbox/tasks/\{id}/resolve

> [!NOTE]
>
> No credits. MCP tool: `resolve_inbox_task`.

Closes a task the agent raised. On `https://webapp.attensira.com` the same request is `POST /v1/inbox/tasks/{id}`, without `/resolve`.

| Field | Type | Notes |
| - | - | - |
| `state` | string | Required. `done` (it has actually been handled), `dismissed` (it does not matter) or `snoozed` |
| `snoozed_until` | string | RFC 3339. Required when `state` is `snoozed`, refused otherwise |

A task that carries a check (a DNS record, a connection, a line on a page) is not closed by `done`: it stays open with `verification.status: "pending"`, moves to `in_flight`, and closes on its own when the check passes. If the check still fails after its retries, the row comes back to `needs_you` with `verification.failure` saying why; sending `done` again checks again. Snoozing a row while its check is pending is `409`. Returns the task and `next_item_ref`.

### POST /v1/inbox/\{id}/approve

> [!NOTE]
>
> No credits. MCP tool: `approve_work_item`.

Approves a work item and lets the agent carry the change out. The body is optional; no body is a plain yes.

| Field | Type | Notes |
| - | - | - |
| `expected_captured_at` | string | RFC 3339. The `work_item.change.proposal.captured_at` the person read. A proposal revised since is `409`; read the row again with `GET /v1/inbox/items/{ref}` for the current version, and show it to the person before approving that |
| `edited_value` | string | The person's full edit, at most 200 KB. Approves their version instead of the agent's |

Idempotent: approving twice approves once, so a retry after a timeout is safe. Returns the work item and `next_item_ref`.

A [Brand Book edit](https://docs.attensira.com/brand-book/overview.md#who-can-change-it) (`kind` `brand_book_edit`) is approved only by a signed-in person: with a key it is `403`, whatever the key's scopes, and nothing changes.

`edited_value` is accepted only for an article, a LinkedIn post or a rewritten passage that is still waiting, and is `400` for anything else (a fix is edited in its pull request). The edited change keeps the agent's original, and is always a claim: it waits for a person in every approval mode and never goes out on its own. An edit that adds or changes code is `422`, and nothing is approved. An edit is checked against the workspace's rules like any draft; one that breaks a rule is `409`.

### POST /v1/inbox/\{id}/decline

> [!NOTE]
>
> No credits. MCP tool: `decline_work_item`.

Declines a work item, with the reason why.

| Field | Type | Notes |
| - | - | - |
| `reason` | string | Required. `wrong`, `not_now`, `already_done` or `never_touch` |
| `note` | string | The person's words, at most 1,000 characters. Required with `wrong` |

The reason is what stops the same proposal coming back; the reason and note are kept on the item and in its activity. Returns the work item and `next_item_ref`.

A [Brand Book edit](https://docs.attensira.com/brand-book/overview.md#who-can-change-it) is declined only by a signed-in person: with a key it is `403`, and it stays waiting for them.

### POST /v1/inbox/asks/\{id}/approve

> [!NOTE]
>
> No credits for the call; the run it lets go carries on as before. MCP tool: `approve_ask`.

Allows a paused run, once, the exact call it stopped to ask about. `{id}` is the row's `ask_id`.

| Field | Type | Notes |
| - | - | - |
| `session_id` | string | Required. The row's `session_id`: an ask id is unique only within its session |

```json Response theme={null}
{
  "ref": "a_66f19d02_ask_66f19d02_3",
  "session_id": "66f19d02",
  "ask_id": "ask_66f19d02_3",
  "outcome": "allowed-once",
  "next_item_ref": "t_66f1a2"
}
```

An ask is never edited: the yes is bound to the exact arguments the run asked about, so `edited_value` is `400`. The run is back on the queue and has not made the call yet; poll `GET /v1/sessions/{id}`. A session in another workspace is `404`; an ask already answered, expired, or no longer the one the run is waiting on is `409`.

### POST /v1/inbox/asks/\{id}/decline

> [!NOTE]
>
> No credits. MCP tool: `decline_ask`.

Refuses the call a paused run asked for. The run reads the reason and note first, then carries on without the call.

| Field | Type | Notes |
| - | - | - |
| `session_id` | string | Required. The row's `session_id` |
| `reason` | string | Required. `wrong`, `not_now`, `already_done` or `never_touch` |
| `note` | string | The person's words, at most 1,000 characters. Required with `wrong` |

Returns `outcome: "rejected"` in the same shape as approve. Same `404` and `409`.

### POST /v1/actions

> [!NOTE]
>
> No credits, except an `answer`, which resumes the run that asked.

One endpoint for every act on a change, an ask, a question, a thread, a rival alert, a win, a trust-graduation proposal, or the work agents do on other sites (a browser run, a consent, an outreach thread, the suppression list). Each action goes to the same path as the endpoint that does it alone (the Inbox acts above, stopping a session, undoing a change), so the rules are the same: the key that started a piece of work cannot approve it, no key approves work that cannot be undone, and a key approves only up to the lane and effect class its `approve` scopes name.

| Field | Type | Notes |
| - | - | - |
| `ref` | string | Required. An Inbox ref (`w_<change>`, `a_<session>_<ask>`, `t_<task>`) or a URI: `attensira://{workspace}/change/{id}`, `attensira://{workspace}/ask/{session}_{ask}`, `attensira://{workspace}/thread/{id}`, `attensira://{workspace}/alert/{id}`, `attensira://{workspace}/win/{id}`, `attensira://{workspace}/proposal/{id}`, `attensira://{workspace}/entity_sync/{target}`, `attensira://{workspace}/browser_run/{id}`, `attensira://{workspace}/consent/{id}`, `attensira://{workspace}/outreach_thread/{id}`, `attensira://{workspace}/today_ask/{thread}_{ask}` (a [Today decision](#post-/v1/today/id/asks/askid)). `suppress` takes the suppression list as a whole, with no id: `attensira://{workspace}/contact_suppression` |
| `action` | string | Required. See the table below |
| `payload` | object | What the action takes, below. An unknown field is `400` |
| `idempotency_key` | string | Or the `Idempotency-Key` header. The same key with the same request returns the first answer, with the header `Idempotent-Replayed: true`, and acts once. The same key with a different request is `409` `idempotency_conflict`, and so is a retry while the first call is still running. At most 255 characters. Kept for 24 hours |

| `action` | On | Scope | `payload` |
| - | - | - | - |
| `approve` | change, ask | `approve:<lane>:<class>` covering the change | `expected_captured_at`, `acknowledge_guardrail_review` |
| `edit` | change | `approve:<lane>:<class>` covering the change | `edited_value` (required): approves your version |
| `decline` | change, ask, question | `steer` | `reason`, `note` (as for decline above); a question is dismissed |
| `ship` | change | `steer` | `url`: where it went live. For a patch from [`plan_fixes`](#post-/v1/plan-fixes), `commit_sha` instead: it went live on the page it was planned for, and the commit is written on its history |
| `mark_sent` | change | `steer` | none: "I sent it" on a copy kit, a review request or an outreach draft you sent or filed yourself, as marking it sent in the Inbox does. A review request closes only this way. The key whose run filed it cannot say so, and a change still waiting for its yes is held to the approval rules, as `ship` is |
| `undo` | change | `steer` | none |
| `answer` | question | `steer` and, for an API key, a `spend` scope | `text` or `option`; or `file`, an upload id from [`POST /v1/uploads`](https://docs.attensira.com/api/sessions#post-/v1/uploads), with `text` as an optional note. A file answer is kept with your company facts as when you attach it in the app, and the upload is used up |
| `stop` | thread | `steer` | `delete: true` also removes the thread once it has ended |
| `stop` | change | `steer` | `reason` (required: `wrong_facts`, `off_brand`, `wrong_page`, `not_now`, `duplicate` or `other`), `note` (at most 1,000 characters), `expected_state_version` (or the `If-Match` header): stops a change inside its [48-hour window](https://docs.attensira.com/agent/approval.md#stopping-a-change-in-its-48-hours) |
| `counter` | alert | `steer` | none: [Counter it](#post-/v1/alerts/\{id}/counter), one planned change per alert |
| `accept_section`, `reject_section` | change | `steer` | `section_id` (required), `expected_captured_at` |
| `edit_section` | change | `steer` | `section_id` and `text` (required), `expected_captured_at`: checked against your rules before it is written |
| `regenerate` | change | `steer` and, for an API key, a `spend` scope | `instruction`, `expected_captured_at`: writes again every section nobody accepted, edited or rejected |
| `relink` | win | `steer` | `change_id` (required): [as `POST /v1/wins/{id}/link`](#post-/v1/wins/\{id}/link) |
| `unlink` | win | `steer` | none |
| `approve` | proposal | `steer` | none: always `403` `raise_human_only` with the question to put to the person. Only a person accepts a proposal, in the app |
| `resume` | question | `steer`, on a balance that is not spent | none: hands the run its answer again after `resume.status` `failed`. `409` when the run already has it |
| `unmerge` | question | `steer` | none: takes back a fold the duplicate check made; `result` is the reopened question and `next_item_ref`. `409` when it is not folded |
| `approve`, `decline` | Today decision | an `approve` scope for `approve`, held to the approval rules for the item; `steer` for `decline` | `reason`, `note` (decline): [as the Today route](#post-/v1/today/id/asks/askid), answered `202` with `{thread_id, ask_id, outcome}` |
| `retry` | entity sync target | `steer` | none: as [`POST /v1/entity-sync/{target}/retry`](https://docs.attensira.com/brand-book/entity-sync) |
| `stop` | browser run | `steer` | none: as [`POST /v1/browser-runs/{id}/stop`](#post-/v1/browser-runs/\{id}/stop) |
| `revoke` | consent | `steer` | none: as [`DELETE /v1/consents/{id}`](https://docs.attensira.com/agent/consent#api) |
| `pause`, `stop`, `decline_reply` | outreach thread | `steer` | none: as [`POST /v1/outreach-threads/{id}/actions`](#post-/v1/outreach-threads/\{id}/actions) |
| `suppress` | the suppression list (`attensira://{workspace}/contact_suppression`) | `configure` | `email` (required): as [`POST /v1/suppressions`](#post-/v1/suppressions) |
| `lower_autonomy` | autonomy (no `ref`, or `attensira://{workspace}/autonomy` for the workspace the call runs in) | `steer` | `lane` (required: `own_site`, `offsite`, `outreach` or `social`) and either `level` (`L0`–`L5`, where the lane ends up) or `steps` (1 to 5 levels to drop; one if omitted). Applied at once |

An approve above what the key may approve is `403` `scope_denied`, and `required_scope` names the exact scope it needs, for example `approve:own_site:compensable`. `grant` (consent), `connect` (a credential) and `approve_reply` (an outreach reply) are a person's, in the app: every key and connection that sends one gets `403` `forbidden`, whatever its scopes and whatever the `ref`, and nothing is read. `act` does not pause every browser run or resume one, and does not resume an outreach thread: those are the app's. `act` never raises autonomy. `lower_autonomy` lowers one lane at once and answers `result: {lane, from, to, label, applied}`. A level equal to the lane's answers `applied: false` and changes nothing. A level above the lane's is `403` `raise_human_only`: the raise is filed in the Inbox and `details.confirm_url` is where a person confirms it. `steps` counts from the lane as it stands, so send `level` when a retry must be safe. A `ref` naming another workspace is `400`. Every other action that names an autonomy level in its payload is `400`, and nothing is done. A person raises a level in the app; lowering one is also `PATCH /v1/settings/agents`. `act` is the only door for a lower: the `configure` verb has no autonomy kind, and `kind: autonomy` (or any other autonomy spelling) is a `400` whose fix names `lower_autonomy`.

`undo` on a change recorded as irreversible (mail sent to a person, a payment) is `409` `not_reversible`, saying why. Anything else goes to the change's undo, with the same answers as acting on the change directly. `stop` on a change stops it inside its 48-hour window, before it ships. Send `expected_state_version`, or `If-Match: <state_version>`, to stop only the version you read (`work_item.change.state_version` on `GET /v1/inbox/items/{ref}`). A change already stopped answers the same way. A stop that arrives after the change shipped, started shipping or moved to a newer version is `409` `veto_lost_race` with `current_state_version`: get it again and decide on what it is now. A change with no window (it waits for a yes, so decline it instead) is a `409` with no code. Without `reason` it is `422` `reason_required`, with the reasons in `allowed_values`. MCP clients do not list `act` yet; until they do, this endpoint is the way in.

If a service an action depends on does not answer, `act` tries once more. If it still fails, the error says what to do next, and sending the same request again with the same `idempotency_key` is safe. If the retry finds the item already moved on (`409`), the first try may have gone through: read the item again before acting.

```json Response theme={null}
{
  "ref": "w_66f1c0",
  "action": "approve",
  "status": "applied",
  "via": "grokbot",
  "result": { "id": "66f1c0", "state": "approved", "next_item_ref": "t_66f1a2" }
}
```

`result` is what the endpoint that does the action alone returns; a section act returns the change's draft by section (`GET /v1/changes/{id}/diff`, or `get` on `attensira://{workspace}/change_diff/{id}` over MCP), with `held_reason` when the change runs lower than its lane. `via` is the agent your key names (or the assistant you connected), and every act on a change is written to that change's activity with `via=<agent>`, so its history says who acted and through which agent. Status is `200`, or `202` when the work runs after the answer (an undo queued, an ask let go); `status` says the same in the body, `applied` or `queued`.

***

### POST /v1/plan-fixes

> [!NOTE]
>
> One credit per file that comes back with a patch, never more than `max_credits`. A file that comes back without one, a file sent again unchanged, a file that moved and a file already carrying its patch cost nothing.

Fixes for your own coding agent (Claude Code, Cursor). The agent sends the files it has open; each file is planned against the workspace's red questions and comes back as a unified diff for `git apply`, beside a change (`origin: ide`, `status: drafted`). We never write to your repository: your agent applies the patch, commits it, and calls [`act`](#post-/v1/actions) with `ship` and `{"commit_sha": "..."}` (or `{"url": "..."}`). That marks the change live and schedules its checks at +3, +7, +14 and +30 days.

Needs the `steer` scope and, for an API key, a `spend` scope.

| Field | Type | Notes |
| - | - | - |
| `repo_context.files` | array | Required, at most 50. Each `{path, sha, excerpt}`: a repository-relative path, the file's git blob id (`git hash-object <path>`, sha1 or sha256) and the whole file as `excerpt`. A file whose `excerpt` does not hash to `sha` is skipped as `not_whole_file`, so a patch always applies to the bytes it was made from. Files over 200 KB are skipped |
| `repo_context.framework` | string | Optional, e.g. `astro`, `next` |
| `repo_context.routes` | array | Optional. The site paths the repository serves (`/pricing`). A patch names one of them as its page, never one made up; it is where a `commit_sha` ship goes live |
| `questions` | array | Optional. Prompt ids or `attensira://{workspace}/question/{id}` URIs to work on. Omit for every red question. One this workspace does not track is `400` |
| `max_credits` | number | Optional, a whole number, default 10 |
| `workspace` | string | The workspace, on an org-wide key |

Only paths inside the workspace's `act_path_allowlist` are ever patched, and never site or build configuration (`package.json`, `*.config.*`, `vercel.json`, ...), CI, lockfiles or dotfiles; those come back in `skipped` as `outside_allowlist` and are never planned.

A patch that no longer applies is made again on the next call, with no step for you: a file whose content changed is planned again and its change revised in place (`regenerated: true`, same `change_id`), and a file that moved keeps its change, which now names the new path (`moved_from`). A file that already carries its patch is skipped as `applied`, pointing at the change to ship.

```json Response theme={null}
{
  "patches": [
    {
      "change": "attensira://prj_123/change/6650…",
      "change_id": "6650…",
      "ref": "w_6650…",
      "path": "docs/pricing.md",
      "base_sha": "3b18e512dba79e4c8300dd08aeb37f8e728b8dad",
      "diff": "diff --git a/docs/pricing.md b/docs/pricing.md\n--- a/docs/pricing.md\n+++ b/docs/pricing.md\n@@ -10,3 +10,5 @@\n…",
      "origin": "ide",
      "status": "drafted",
      "class": "safe",
      "rationale": "Adds a sentence naming Acme as the CRM for startups, for the pricing question.",
      "questions": ["prm_1"],
      "page_url": "https://acme.com/pricing",
      "regenerated": false
    }
  ],
  "skipped": [
    { "path": "package.json", "reason": "outside_allowlist", "detail": "package.json is site or build configuration; a fix changes content, never how the site is built" }
  ],
  "credits_used": 1,
  "max_credits": 10,
  "next": "Apply each diff with `git apply`, commit it, then call act with action ship on its change and payload {\"commit_sha\": \"...\"} (or {\"url\": \"...\"} once it is live). That starts its checks at +3, +7, +14 and +30 days."
}
```

`skipped[].reason` is one of `outside_allowlist`, `not_whole_file`, `too_large`, `no_fix`, `forbidden` (the fix would break a rule a change may never break), `underway` (a change to this file is already approved or on its way: ship or decline it first), `applied`, `budget_reached` and `duplicate_path`.

## Agent

### POST /v1/ask

> [!WARNING]
>
> Spends credits. Answers `200`. MCP tool: `ask`.

Open-ended investigation the measurement endpoints cannot answer — why a prompt is losing, what to change on a page — run by the Attensira agent, which crawls pages, audits them as a model sees them, and searches the web.

Try a measurement endpoint first: `/v1/analytics/{area}` for any metric or ranked list, `/v1/prompts/{prompt}` for one named prompt, `/v1/pages` for one URL. Those are free and immediate; this costs credits and takes time.

| Field | Type | Notes |
| - | - | - |
| `question` | string | Required. In plain language |
| `session` | string | Optional session id from a previous ask, to continue that thread |
| `files` | string\[] | Optional. Ids from [`POST /v1/sessions/{id}/attachments`](https://docs.attensira.com/api/sessions#post-/v1/sessions/id/attachments) on that same `session`, at most 5. The agent reads them with the question. Needs `session`; an id attached to another session or workspace is `403` |

```json Response theme={null}
{
  "session_id": "ses_9d02",
  "status": "running",
  "answer": null,
  "poll_after_ms": 4000,
  "after_seq": 0
}
```

`status` is `complete` (the answer is present), `running` (poll the session after `poll_after_ms`) or `failed` (the run ended without an answer). A `running` response is the success case, not an error.

`after_seq` is where this question's turn starts in the session's event log: the last event before it, `0` for a new session. Pass it as `after` to [`GET /v1/sessions/{id}/events`](https://docs.attensira.com/api/streaming#following-one-turn-of-a-thread) to follow exactly this turn when you continue a thread.

> [!NOTE]
>
> The agent runs on an **agent model** — the LLM powering the chat. That is a different thing from a tracked **platform**, which is the answer surface Attensira reads on your behalf. Changing your agent model does not change what is measured.

### GET /v1/sessions/\{id}

> [!NOTE]
>
> Read-only. No credits. MCP tool: `get_session`.

Fetches a session started by an ask or an automation run: its status and, once finished, its answer. This is how you poll async work.

| Parameter | In | Type | Notes |
| - | - | - | - |
| `id` | path | string | Required |
| `include` | query | string | Optional. `events` returns the step-by-step trace. The only supported value; repeat the parameter or comma-separate |

```bash Shell theme={null}
curl "https://api.attensira.com/v1/sessions/ses_9d02?include=events" \
  -H "Authorization: Bearer atn_live_<your key>"
```

```json Response theme={null}
{
  "id": "ses_9d02",
  "status": "complete",
  "state": "completed",
  "answer": "Your pricing page is cited on Perplexity but not on ChatGPT, because…",
  "events": [
    { "type": "tool.start", "seq": 4, "at": "2026-09-02T08:00:04Z", "name": "get_page", "callId": "c1" }
  ]
}
```

`status` is the three-word vocabulary above; `state` is the engine's own finer word, so a run parked on a question for you reads `awaiting_person` under a `running` status. The `events` trace shows which tools the agent called and with what arguments — the place to look when an answer seems wrong and you want to know which slice it read. `answer` is the agent's last message and is filled in for a finished session whether or not the trace was asked for.

### Listing, stopping and feeding sessions

`GET /v1/sessions`, `POST /v1/sessions/{id}/cancel`, `DELETE /v1/sessions/{id}`, `POST /v1/sessions/{id}/context` and `POST /v1/sessions/{id}/attachments` are on their own page: [Sessions](https://docs.attensira.com/api/sessions.md).

***

## Loop health

### GET /v1/loop-health

> [!NOTE]
>
> Read-only. No credits. Works on a spent balance. MCP tool: `get_loop_health`.

Whether the workspace's autopilot loop is working, idle or blocked, and why, with a day-by-day record. Call it first when nothing seems to be happening. See [Loop health](https://docs.attensira.com/agent/loop-health.md).

| Parameter | In | Type | Default | Notes |
| - | - | - | - | - |
| `days` | query | integer | 7 | 1–30 |

```json Response theme={null}
{
  "status": "idle",
  "reasons": ["2 piece(s) of work are waiting for your approval."],
  "days": [
    {
      "date": "2026-09-22",
      "readings": { "chatgpt": { "ok": 40, "failed": 1 } },
      "runs": [{ "automation_id": "aut_71cd", "name": "Daily win plan", "status": "fired", "reason": "", "count": 1, "at": "2026-09-22T06:00:00Z" }],
      "findings": 1,
      "work_produced": 0,
      "approvals_pending": 2,
      "prs_opened": 0,
      "rereads_due": 0
    }
  ]
}
```

`status` is `working`, `idle` or `blocked`. Each `runs` entry has `status` `fired`, `skipped` or `failed`, and a skip carries a machine-readable `reason`, such as `no_credits`, `manual_trigger`, `parked_on_ask`, `retired`, `paused`, `cap_reached`, `workspace_cap`, `budget_reached`, `work_area_cap`, `work_area_inactive`, `in_flight`, `not_worth_run` or `vendor_incident`. New reasons are added without notice, so treat one you do not know as a skip, not an error. `vendor_incident` means a service we run on stopped serving our account: the run did not start, nothing is filed in your Inbox, and it runs once on its own when the service is back. See [When something on our side stops](https://docs.attensira.com/agent/loop-health.md#when-something-on-our-side-stops). Every count is read once for its date and is not a trend. While the loop is blocked, `blocked_since` says when the hourly check first found it blocked in the current stretch; it is absent otherwise, and a check that finds the loop unblocked starts the next stretch afresh.

### Webhooks: loop.blocked and loop.recovered

A loop blocked for 12 hours in a row sends [`loop.blocked`](https://docs.attensira.com/api/webhooks#events), and the first check that finds it running again sends [`loop.recovered`](https://docs.attensira.com/api/webhooks#events). Subscribe with `POST /v1/webhooks` (`"events": ["loop.blocked", "loop.recovered"]`) or the MCP `subscribe` verb; `GET /v1/webhooks/events` lists both. `loop.blocked` carries `project_id`, `status`, `blocked_since` and `reasons`, each reason a `{code, owner, action}` with `owner` `product` or `customer` and `action` `reconnect`, `top_up`, `review` or `null`. `loop.recovered` carries `project_id`, `blocked_since` and `recovered_at`. See [Webhooks](https://docs.attensira.com/api/webhooks.md#events).

***

## Queue

### GET /v1/queue

> [!NOTE]
>
> Read-only. No credits. No MCP tool yet: call the endpoint.

Everything waiting on a person and everything running, across **every workspace in your organization**, in one call. It takes no `project` parameter: a key's default workspace is a default, not a limit, so a key minted in one workspace still sees the whole organization's queue.

```json Response theme={null}
{
  "org_id": "org_2xK",
  "generated_at": "2026-10-18T09:00:00Z",
  "totals": { "brands": 3, "needs_you": 4, "approvals": 3, "tasks": 1, "running": 1, "awaiting_person": 1 },
  "brands": [
    { "project_id": "prj_a1", "name": "Alpha", "domain": "alpha.com", "needs_you": 2, "approvals": 1, "tasks": 1, "running": 1, "awaiting_person": 1, "oldest_waiting_since": "2026-10-17T03:00:00Z" },
    { "project_id": "prj_b2", "name": "Bravo", "domain": "bravo.com", "needs_you": 1, "approvals": 1, "tasks": 0, "running": 0, "awaiting_person": 0, "oldest_waiting_since": "2026-10-18T04:00:00Z" },
    { "project_id": "prj_c3", "name": "Charlie", "domain": "charlie.io", "needs_you": 1, "approvals": 1, "tasks": 0, "running": 0, "awaiting_person": 0, "oldest_waiting_since": "2026-10-18T08:00:00Z", "errors": ["sessions"] }
  ],
  "needs_you": [
    { "project_id": "prj_a1", "project_name": "Alpha", "type": "task", "id": "tsk_91", "ref": "task:tsk_91", "title": "Connect the blog's CMS", "ask_kind": "do", "waiting_since": "2026-10-17T03:00:00Z" }
  ],
  "running": [
    { "project_id": "prj_a1", "project_name": "Alpha", "id": "ses_4f", "title": "Rewrite the pricing FAQ", "origin": "automation", "state": "awaiting_person", "needs_you": true, "created_at": "2026-10-18T07:12:00Z" }
  ],
  "truncated": false
}
```

The sample shows one row of each list; a real response carries all four waiting rows the totals count.

* `needs_you` lists every Inbox row waiting on a person, **oldest first**, each with the `project_id` it belongs to. `type` is `work_item`, `ask` or `task`; open it with `GET /v1/inbox/items/{ref}` (above) and `?project=` set to its `project_id`.
* `running` lists every live session: `state` is `queued`, `running`, `awaiting_person` or `suspended`. Sessions stopped on a question (`needs_you: true`) come first, then newest first. Finished sessions are never listed.
* `brands` has one row per workspace, including workspaces with nothing waiting, most waiting first. `needs_you` is `approvals` plus `tasks`; `awaiting_person` is the part of `running` stopped on a question. `oldest_waiting_since` is `null` when nothing is waiting.
* Each list returns at most 200 rows, and at most 200 live sessions are read per workspace. `totals` and the per-brand counts count every waiting row, and every live session up to that per-workspace limit. `truncated` is `true` when a list was cut or a workspace reached the limit.
* A brand whose Inbox or sessions could not be read names the part in `errors` (`inbox`, `sessions`). Its counts for that part are unknown, not zero, and the rest of the queue still answers.

***

## Account

### GET /v1/account

> [!NOTE]
>
> Read-only. No credits. MCP tool: `get_account`.

The org, every workspace the credential can reach, the one this call resolved to, the credit balance, which platforms that workspace tracks, and what this credential may do. Takes an optional `project`.

```json Response theme={null}
{
  "org": { "id": "org_3a10" },
  "project": { "id": "prj_5b22", "name": "Acme", "domain": "acme.com" },
  "workspaces": [
    { "id": "prj_5b22", "name": "Acme", "domain": "acme.com" },
    { "id": "prj_7c41", "name": "Beta", "domain": "beta.example" }
  ],
  "credits": { "available": 4200, "available_usd": 42.0, "held_units": 0 },
  "scopes": ["read", "steer", "configure", "approve:*:reversible", "spend:unbounded", "write"],
  "platforms": ["chatgpt", "perplexity"],
  "trial": {
    "active": true,
    "ends_at": "2026-11-08T12:00:00Z",
    "credits_included": 3000,
    "credits_left": 2600,
    "responses_left": 1200,
    "paused_until_conversion": ["outreach", "off_site_work", "project_automations", "credit_top_ups"]
  }
}
```

`trial` is the org's [trial](https://docs.attensira.com/account/plans.md#the-trial). While `active` is `true` the org monitors and drafts: readings, measurement, reports and drafted fixes and content run, nothing ships without the person's yes, and what `paused_until_conversion` names starts when the trial converts. `ends_at` is when it converts; `credits_included` is the credits the trial includes; `credits_left` and `responses_left` are the trial's allowances less what it used. At zero `credits_left` drafting stops and readings go on. Not on a trial, `active` is `false`, the other fields are `null` and the list is empty. `trial` is `null` only when billing could not be read: never read that as "not on a trial".

Call this before reporting any per-platform number: `platforms` is the authority on which surfaces were queried at all, so a platform missing from it was never measured rather than measured at zero. They belong to the resolved workspace, so the array is empty whenever `project` is `null`.

`project` is `null` when the organisation has several workspaces and the request named none. That is the answer, not an error — `workspaces` carries the ids, and every other endpoint then needs an explicit `?project=`. This is the only endpoint that answers without one, which is why the "several workspaces" error elsewhere points here.

`scopes` is never empty: a key holds `read` at minimum. An endpoint that fails with `403` and the code `scope_denied` needs a scope that is not in `scopes`; `required_scope` names it.

### GET /v1/costs

> [!NOTE]
>
> Read-only. No credits. Works on a spent balance. MCP tool: `get_costs`.

What a UTC month has cost, in US dollars: the total, a month-end forecast, the spend by project, workspace, kind and deliverable type, with what was delivered. The same figures as the spend gauge and **Settings → Money**; see [Costs](https://docs.attensira.com/account/costs.md).

| Parameter | In | Type | Default | Notes |
| - | - | - | - | - |
| `period` | query | string | this month | `YYYY-MM`, a UTC month that has started. A malformed or future month is a `400` |
| `project` | query | string | — | A workspace id, to narrow the breakdowns to that workspace. **Omit for the whole organisation.** An id outside the organisation is a `404` |

```bash Shell theme={null}
curl "https://api.attensira.com/v1/costs?period=2026-09" \
  -H "Authorization: Bearer atn_live_<your key>"
```

```json Response theme={null}
{
  "period": "2026-09",
  "currency": "usd",
  "as_of": "2026-09-18T09:12:04Z",
  "workspace_id": null,
  "spent_usd": 642.5,
  "forecast_usd": 1108.82,
  "by_work_area": [
    { "workspace_id": "prj_5b22", "work_area_id": "wa_19ac", "name": "Pricing pages", "spent_usd": 410.0 },
    { "workspace_id": "prj_5b22", "work_area_id": null, "name": "Unassigned", "spent_usd": 232.5 }
  ],
  "by_workspace": [{ "workspace_id": "prj_5b22", "name": "Acme", "spent_usd": 642.5 }],
  "by_kind": [
    { "kind": "agent_work", "spent_usd": 598.1 },
    { "kind": "data", "spent_usd": 44.4 },
    { "kind": "paid_placement", "spent_usd": 0 },
    { "kind": "creators", "spent_usd": 0 }
  ],
  "by_type": [
    { "type": "article", "delivered": 2, "waiting_on_you": 1, "spent_usd": 371.2 },
    { "type": "page_fix", "delivered": 8, "waiting_on_you": 0, "spent_usd": 160.4 },
    { "type": "monitoring_day", "delivered": null, "waiting_on_you": null, "spent_usd": 44.4 },
    { "type": "other", "delivered": null, "waiting_on_you": null, "spent_usd": 66.5 }
  ],
  "credited_back_usd": 0
}
```

* `spent_usd` is the month's spend less refunds, and every breakdown adds up to it.
* `forecast_usd` is spend divided by the days elapsed, times the days in the month: `null` for the first three days of a month, and what the month cost once it is over.
* A `null` `work_area_id` is a workspace's unassigned spend: chats and the Chief of staff. An empty `workspace_id` in `by_workspace`, named `Across workspaces`, is spend that belongs to the organisation rather than one workspace.
* `by_kind` always lists `agent_work`, `data`, `paid_placement` and `creators`; nothing is charged under the last two today. `unattributed` appears only when a charge could not be placed.
* `delivered` and `waiting_on_you` in `by_type` are `null` for a type we do not count. `null` is never `0`. `waiting_on_you` is work finished on our side and waiting for a person to put live; it is not delivered.
* `credited_back_usd` is what was credited back to the balance for the month under the work guarantee retired on 1 November 2026; `0` for every month since. It is the organisation's even when `project` names a workspace.
* Work is sold only as credits: no field is a price per deliverable or a committed volume of work.

The budget, its pace, the caps, the balance and how it is funded are not served here or anywhere a key can reach: a person sets them in **Settings → Billing**. The balance is on [`GET /v1/account`](#get-/v1/account).

### GET /v1/ai-traffic/install

> [!NOTE]
>
> Read-only. No credits. MCP tool: `get_ai_traffic_install`.

Everything needed to start sending AI-crawler hits: the ingest endpoint, your workspace's HMAC signing secret, the signature header name, the replay window, the daily cap, and a copy-pasteable edge worker. No parameters.

```json Response theme={null}
{
  "endpoint": "https://webapp.attensira.com/v1/visits",
  "method": "POST",
  "signature_header": "X-Attensira-Signature",
  "signing_secret": "…",
  "project_id": "prj_5b22",
  "replay_window_seconds": 300,
  "daily_visit_cap": 100000,
  "worker": "export default { async fetch(request, env) { … } }",
  "notes": ["Deploy in front of the tracked domain."]
}
```

Call it when [AI traffic](https://docs.attensira.com/traffic/ai-traffic.md) is empty and you need to know how to send us any. The signing secret is derived from the workspace id, so it is stable and can be shown again — unlike your API key, which is displayed exactly once.

### GET /v1/wins

> [!NOTE]
>
> Read-only. No credits. Works on a spent balance. MCP tool: `list_wins`.

The workspace's wins, newest first. A win is the first time an engine named your brand, or linked to your site, in an answer to a prompt that does not name your brand itself, after we had read that prompt on that engine on at least three earlier days with a successful answer and none of them did the same. Failed reads count toward neither half. Only the first naming (or link) can be a win: one that came before those three days of reading is not, and no later answer of the same kind on that prompt and engine becomes one.

A win is a first **since we started reading** that prompt, not evidence that any work caused it. When you show one, use its `sentence`, which says exactly that.

No parameters. Returns at most the 50 most recently found wins, and leaves dismissed wins out.

```bash Shell theme={null}
curl https://api.attensira.com/v1/wins \
  -H "Authorization: Bearer atn_live_<your key>"
```

```json Response theme={null}
{
  "wins": [
    {
      "id": "win_4e19",
      "prompt_id": "prm_8f21",
      "prompt": "best crm for small teams",
      "engine": "ChatGPT",
      "platform": "chatgpt",
      "kind": "linked",
      "sentence": "ChatGPT linked to acme.com for the first time since we started reading this prompt on 2 September 2026, in an answer to 'best crm for small teams' on 28 September 2026.",
      "quote": "Acme publishes its pricing openly (https://acme.com/pricing), with a free tier for up to three users.",
      "quote_truncated": true,
      "cited_url": "https://acme.com/pricing",
      "date": "2026-09-28",
      "reading_since": "2026-09-02",
      "detected_at": "2026-09-28T10:05:00Z",
      "seen": true,
      "share_url": "https://app.attensira.com/w/<slug>"
    }
  ],
  "unseen": 0
}
```

`kind` is `named` (the answer named the brand) or `linked` (it cited a page on your domain); one prompt on one engine can give one win of each kind, never two of the same. `quote` is a verbatim excerpt of at most 400 characters, never edited, and `null` when no answer that day gave an excerpt that passed the honesty check; `quote_truncated` says whether it stops short of either end of the answer. `cited_url` is the first page on your domain the answer cited, or `null`. `date` is the day of the answer and `reading_since` the first day we read the prompt on that engine, both `YYYY-MM-DD` in the workspace's time zone. The list is ordered by `detected_at`, when the win was found.

`seen` is whether someone has opened the win in the dashboard, and `unseen` counts every undismissed win nobody has opened, including any beyond the 50 returned. Reading this endpoint marks nothing seen. `share_url` is the public link to the win card while it is shared, and `null` otherwise.

### POST /v1/wins/\{id}/link

> [!NOTE]
>
> Needs the `steer` scope. No credits. Works on a spent balance. Over MCP: `act` on `attensira://{workspace}/win/{id}` with `relink` or `unlink`. Not on `api.attensira.com` yet: send it to `https://webapp.attensira.com` with the same key.

Sets a win's link by hand. `{"action": "relink", "change_id": "..."}` puts the win beside one of the workspace's changes that went live before the win's day; `{"action": "unlink"}` marks it not linked to our work. What you set stays until you set it again: no automatic pass changes it. See [How a win is linked to a change](https://docs.attensira.com/agent/wins.md#how-a-win-is-linked-to-a-change).

| Parameter | In | Type | Notes |
| - | - | - | - |
| `id` | path | string | Required. The win id, from `GET /v1/wins` |
| `action` | body | enum | `relink` or `unlink` |
| `change_id` | body | string | `relink` only |
| `project` | query | string | The workspace, on an org-wide key |

```json Response theme={null}
{
  "win_id": "win_4e19",
  "linked": true,
  "link": {
    "change_id": "chg_2a71",
    "strength": "manual",
    "shipped_at": "2026-09-24T14:02:00Z",
    "matched_by": "person",
    "note": null,
    "set_by": "person",
    "set_at": "2026-10-20T09:30:00Z"
  }
}
```

A change that went live on or after the win's day answers `400`; a change that did not ship in this workspace, or a win from another workspace, answers `404`.

### GET /v1/brief

> [!NOTE]
>
> Read-only. No credits. Works on a spent balance. MCP: the `brief` verb, listed since 2026-10-19 in place of `get_brief` and `get_loop_health` (both still answer by name; see the [MCP changelog](https://docs.attensira.com/mcp/changelog.md)).

The one call to start from: today's [morning brief](https://docs.attensira.com/agent/morning-brief.md), whether the loop is running and why not, wins nobody has opened, what is waiting on a person, and the budget and autonomy the work runs under.

| Parameter | In | Type | Default | Notes |
| - | - | - | - | - |
| `workspace` | query | string | — | Omit for the credential's workspace. `project` is accepted as its older name |
| `date` | query | string | — | `YYYY-MM-DD` for one of the workspace's own past days, for the `brief` section. Omit for today |

```json theme={null}
{
  "workspace_id": "p1",
  "date": "2026-10-18",
  "edition": "daily",
  "text": "Good morning. …",
  "today_thread_id": "665f…",
  "today_thread_uri": "attensira://p1/thread/665f…",
  "brief": { "date": "2026-10-18", "edition": "daily", "subject": "…", "sections": { "counts": { } } },
  "loop": { "status": "blocked", "reason": "The credit balance is spent, so scheduled automation runs are refused. …" },
  "wins_unseen": 2,
  "needs_you": {
    "count": 5,
    "top": [{ "uri": "attensira://p1/change/w1", "title": "Approve the pricing rewrite" }]
  },
  "autonomy": {
    "budget_usd": 1500,
    "projects": { "ask": 2, "draft": 0, "act": 1 },
    "line": "$1,500/mo credit budget. 2 projects ask first · 1 project acts without asking."
  }
}
```

`date`, `edition` and `text` are the brief's own: the day it is for (`YYYY-MM-DD`, in the workspace's time zone), `daily` or `weekly`, and the whole brief rendered as text. `brief` is the brief document described under [`get_brief`](https://docs.attensira.com/mcp/tools#get_brief), its sections under `brief.sections` (and on a Monday their order under `brief.order`), without the text. `loop.status` is `ok` (work came out in the last two days), `degraded` (nothing stops the loop, but nothing came out) or `blocked` (something stops it); `reason` is the first reason in words, and `null` when the loop is ok. `needs_you.count` is everything waiting on a person, and `top` names at most three of them, in the Inbox's order, by the URI `get` reads. `autonomy.budget_usd` is `null` when no monthly budget is set; `projects` counts the active projects by how freely they act (`ask`, `draft`, `act`).

Each section is read on its own. A section that cannot be read is `null`, and `unavailable` names it with the reason; the rest of the brief still answers. A `null` there means "not read", never "nothing": `needs_you: null` does not mean nothing is waiting.

When the brief itself cannot be read, `brief` is `null` and `unavailable.brief` gives the reason, and the top level still answers: `date` is the day you asked for, or today in the workspace's time zone, and `text` is the same reason, never an empty string.

The payload stays within 6 KB. The brief's sections are fitted first: when a long brief would not fit, its largest sections are left out, largest first, and named in `trimmed`; they are still in the full brief. `text` gets the room that is left. When it has to be cut, it ends in `…` and `trimmed` includes `"text"`.

Beside the brief, two fields name the day's [Today thread](https://docs.attensira.com/agent/today.md), the session whose first message is this brief:

| Field | Type | Notes |
| - | - | - |
| `today_thread_id` | string | The thread's session id. Reading today's brief opens the thread if nothing has yet; there is one per workspace per local day |
| `today_thread_uri` | string | The same thread as `attensira://{workspace}/thread/{id}` |

Both are left out for a past day that never had a thread, and when the thread could not be opened; the rest of the brief still answers.

### GET /v1/views/\{view}

> [!NOTE]
>
> Read-only. No credits. Works on a spent balance. Needs `read`. MCP: the `analyze` verb, listed since 2026-10-19 in place of the reads it stands for.

One read-only view, answered as `{"view": "<name>", "data": { … }}`, where `data` is exactly the body of the read the view stands for. Parameters go as query keys (`?area=prompt&days=7`) or as one JSON object (`?params={"markets":[{"country":"DE"}]}`); a list of objects, such as `markets`, only fits the JSON form. `workspace` (or `project`) selects the workspace. An unknown view or parameter is a `400` whose `allowed_values` lists the valid ones; any other refusal is the underlying read's own.

| View | Same as | Parameters |
| - | - | - |
| `analytics` | [`GET /v1/analytics/{area}`](#get-/v1/analytics/area) | `area` (required), `days`, `order`, `limit`, `filter` |
| `evidence` | `POST /v1/evidence/query` | `metric`, `group_by`, `days`, `from`, `to`, `topic_ids`, `prompt_ids`, `engines`, `surface`, `country`, `competitor`, `intent`, `stage`, `state`, `domain`, `text_contains`, `markets`, `property_ids`, `limit` |
| `state_grid` | `GET /v1/prompts/state-grid` | `days` |
| `answer_history` | [`GET /v1/memory/answers/history`](#get-/v1/memory/answers/history) | `prompt` (required), `platform`, `days`, `cursor`, `limit` |
| `answer_slice` | [`GET /v1/memory/answers/slice`](#get-/v1/memory/answers/slice) | `platform`, `country`, `prompt_ids`, `topic_id`, `surface`, `model`, `competitor`, `cited_domain`, `brand_named`, `sentiment`, `brand_position_min`, `brand_position_max`, `text_contains`, `from`, `to`, `days`, `cursor`, `limit` |
| `citation_timeline` | [`GET /v1/memory/citations/timeline`](#get-/v1/memory/citations/timeline) | `domain` (required), `days` |
| `page_history` | [`GET /v1/memory/pages/history`](#get-/v1/memory/pages/history) | `url` (required) |
| `deciding_sources` | `GET /v1/deciding-sources` | `prompt`, `days`, `limit` |
| `win_plan` | `GET /v1/win-plan` | `prompt` (required), `days` |
| `markets_preview` | `POST /v1/markets/preview` | `markets`, `engines`, `topic_ids`, `topics`, `prompts` |
| `community_threads` | `GET /v1/community/threads` | `days`, `prompt` |
| `funnel` | [`GET /v1/funnel`](#get-/v1/funnel) | none beyond `workspace` |
| `scoreboard` | `GET /v1/scoreboard` ([Scoreboard](https://docs.attensira.com/tracking/scoreboard.md)) | `days`, `market` (ISO 3166-1 alpha-2, or `all`) |
| `playbook_win_rates` | [`GET /v1/public/playbooks/win-rates`](#get-/v1/public/playbooks/win-rates) ([Playbook win rates](https://docs.attensira.com/measure/playbook-win-rates.md)) | `day` (`YYYY-MM-DD`; omit for the latest), `lane` (`own_site`, `offsite`, `outreach`, `social` or `all`) |

Each parameter means what it means on the read it comes from, with the same defaults and the same clamping.

### GET /v1/funnel

> [!NOTE]
>
> Read-only. No credits. Needs the `read` scope. MCP verb: `analyze` with `view: "funnel"`.

The workspace's way from sign-up to its first proven change. Every step is always listed, in order, reached or not, so a client can show the gaps without knowing the list.

| Step | Reached when |
| - | - |
| `workspace_created` | The workspace was created |
| `preview_seen` | The first answers were read, before any plan |
| `destination_connected` | The place your changes go is connected |
| `plan_started` | A plan started, trial or paid |
| `first_work_filed` | The first piece of work was filed |
| `first_change_live` | The first change went live |
| `first_proven_change` | A check first proved a change: **Moved** at +14 or +30 days. See [Before and after](https://docs.attensira.com/measure/before-and-after.md) |

```json theme={null}
{
  "workspace_id": "p1",
  "steps": [
    { "step": "workspace_created", "label": "Workspace created", "reached_at": "2026-10-03T09:00:00Z" },
    { "step": "preview_seen", "label": "First answers read", "reached_at": "2026-10-03T09:20:00Z" },
    { "step": "destination_connected", "label": "Changes have a place to go", "reached_at": null }
  ],
  "reached": 2,
  "next": "destination_connected",
  "unread": []
}
```

The example shows three of the seven steps. `reached_at` is `null` for a step not reached yet. A step that could not be read just now is `null` too, with `"unread": true` on the step and a line in `unread` naming it, so "could not look" never reads as "not yet".

### GET /v1/objects/\{type}/\{id}

> [!NOTE]
>
> Read-only. No credits. Works on a spent balance. Needs `read`. MCP: the `get` verb, listed since 2026-10-19 in place of the older `get_*` reads.

One object by its address, `attensira://{workspace}/{type}/{id}`, answered as `{"uri", "type", "workspace_id", "data"}`. `data` is exactly the body of the object's own read: a `question` is [`GET /v1/prompts/{prompt}`](#get-/v1/prompts/prompt), a `thread` is [`GET /v1/sessions/{id}`](https://docs.attensira.com/api/sessions), an `ask` is an Inbox row by its `ref`, a `report` is the latest published report for a cadence (`latest`, `week`, `month`, `quarter`). Any other query key goes to that read, so its own arguments keep working. `workspace` (or `project`) selects the workspace.

The collection types are `question`, `change`, `ask`, `receipt`, `mission`, `thread`, `source`, `playbook`, `page`, `automation`, `report`, `deliverable`, `goal`, `market`, `topic`, `skill`, `connector`, `win`, `site_policy`, `contradiction`, `proposal`, `change_diff`, `alert`, `community_insight`, `entity_sync`, `result`, `browser_run`, `consent`, `listing`, `outreach_thread`, `contact_suppression` and `attachment`. A `consent` is read by its `id`, a `listing` by its domain (`g2.com`) and a `contact_suppression` by its `email_hash`. An unknown type is a `400` whose `allowed_values` lists them; an object that does not exist, or is another organization's, is a `404`.

A `deliverable` or an `attachment` (a file attached to a session, read by its `att_…` id) also carries `file`, the file behind a link signed for one hour:

```json theme={null}
"file": {
  "name": "pricing-page.md",
  "content_type": "text/markdown; charset=utf-8",
  "size": 4210,
  "signed_url": "https://…",
  "expires_at": "2026-10-27T13:52:29Z"
}
```

Anyone holding `signed_url` can open the file until `expires_at`, without a key, so pass it only to whoever should have the file. Every read signs a new link, and a link is only ever signed for the workspace the object belongs to. A deliverable's file is its download: an article as Markdown, a picture as itself. A deliverable with nothing to download (a pull request lives on GitHub), or a moment when the link could not be signed, answers without `file`. Over MCP, `get` also returns `file` as a `resource_link`.

### GET /v1/objects/\{type}

> [!NOTE]
>
> Read-only. No credits. Works on a spent balance. Needs `read`. MCP: the `list` verb (and `get` for a one-per-workspace type), listed since 2026-10-19 in place of the older `list_*` reads.

A collection type listed newest first, answered as `{"type", "workspace_id", "items", "next_cursor"}`. Every item is the row its older list returned, with its `uri` added; `next_cursor` is `null` on the last page.

| Parameter | In | Type | Default | Notes |
| - | - | - | - | - |
| `cursor` | query | string | — | The `next_cursor` from the page before |
| `limit` | query | integer | — | 1-100 |
| `filter` | query | JSON object | — | Keys depend on the type: `ask` takes `category`; `thread` takes `status`, `origin` and `since`; `deliverable` takes `type` and `status`. An unknown key is a `400` naming the valid ones |
| `workspace` | query | string | — | Omit for the credential's workspace. `project` is accepted as its older name |

A type with one object per workspace (`account`, `costs`, `plan`, `brief`, `brand_family`, `brand_book`, `company_profile`, `ai_traffic_install`, `autonomy`) answers that object here, in the same shape as `GET /v1/objects/{type}/{id}`.

### POST /v1/today/\{id}/asks/\{askId}

> [!NOTE]
>
> Needs an `approve` scope, whatever the answer, because a yes approves the item. No credits. Answers `202`.

> [!NOTE]
>
> Not on `api.attensira.com` yet: send it to `https://webapp.attensira.com` with the same key, as for [webhooks](https://docs.attensira.com/api/webhooks.md). That host answers errors in its [own envelope](https://docs.attensira.com/api/errors.md#errors-from-the-webapp-host). Over MCP, `act` with `approve` or `decline` on `attensira://{workspace}/today_ask/{thread}_{ask}` answers the same card.

Answers one decision card in a [Today thread](https://docs.attensira.com/agent/today.md). Each card's `replyTo` is this path. The answer is applied to the Inbox item the card stands for, then the card is marked answered; no agent run starts.

| Field | Type | Notes |
| - | - | - |
| `outcome` | string | Required. `allowed-once` (yes) or `rejected` (no) |
| `reason` | string | For `rejected` on a change or a run's call: `wrong`, `not_now`, `already_done` or `never_touch`. Default `not_now` |
| `note` | string | Optional, with `rejected` |

Yes approves a change, allows a run's call once, or marks a task done. No declines the change or the call, or dismisses the task.

```json theme={null}
{ "thread_id": "665f…", "ask_id": "ask_today_2026-09-15_1", "outcome": "allowed-once" }
```

`404` when the thread is not one of this workspace's Today threads or has no such card. `409` when the card was already answered, or the Inbox item was handled somewhere else.

### PATCH /v1/settings/agents

> [!NOTE]
>
> No credits. MCP tool: `update_settings`. Needs `steer`; changing `timezone` also needs `configure`.

How far a run may go on its own, and the workspace's time zone. A partial edit: a field you leave out is left alone. This is the customer's decision; change it on their instruction. See [Approval](https://docs.attensira.com/agent/approval.md).

| Field | Type | Notes |
| - | - | - |
| `unattended_mode` | enum | `ask`, `draft` or `act` |
| `act_path_allowlist` | string\[] | Path patterns act mode may change. Replaces the list; empty restores the default. Source, CI, lockfiles and dotfiles are refused whatever it says |
| `publish_without_approval` | boolean | Whether a run may put a page on the site without asking |
| `send_without_approval` | boolean | Whether a run may send email without asking |
| `timezone` | string | The workspace's IANA time zone, such as `Europe/Berlin`, used for its days in briefs, schedules and times shown to you. An unknown zone is refused with `400`. Needs the `configure` scope, so an OAuth connection cannot change it |
| `community_answers_enabled` | boolean | Whether replies to community threads are drafted for you to post. Never posted for you. Switching it on needs the `configure` scope; switching it off needs only what the route itself asks for. See [Community answers](https://docs.attensira.com/agent/community-answers.md) |

Returns the settings in force: the fields above, plus `act_paths_are_default` (`true` while the default list applies). `act_path_allowlist` is always the list in force, the default included. `GET /v1/settings/agents` returns the same fields.

Switching `community_answers_enabled` on with a key or token that lacks `configure` answers `403` with the code `scope_denied` and `required_scope: "configure"`, and changes nothing. Sending the value the workspace already has is not refused. It is not a raise: a drafted reply is never posted for you.

With an API key or an OAuth token, this route only lowers. Lowering needs only `steer`, which every OAuth connection holds, so any connected assistant can stop the agent acting on its own. These count as lowering: a stricter `unattended_mode`, switching `publish_without_approval` or `send_without_approval` off, and removing patterns from `act_path_allowlist`. A list that adds a pattern the current list does not have is a raise, even if it also removes others, and so is an empty list when the current list is narrower than the default.

A raise is not applied and answers `403` with the code `raise_human_only`. Nothing is changed and nothing is filed. The message starts "Not applied:", and `details` carries `outcome: "refused"`, the change you asked for under `proposed` (`field`, `from`, `to`) and `confirm_url`, the app page (**Settings › Autonomy**) where a signed-in person can make it. See [Only a person can loosen these settings](https://docs.attensira.com/agent/approval.md#only-a-person-can-loosen-these-settings).

```json theme={null}
{
  "error": {
    "type": "forbidden",
    "code": "raise_human_only",
    "message": "Not applied: …. Only a person can let the agent do more on its own, and a person can make this change at https://app.attensira.com/settings/autonomy?project=prj_123. An API key or an assistant can lower these settings, but not raise them.",
    "fix": "Nothing was changed and nothing was filed. Tell a person they can make this change at https://app.attensira.com/settings/autonomy?project=prj_123.",
    "docs_url": "https://docs.attensira.com/api/errors#raise_human_only",
    "status": 403,
    "details": {
      "reason": "autonomy_raise_in_app",
      "outcome": "refused",
      "field": "unattended_mode",
      "proposed": [{ "field": "unattended_mode", "from": "draft", "to": "act" }],
      "confirm_url": "https://app.attensira.com/settings/autonomy?project=prj_123"
    }
  }
}
```

### GET /v1/autonomy

> [!NOTE]
>
> Read-only. No credits. Works on a spent balance. Needs `read`. Over MCP: `get` on `attensira://{workspace}/autonomy`.

> [!NOTE]
>
> Not on `api.attensira.com` as its own path: read it there as `GET /v1/objects/autonomy`, or send this path to `https://webapp.attensira.com` with the same key.

Every lane at the level a person set (or the default), and `effective_level`, the level it runs at under the quality checks. `effective_level` is never above `level`; when it is lower, `held_by_evals` is `true` and `held_reason` says why. See [A lane can run lower than you set it](https://docs.attensira.com/agent/approval.md#a-lane-can-run-lower-than-you-set-it).

| Parameter | In | Type | Notes |
| - | - | - | - |
| `playbook` | query | string | Read the checks for one playbook. Without it, for work that names none |
| `project` | query | string | The workspace, on an org-wide key |

```json Response theme={null}
{
  "workspace_id": "prj_123",
  "default": "L2",
  "playbook": null,
  "lanes": [
    {
      "lane": "own_site",
      "level": "L4",
      "label": "Ship on its own",
      "is_default": false,
      "effective_level": "L3",
      "effective_label": "Ship after 48 hours unless stopped",
      "held_by_evals": true,
      "held_reason": "This work has not passed its quality checks yet, so it runs no further than \"Ship after 48 hours unless stopped\"",
      "raised_by": { "door": "app", "from": "L3", "to": "L4", "at": "2026-10-12T08:00:00Z" }
    }
  ]
}
```

Read-only. Lower a lane with [`act`](#post-/v1/actions) and `lower_autonomy`, applied at once; only a person raises one, in the app. To stop unattended work at once, set `unattended_mode` to `ask` with [`PATCH /v1/settings/agents`](#patch-/v1/settings/agents). See [Autonomy levels](https://docs.attensira.com/agent/autonomy-levels.md). A key or an agent can ask for a raise with [`POST /v1/autonomy/raise`](#post-/v1/autonomy/raise), which files a proposal and changes nothing.

### GET /v1/evals

> [!NOTE]
>
> Read-only. No credits. Works on a spent balance. Needs `read`. Over MCP: `get_eval_results`.

The quality checks agents' work must pass before a lane runs it above L3, one cell per lane and playbook. They are measured on our own examples, so every workspace reads the same cells. See [A lane can run lower than you set it](https://docs.attensira.com/agent/approval.md#a-lane-can-run-lower-than-you-set-it).

| Parameter | In | Type | Notes |
| - | - | - | - |
| `lane` | query | string | `own_site`, `offsite`, `outreach` or `social`. Any other value is a 400 that lists them |
| `playbook` | query | string | One playbook, such as `audit/comparison-page`. A playbook we do not check returns no cell |

| Field | Notes |
| - | - |
| `result` | The latest nightly run: `n` (examples scored), `miss_rates` by check (`never_say`, `claim_tracing`, `factual`, `voice`; `null` for a check that did not run) and `recorded_at`. Exactly `"Not evaluated yet"` when nothing was scored, never a zero |
| `gate_level` | The highest level these results allow: `L3` until they pass, `L5` once they do (your own setting is then the limit) |
| `stale` | `true` when the run was recorded under another version of the playbook's instructions, of the questions the reviewing model is asked, or of the reviewing model than runs today. A stale result counts as not checked |
| `stale_reason` | The one sentence why, as `held_reason` on [`GET /v1/autonomy`](#get-/v1/autonomy) says it. `null` when not stale |
| `last_live_run_at` | When the examples were last answered afresh by the reviewing model, kept for comparison only. `null` if never |

```json Response theme={null}
{
  "cells": [
    {
      "lane": "own_site",
      "playbook": "audit/comparison-page",
      "result": {
        "n": 20,
        "miss_rates": { "never_say": 0, "claim_tracing": 0.05, "factual": 0, "voice": null },
        "recorded_at": "2026-10-26T02:41:00Z"
      },
      "gate_level": "L3",
      "stale": true,
      "stale_reason": "“The comparison page” has not passed its quality checks yet (its instructions changed since it was checked), so it runs no further than \"Ship after 48 hours unless stopped\"",
      "last_live_run_at": null
    },
    {
      "lane": "own_site",
      "playbook": "audit/pricing-page",
      "result": "Not evaluated yet",
      "gate_level": "L3",
      "stale": false,
      "stale_reason": null,
      "last_live_run_at": null
    }
  ]
}
```

### POST /v1/autonomy/raise

> [!NOTE]
>
> No credits. Works on a spent balance. Needs `steer`. Never changes a level. Not yet on `api.attensira.com`: send it to `https://webapp.attensira.com` with the same key.

Asks for one lane to run at a higher level. Only a person can let agents do more on their own, so an API key, an agent or a connected assistant can ask but never raise, whatever scopes it holds and whatever it sends. The request is filed in the person's Inbox as a proposal (and sent as the `autonomy.raise_proposed` event), and nothing changes until they confirm it, signed in, at `confirm_url`. The link carries no confirmation of its own, so it does nothing for anyone but that signed-in person.

| Field | Type | Notes |
| - | - | - |
| `lane` | string | Required. `own_site`, `offsite`, `outreach` or `social` |
| `level` | string | Required. `L0` to `L5`, higher than the lane is now |

```json Response (202) theme={null}
{
  "outcome": "proposed",
  "proposal_id": "665f…",
  "confirm_url": "https://app.attensira.com/settings/autonomy?project=prj_123&proposal=665f…",
  "lane": "own_site",
  "from": "L3",
  "to": "L4",
  "applied": false,
  "message": "Not applied: only a person can let agents do more. …"
}
```

Asking again for the same lane and level while that proposal is open is the same proposal. `409` (`state_conflict`) when the lane is already at or above the level; nothing is filed. `400` (`invalid_argument`) for an unknown lane or level. Read the proposal with `GET /v1/autonomy/proposals/{id}`; accepting it with a key answers `403` with `outcome: "needs_human"`.

### GET /v1/notifications

> [!NOTE]
>
> Read-only. No credits. Needs `read`.

> [!NOTE]
>
> Not on `api.attensira.com` yet, and no MCP tool calls it yet: send it to `https://webapp.attensira.com` with the same key, as for [webhooks](https://docs.attensira.com/api/webhooks.md). That host answers errors in its [own envelope](https://docs.attensira.com/api/errors.md#errors-from-the-webapp-host).

The notification preferences of the person the key or connection belongs to, in the workspace named by `project` (or the credential's only one). See [Notifications](https://docs.attensira.com/account/notifications.md#who-gets-email).

| Field | Type | Notes |
| - | - | - |
| `workspace_id` | string | |
| `member_id` | string | The person these preferences belong to |
| `owner` | boolean | Whether that person created the workspace |
| `categories` | object\[] | One row per category: `category`, `email` (whether they get it by email), `email_reason` (why not, when `email` is false: `unsubscribed`, `notify_email_off`, `member_off`, `email_undeliverable`), `mandatory` (true for `account`) |
| `alerts` | object | The mode the person chose: `{"wins": "realtime" \| "in_brief"}`. `in_brief` means the week's wins in the Monday note only |
| `alerts_effective` | object | The mode that applies. `in_brief` reads `realtime` while the person does not get the Monday note by email, so their wins are not lost |
| `quiet_hours` | object or null | `start`, `end` (24-hour `HH:MM`), `timezone` (IANA; empty means the workspace's) |
| `pending_proposal` | object or null | A change waiting for the person: `id`, `change`, `proposed_by`, `proposed_at` |

### PATCH /v1/notifications

> [!NOTE]
>
> No credits. Needs `steer`. MCP: `configure` with `kind: "notifications"`, `op: "update"`.

> [!NOTE]
>
> Not on `api.attensira.com` yet: send it to `https://webapp.attensira.com` with the same key, as for [webhooks](https://docs.attensira.com/api/webhooks.md). That host answers errors in its [own envelope](https://docs.attensira.com/api/errors.md#errors-from-the-webapp-host).

Proposes a change to the same preferences. **It never applies the change.** A key or a connection acts for an assistant, and what a person is told, and when, is theirs to decide: the change is stored as a proposal that they accept or decline in the app, and nothing they receive changes until they accept. A newer proposal replaces an undecided older one.

| Field | Type | Notes |
| - | - | - |
| `email` | object | Category to boolean, for example `{"wins": false}`. `account` cannot be set to `false` |
| `alerts` | object | `{"wins": "realtime"}` or `{"wins": "in_brief"}` |
| `quiet_hours` | object | `{"start": "22:00", "end": "07:00", "timezone": "Europe/Berlin"}`; `{}` proposes switching quiet hours off |

Returns `202` with `status: "proposed"`, the `proposal`, a `message`, and the `current` preferences, unchanged. A proposal that could never be accepted (an unknown category, `account: false`, a bad time) is refused with `400`.

### GET /v1/github/install-url

> [!NOTE]
>
> No credits. MCP tool: `connect_github`.

The GitHub App install link for this workspace, and nothing else. The install finishes in a browser, because GitHub hands its callback a code only the person completing it has. Each call mints a single-use link.

Returns `url`.

***

## Memory

Writes into what the workspace knows about itself. See [Knowledge and skills](https://docs.attensira.com/agent/knowledge-and-skills.md).

### POST /v1/observations

> [!NOTE]
>
> Answers `201`. No credits. MCP tool: `record_observation`.

| Field | Type | Notes |
| - | - | - |
| `statement` | string | Required. One sentence carrying its own sample size |
| `evidence` | object\[] | Required, at least one. Each `{kind, id, url?, day?}`, `kind` being `reading`, `citation_day` or `action` |

Every id is resolved against the workspace before anything is stored. One that does not exist there is a `400`, never a stored fact.

### POST /v1/skills

> [!NOTE]
>
> Answers `201`. No credits. MCP tool: `write_skill`.

| Field | Type | Notes |
| - | - | - |
| `title` | string | Required. The rule in a few words |
| `description` | string | Required. When the rule applies |
| `body` | string | Required. The rule itself |
| `kind` | enum | Required. `voice`, `compliance` or `playbook` |

## The Brand Book

What the agents may say about your company: facts, voice rules, never-say phrases, competitors, markets, your only-you answers, and the open edits waiting for you. See [Your Brand Book](https://docs.attensira.com/brand-book/overview.md). Not yet on `api.attensira.com`: send these paths to `https://webapp.attensira.com` with the same key.

### GET /v1/brand-book

> [!NOTE]
>
> Read-only. No credits. Works on a spent balance. Needs `read`. MCP: `get` on `attensira://{workspace}/brand_book`, which answers this body as its `data`.

| Parameter | In | Type | Notes |
| - | - | - | - |
| `project` | query | string | The workspace, on an org-wide key |

```json Response theme={null}
{
  "workspace": "prj_123",
  "facts": [
    {"id": "positioning/one-liner", "label": "One line", "value": "Scheduling for dental practices", "provenance": "drafted", "source_url": "https://acme.com/", "public": true},
    {"id": "offer/pricing-shape", "label": "How it is priced", "value": "Per seat, monthly", "provenance": "confirmed", "source_url": null, "public": false}
  ],
  "voice": [{"id": "6651…", "title": "Plain words", "rule": "Short sentences, no jargon.", "suggested": false}],
  "never_say": [{"phrase": "seamless", "source": "yours"}, {"phrase": "robust", "source": "suggested"}],
  "competitors": [{"name": "Rival", "domain": "rival.com", "status": "confirmed"}],
  "markets": [{"country": "US", "language": null}],
  "only_you": [{"question_id": "profile:offer/pricing-shape", "field": "offer/pricing-shape", "answer": "Per seat, monthly", "answered_at": "2026-10-20T09:00:00Z"}],
  "changes": [{"id": "6652…", "ref": "w_6652…", "kind": "brand_book_edit", "edit": "fact", "title": "Brand Book: set positioning/one-liner to “…”", "filed_at": "2026-10-24T08:00:00Z"}],
  "learned_rules": [{"type": "learned_rule", "id": "6658…", "text": "Never say \"cutting-edge\".", "avoid": ["cutting-edge"], "source": "regenerate_note", "change_id": "6653…", "skill_id": "6654…", "status": "active", "created_at": "2026-10-25T10:00:00Z", "removed_at": null, "edited_at": null}],
  "paused_playbooks": [{"type": "playbook_suppression", "id": "6659…", "playbook": "write/comparison-page", "playbook_name": "Write a new comparison page", "reason": "“Write a new comparison page” is paused for this workspace until 24 November 2026: …", "status": "active", "declined_ids": ["6655…", "6656…", "6657…"], "created_at": "2026-10-25T10:00:00Z", "until": "2026-11-24T10:00:00Z", "lifted_at": null}]
}
```

Every field is always present. A field with no value is `null` and a list with nothing in it is `[]`. `provenance` is `drafted` or `confirmed`. `never_say[].source` is `yours` (it stops drafts) or `suggested` (it stops nothing until you add it). `changes[].edit` is `never_say`, `voice`, `fact`, `fact_public`, `learned_rule`, `playbook_suppression`, or `facts` for a company profile edit. `learned_rules` and `paused_playbooks` are what the workspace [taught the agents](https://docs.attensira.com/agent/learned-rules.md) and what shapes drafts now: active rules and pauses only, each in the shape [`GET /v1/learned-rules`](https://docs.attensira.com/agent/learned-rules#see-and-remove-what-was-learned) gives it. A learned rule is a voice rule too, so `voice` also lists it, under its `skill_id`. Another organization's workspace is a `404`.

### PATCH /v1/brand-book

> [!NOTE]
>
> No credits. Works on a spent balance. Needs `configure`. Over REST, `POST /v1/config/brand_book` with `{"op": "update", "change": {…}}` is the same edit. Not yet offered to assistants over MCP.

The body is exactly one of these:

| Edit | Shape | What it does |
| - | - | - |
| `never_say` | `{"add": [...], "remove": [...]}` | Adds phrases no draft may contain, or removes them from every voice and compliance rule |
| `voice` | `{"title", "rule"}`, `{"id", "title"?, "rule"?}` or `{"id", "remove": true}` | Adds, rewrites or removes a voice rule |
| `fact` | `{"id", "value"}` | Writes one fact, confirmed |
| `fact_public` | `{"id", "public"}` | Makes one fact public or private. Private takes it out of your public product feed |
| `learned_rule` | `{"id", "text"}` or `{"id", "remove": true}` | Rewrites a [learned rule](https://docs.attensira.com/agent/learned-rules.md) (its never-say phrases are read again from the new text) or removes it. A rewrite that would loosen the rules is a `400`; a removed rule is a `409` |
| `playbook_suppression` | `{"id", "lift": true}` | Lifts a paused playbook before its pause ends |

From a signed-in person: `200`, `{"status": "applied", "id": null, "ref": null, "brand_book": {…}}`. From a key or a connection: `202`, `{"status": "proposed", "id": "…", "ref": "w_…", "brand_book": null}`, and nothing changes until a signed-in person approves the change in the Inbox. Two edits in one body, an unknown edit or field, or a fact id the Brand Book does not have is a `400` naming what is valid. A field that names autonomy is a `400` too. Only a person can change autonomy, in the app.

***

## Set up a workspace

A key holder adds a workspace for a domain: the agents draft the business from its site, the person decides what to keep, and the person pays in their own browser. Nothing here can charge. Both endpoints act on the key's own account and take no `?project=`: there is no workspace to select yet, and a `?project=` is refused with that reason. A new person with no account starts from an assistant over MCP instead, where signing in comes before any account exists; see [Set up from your own assistant](https://docs.attensira.com/start/quickstart.md#set-up-from-your-own-assistant).

### POST /v1/onboarding/workspace

> [!NOTE]
>
> Needs `steer`. No charge. MCP tool: `start_workspace`.

Creates the workspace for a domain, or returns the one already started for it. Sending the same domain again never creates a second workspace: it is how you poll.

| Field | Type | Notes |
| - | - | - |
| `domain` | string | Required. The business's domain, e.g. `example.com` |
| `audit_id` | string | The free audit that sent the person here, if one did. Stored with the workspace when this call creates it |
| `audit_prompts` | string\[] | That audit's questions, at most 8. On a create they join the starter set word for word (only the spaces around each are trimmed). More than 8, or one over 500 characters, is a `400 invalid_argument` naming the field |
| `competitors` | string\[] | Competitor domains the audit named, a head-to-head's second domain first, at most 25. On a create they are tracked as if the person had kept them in the competitors step. More than 25, one that is not a domain, or the workspace's own domain or a subdomain of it is a `400 invalid_argument` naming the field, before anything is created |

A call that resumes or polls an existing workspace ignores `audit_id`, `audit_prompts` and `competitors`.

Returns `workspace_id`, `status`, the drafted profile (each fact with the page it came from, or a `question` to ask when nothing was found), the suggested competitors and platforms, the proposed goals, the plans and `first_change`, the change drafted before payment or `null`. `status` is `drafting`, `needs_input`, `ready_to_confirm`, `awaiting_payment`, `active` or `first_readings_ready`; the fields are described under [`start_workspace`](https://docs.attensira.com/mcp/tools#start_workspace). An account holds one workspace waiting for payment at a time, so a second unpaid domain is a `409` naming the one to finish. `first_change.state` is `already_used_for_domain` when another workspace for the same registrable domain already had the first change drafted before payment. Calling it too often is a `429` [`rate_limited`](https://docs.attensira.com/api/errors#rate_limited) with `retry_after`.

### POST /v1/onboarding/workspace/\{id}/confirm

> [!NOTE]
>
> Needs `steer`. No charge. MCP tool: `confirm_setup`.

Saves the person's setup choices and answers their checkout link. Every call mints a new link.

| Field | Type | Notes |
| - | - | - |
| `plan` | string | Required. A plan id from the `plans` the start endpoint returned |
| `monthly_budget_usd` | number | The monthly budget the person chose, in US dollars. Not negative |
| `overage_cap_usd` | number | The most a month may be charged in all, in US dollars: from the budget up to 10% over it, and only sent with `monthly_budget_usd`. A cap above the budget lets new work run up to 10% over the budget, which stays the budget. A cap below the budget or more than 10% over it is a `400`. Omit it and work pauses at the budget, which is then the cap |
| `competitors` | string\[] | The rivals they kept, by domain |
| `platforms` | string\[] | The platforms they kept |
| `goals` | object\[] | The goals they kept, each `{id, target?}` as `proposed_goals` returned them |
| `profile_edits` | object | Corrections to the profile, a fact's field mapped to its new value |

An omitted list keeps what was proposed; an empty list keeps none of it. Returns `checkout_url`, `requires_browser` (always `true`), `expires_at` and `budget_consent`, as described under [`confirm_setup`](https://docs.attensira.com/mcp/tools#confirm_setup). An account that already pays for a plan is a `409`. The endpoint never charges and never uses a saved card: the person pays in their browser, and the start endpoint then reads `active`.

***

## Goals

What the agents aim at: a metric, a target and a date, with a pace verdict from the daily readings. See [Goals](https://docs.attensira.com/measure/goals.md).

### GET /v1/goals

> [!NOTE]
>
> Read-only. No credits. MCP tool: `get_goals`.

| Parameter | In | Type | Default | Notes |
| - | - | - | - | - |
| `status` | query | string | — | `active`, `hit`, `missed`, `paused`, `archived`, or `all`. Repeat it or comma-separate it for several. Omit it for every goal that is not archived |

Returns `goals`, oldest first, each with `baseline` and `current` as `{value, n}` (a `null` value is not measured yet, not zero), `target`, `target_date`, `pace` (`state` is `ahead`, `on_pace`, `behind` or `unmeasured`), the projects it drives as `work_area_ids`, and `status`. The full row is described under [`get_goals`](https://docs.attensira.com/mcp/tools#get_goals).

### POST /v1/goals

> [!NOTE]
>
> Needs `steer`. No credits. MCP tool: `set_goal`.

Sets a goal. Set goals on the person's instruction.

| Field | Type | Notes |
| - | - | - |
| `metric` | string | Required. A metric key, such as `ai_share_of_voice` or `search_clicks` |
| `params` | object | What the metric is measured over, where it takes any |
| `target` | number | Required. In the metric's own unit |
| `target_date` | string | Required. `YYYY-MM-DD` |
| `name` | string | Optional |
| `work_area_id` | string | The project it drives. Omit for the whole workspace |
| `Idempotency-Key` | header | Makes a retried create write once |

The baseline is the first reading taken after the goal is set, never a field: a body with `baseline` is a `400`.

### PATCH /v1/goals/\{id}

> [!NOTE]
>
> Needs `steer`. No credits. MCP tool: `set_goal`.

Changes a goal. A field you leave out is left alone, and a body with nothing to change is a `400`.

| Field | Type | Notes |
| - | - | - |
| `name` | string | Not empty |
| `target` | number | In the metric's own unit |
| `target_date` | string | `YYYY-MM-DD` |
| `status` | enum | `active`, `paused` or `archived`. `hit` and `missed` are verdicts reached on the target date, never set |
| `work_area_id` | string | A project id, or `null` to make the goal the whole workspace's |
| `version` | integer | The version you read. A goal that changed since is a `409` |

A goal's metric and its params never change: to measure something else, set a new goal and archive this one.

***

## Projects

A project is an area of work with its own crew of agents, and on the wire it is a **work area**. Creating a project and changing its settings are in the dashboard only. See [Projects](https://docs.attensira.com/agent/projects.md).

### GET /v1/work-areas

> [!NOTE]
>
> Read-only. No credits. MCP tool: `list_projects`.

The workspace's projects, each with `id`, `name`, `description`, `team` (each crew member with their status line), `goal_id`, `unread`, `needs_you`, `budget_cap_usd` and `last_activity_at`. Archived projects are left out.

### GET /v1/work-areas/\{id}

> [!NOTE]
>
> Read-only. No credits. MCP tool: `list_projects`.

One project: everything the list says, plus its `direction` (what people have told it, word for word), the `triggers` its crew runs on, `automation_ids`, and the `feed`'s newest 50 posts, newest first. A project outside the workspace is a `404`.

### POST /v1/work-areas/\{id}/steer

> [!NOTE]
>
> Needs `steer` and a `spend` scope. Posting is free; the crew's reply is an agent run and spends credits. MCP tool: `steer_project`.

Gives a project's crew the person's direction, in their words. It is kept word for word as the project's direction and posted to its feed; the crew answers it with an ordinary run that replans if the steer needs it.

| Field | Type | Notes |
| - | - | - |
| `text` | string | Required. At most 4,000 characters |
| `Idempotency-Key` | header | Makes a retried post post once |

A steer is a post and nothing else: it never approves work, changes a setting or publishes anything, and the run that answers it meets the same approvals as every run. A field other than `text` is refused. The response is described under [`steer_project`](https://docs.attensira.com/mcp/tools#steer_project).

***

## Deliverables

### GET /v1/deliverables

> [!NOTE]
>
> Read-only. No credits. MCP tool: `list_deliverables`.

What the crews delivered, newest first: where each piece of work lives and what the checks proved about it.

| Parameter | In | Type | Default | Notes |
| - | - | - | - | - |
| `type` | query | enum | — | `article`, `page`, `fix`, `social_post`, `listing_fix`, `product_copy` or `image` |
| `work_area_id` | query | string | — | One project's deliverables |
| `status` | query | string | — | `waiting_on_you`, `draft`, `open`, `merged`, `synced_draft`, `live`, `shipped` or `closed`. Repeat it or comma-separate it for several |
| `limit` | query | integer | 20 | 1–50 |
| `cursor` | query | string | — | `next_cursor` from the previous page |

Returns `deliverables` and `next_cursor` (`null` at the end). `result` is `null` until there is something to measure. The row is described under [`list_deliverables`](https://docs.attensira.com/mcp/tools#list_deliverables).

***

## Outreach suppression list

There are two lists. A recipient who uses the opt-out link in a pitch is never sent outreach again, from any Attensira workspace. An address you add yourself with `POST /v1/suppressions` binds your workspace only: other workspaces can still write to it. Only opt-out entries are global. The opt-out link takes a click or an [RFC 8058](https://www.rfc-editor.org/rfc/rfc8058) one-click `POST`, and neither needs a key. See [Who we never write to](https://docs.attensira.com/agent/off-site.md#pitches), [the opt-out link](https://docs.attensira.com/offsite/outreach-rules.md#the-opt-out-link) and [the suppression list](https://docs.attensira.com/offsite/outreach-rules.md#the-suppression-list).

> [!NOTE]
>
> Not on `api.attensira.com` yet: send it to `https://webapp.attensira.com` with the same key, as for [webhooks](https://docs.attensira.com/api/webhooks.md). That host answers errors in its [own envelope](https://docs.attensira.com/api/errors.md#errors-from-the-webapp-host). Over MCP, `list` with type `contact_suppression` reads the list and `act` with `suppress` on `attensira://{workspace}/contact_suppression` adds an address.

### GET /v1/suppressions

> [!NOTE]
>
> Read-only. No credits. Needs `read`.

Your workspace's own list, newest first, up to 500: the addresses you added, and the recipients who opted out from your own pitches, each with the date your workspace saw it. An address that opted out from another workspace's pitch is refused for you too, but is not listed here, and nothing another workspace added is ever listed or applied to you.

The list keeps no addresses, only a hash of each ([data retention](https://docs.attensira.com/security/data-retention.md#the-suppression-list-keeps-no-addresses)), so an entry has `email_hash` and no `email`. `email_hash` is the hex SHA-256 of the address lowercased, trimmed and without a `+tag`: hash an address the same way to find it here.

```json Response theme={null}
{
  "suppressions": [
    { "email_hash": "bc15ce5d4fa97606bf6987d111db7d744e04fda69d93ca4653ec189387e02fb3", "reason": "opt_out", "created_at": "2026-10-18T09:00:00Z" }
  ],
  "count": 1
}
```

`reason` is `opt_out` (the recipient clicked the link), `manual` (your workspace added it), `bounce` or `complaint`.

### POST /v1/suppressions

> [!NOTE]
>
> No credits. Needs `configure`.

Puts an address on your workspace's list. It binds your workspace only; other workspaces can still write to it. Idempotent: adding it again changes nothing and answers the same way. There is no removal.

| Field | In | Type | Notes |
| - | - | - | - |
| `email` | body | string | Required. Lowercased and without a `+tag`, so every alias of the mailbox is covered, then stored only as its hash |

The answer echoes the address you sent, beside the `email_hash` it is kept as. A later `GET` lists only the hash.

```json Response theme={null}
{ "suppression": { "email": "editor@example.com", "email_hash": "bc15ce5d4fa97606bf6987d111db7d744e04fda69d93ca4653ec189387e02fb3", "reason": "manual", "created_at": "2026-10-18T09:00:00Z" } }
```

***

## Outreach threads

A sent pitch becomes an outreach thread: its follow-ups (at most two, due on day 4 and day 10), the replies and what each one was, and the message waiting on a person's yes. See [Outreach threads](https://docs.attensira.com/offsite/outreach-rules.md#outreach-threads).

> [!NOTE]
>
> Not on `api.attensira.com` yet: send them to `https://webapp.attensira.com` with the same key. That host answers errors in its [own envelope](https://docs.attensira.com/api/errors.md#errors-from-the-webapp-host). Over MCP, `list` with type `outreach_thread` and `get` on `attensira://{workspace}/outreach_thread/{id}` read them, and `act` on that ref takes `pause`, `stop` and `decline_reply`. `resume` is on this route only.

### GET /v1/outreach-threads

> [!NOTE]
>
> Read-only. No credits. Needs `read`.

This workspace's outreach threads, newest first.

| Parameter | In | Type | Notes |
| - | - | - | - |
| `status` | query | enum | Optional. `active`, `awaiting_customer`, `paused`, `replied` or `stopped` |

```json Response theme={null}
{
  "threads": [
    {
      "id": "thr_123",
      "work_item_id": "wi_456",
      "mailbox": "gmail",
      "recipient": "editor@example.com",
      "domain": "example.com",
      "subject": "Your roundup of analytics tools",
      "status": "awaiting_customer",
      "stop_reason": null,
      "pitch_sent_at": "2026-10-10T09:00:00Z",
      "follow_ups": [
        { "n": 1, "due_at": "2026-10-14T09:00:00Z", "state": "sent", "sent_at": "2026-10-14T10:12:00Z" },
        { "n": 2, "due_at": "2026-10-20T09:00:00Z", "state": "skipped", "sent_at": null }
      ],
      "replies": [
        { "received_at": "2026-10-16T08:30:00Z", "class": "asks_price", "body_read": true, "asked_usd": 500, "return_at": null }
      ],
      "pending": {
        "id": "msg_789",
        "kind": "price",
        "follow_up_n": null,
        "subject": "Re: Your roundup of analytics tools",
        "body": "…",
        "state": "awaiting_yes",
        "within_terms": false,
        "reason": "They asked $500, above your maximum of $300.",
        "asked_usd": 500,
        "counter_usd": 300,
        "created_at": "2026-10-16T09:00:00Z",
        "decided_at": null,
        "choices": [
          { "label": "Yes", "action": "approve_reply" },
          { "label": "No", "action": "decline_reply" },
          { "label": "Counter at $300", "action": "approve_reply", "counter_usd": 300 }
        ]
      },
      "actions": ["pause", "stop", "approve_reply", "decline_reply"],
      "created_at": "2026-10-10T09:00:00Z",
      "updated_at": "2026-10-16T09:00:00Z"
    }
  ],
  "count": 1
}
```

A reply's `class` is `interested`, `asks_price`, `no`, `unsubscribe`, `out_of_office`, `bounce`, `complaint` or `other`. `body_read` is `true` only when the mailbox allows reading reply text; the text itself is never stored or returned. `stop_reason` is `opt_out`, `bounce`, `complaint`, `declined`, `customer`, `sequence_done` or `mailbox_gone`. A follow-up's `state` is `scheduled`, `awaiting_yes`, `sent` or `skipped`. A pending message's `kind` is `follow_up`, `answer` or `price`, and its `state` is `awaiting_yes`, `sending`, `sent` or `declined`. `actions` lists what `POST /v1/outreach-threads/{id}/actions` can do on the thread now. `choices` is the decision a pending message waits on: **Send / Don't send**, or for a fee, **Yes / No / Counter at \$X**.

### GET /v1/outreach-threads/\{id}

> [!NOTE]
>
> Read-only. No credits. Needs `read`.

One outreach thread, in the shape above.

### POST /v1/outreach-threads/\{id}/actions

> [!NOTE]
>
> No credits. `pause`, `resume`, `stop` and `decline_reply` need `steer`. `approve_reply` is refused for every key.

| Field | In | Type | Notes |
| - | - | - | - |
| `action` | body | enum | `pause`, `resume`, `stop`, `approve_reply` or `decline_reply` |
| `counter_usd` | body | number | Optional, on a fee answer: send a counter at this amount instead of their price |

`approve_reply` sends an email from your own mailbox, which cannot be taken back, so it is a person's alone: an API key or an OAuth connection gets a `403` whatever its scopes. A signed-in person approves it on the thread in the app or on its Inbox card. Every other action works over the API.

### GET /v1/outreach-mailboxes/\{provider}

> [!NOTE]
>
> Read-only. No credits. Needs `read`.

One outreach mailbox's sending record. `provider` is `gmail` or `outlook`.

```json Response theme={null}
{
  "mailbox": "gmail",
  "read_replies": true,
  "sent": 42,
  "bounced": 1,
  "bounce_rate": 0.0238,
  "limit_per_day": 3,
  "paused": false,
  "paused_reason": null,
  "paused_at": null
}
```

`limit_per_day` starts at 2, rises by one a week up to 10 while the bounce rate stays under 2% over at least 10 sends. A bounce rate over 5% sets `paused`. Allowing reply text to be read, and resuming a paused mailbox, are a signed-in person's, in the app; there is no API route for them.

***

## Browser runs

The only browser runs today are the [weekly walks of your own site](https://docs.attensira.com/agent/browser-agents.md), which run under a person's [consent](https://docs.attensira.com/agent/consent.md). There is no call that starts a run. No run opens a browser on another site: listings are filed from a [copy kit](https://docs.attensira.com/offsite/listings.md).

> [!NOTE]
>
> Not on `api.attensira.com` yet: send them to `https://webapp.attensira.com` with the same key. Over MCP, `list` with type `browser_run` and `get` on `attensira://{workspace}/browser_run/{id}` read them; `act` with `stop` on a run stops it. Pausing every run is on this route only.

### GET /v1/browser-runs

> [!NOTE]
>
> Read-only. No credits. Works on a spent balance. Needs `read`.

This workspace's browser runs, newest first, as `{runs, count}`: the approved change each delivers, the site, `status` (`queued`, `running`, `awaiting_customer`, `done`, `refused`, `killed` or `failed`), every step with its effect (`reversible` or `irreversible`) and outcome, and the next step, which is yours (for example, adding credits) or an automatic retry.

### GET /v1/browser-runs/\{id}

> [!NOTE]
>
> Read-only. No credits. Works on a spent balance. Needs `read`.

One browser run, in the shape above.

### POST /v1/browser-runs/\{id}/stop

> [!NOTE]
>
> No credits. Works on a spent balance. Needs `steer`.

Ends the run and closes its browser.

### POST /v1/browser-runs/pause

> [!NOTE]
>
> No credits. Works on a spent balance. Needs `steer`.

Stops this workspace's browser runs at their next step and refuses new ones until a person resumes them in the app. Pausing only takes power away, so a key may do it; resuming is a person's. Answers `{paused, reason, set_at}`.

***

## Directory listings

The directories and review sites agents file your listing on, such as G2, Capterra and Product Hunt. Filing one is a change, which waits for the same yes as any other. How it may be filed is the site's [policy](https://docs.attensira.com/agent/site-policies.md) as it applies to your workspace.

> [!NOTE]
>
> Not on `api.attensira.com` yet: send them to `https://webapp.attensira.com` with the same key. Over MCP, `list` with type `listing` and `get` on `attensira://{workspace}/listing/{domain}` read the same.

### GET /v1/listings

> [!NOTE]
>
> Read-only. No credits. Works on a spent balance. Needs `read`.

```json Response theme={null}
{
  "listings": [
    {
      "domain": "g2.com",
      "name": "G2",
      "submission_url": "https://www.g2.com/products/new",
      "fields": ["brand", "tagline", "category", "pricing", "logo_url", "website"],
      "note": "G2 will not show a profile with no reviews. Filing the listing is step one; asking three customers for a review is step two, and it is theirs to do.",
      "policy_domain": "g2.com",
      "mode": "copy_kit",
      "effective_mode": "copy_kit",
      "toolkit": false,
      "handoff_steps": [
        "Sign in to your own G2 account. Attensira never creates one for you.",
        "Open https://www.g2.com/products/new.",
        "Paste the answers we prepared, field by field, and check each one.",
        "Submit it yourself, then mark it sent in the Inbox so we start measuring it."
      ],
      "verification": {
        "change_id": "chg_6f1c0b2a",
        "state": "mismatch",
        "url": "https://www.g2.com/products/acme/reviews",
        "checked_at": "2026-10-30T09:00:00Z",
        "sentence": "Live on G2 on 30 October 2026, but https://www.g2.com/products/acme/reviews does not show the tagline your Brand Book has. An update is filed to fix it.",
        "mismatched": ["tagline"],
        "repair_change_id": "chg_91d4e7aa"
      },
      "reviews": {
        "change_id": "chg_3b7e90c1",
        "profile_url": "https://www.g2.com/products/acme/reviews",
        "sent_at": "2026-10-08T17:00:00Z",
        "latest": {
          "read_at": "2026-10-29T06:00:00Z",
          "status": "measured",
          "reason": null,
          "review_count": 19,
          "average_rating": 4.3,
          "best_rating": 5,
          "last_review_at": "2026-10-27T08:00:00Z"
        },
        "baseline": {
          "read_at": "2026-10-08T06:00:00Z",
          "status": "measured",
          "reason": null,
          "review_count": 11,
          "average_rating": 4.1,
          "best_rating": 5,
          "last_review_at": "2026-09-30T00:00:00Z"
        }
      }
    }
  ],
  "count": 9
}
```

`fields` is what the form asks for, filled from your Brand Book. `mode` is the site's row as written and `effective_mode` is what agents obey in your workspace, never more permissive. `toolkit` is `true` when a reviewed connection can file the listing for you; `false` means it goes out through your hands, with `handoff_steps`. `note` is `null` when there is nothing to add.

`reviews` is the weekly read of your profile on a review platform, for your newest [review request](https://docs.attensira.com/offsite/listings.md#asking-for-reviews) there, and `null` when you have none. `sent_at` is when you marked it sent, `null` before. `latest` is the newest read and `baseline` the one the receipt counts from: the last measured read on or before the day you marked it sent. A read's `status` is `measured` or `not_measurable`; a `not_measurable` read carries its `reason` and no numbers, never a zero. `review_count`, `average_rating`, `best_rating` and `last_review_at` are as the profile page states them.

The list also holds Trustpilot and Google Business Profile, which take review requests but have no listing form here: their `fields` is empty, `submission_url` is the platform's business console, and `note` says so.

`verification` is the daily read of your newest delivered listing on the site, compared with your Brand Book, and `null` when you have no delivered listing there. `state` is `pending`, `live_verified`, `mismatch`, `not_up_yet`, `rejected`, `needs_address` or `not_read`. [Checking the listing against your Brand Book](https://docs.attensira.com/offsite/listings.md#checking-the-listing-against-your-brand-book) says what each means. `url` is the page read, and `checked_at` is when, both `null` before the first read. `mismatched` names the fields the page shows differently. `repair_change_id` is the one profile-update change filed to fix them, or `null`.

### GET /v1/listings/\{domain}

> [!NOTE]
>
> Read-only. No credits. Works on a spent balance. Needs `read`.

One directory or review platform, by its domain or a URL on it, in the shape above. A site agents do not work on is a `404` whose `allowed_values` are the ones they do.

***

## Reports

### GET /v1/reports/latest

> [!NOTE]
>
> Read-only. No credits. MCP tool: `get_report`.

The latest published client report for a cadence. See [Client reports](https://docs.attensira.com/agencies/client-reports.md).

| Parameter | In | Type | Default | Notes |
| - | - | - | - | - |
| `cadence` | query | enum | `week` | `week`, `month` or `quarter` |

Returns the report's period, its facts with their `n`, the share link when it is shared, and the markdown in full: unlike the MCP tool, nothing is cut. A cadence whose first report has not published yet is a `404`.

### POST /v1/shares

> [!NOTE]
>
> No credits. MCP verb: `share`.

A read-only public link to one report, one change's receipt or one weekly scorecard, for someone who has no Attensira account.

| Field | Type | Notes |
| - | - | - |
| `uri` | string | Required. `attensira://{workspace}/report/{id}`, `attensira://{workspace}/receipt/{id}` (the receipt's id is its change's) or `attensira://{workspace}/scorecard/{week}` (an ISO week, `2026-W43`). The workspace must be one this key may read |
| `expires_days` | integer | A report link: 1 to 90 days; 180 when omitted. A receipt or scorecard link has no expiry, so a value for one is a `400` |

```bash Shell theme={null}
curl -X POST https://api.attensira.com/v1/shares \
  -H "Authorization: Bearer atn_live_<your key>" \
  -H "Content-Type: application/json" \
  -d '{"uri":"attensira://ws_3f9a/receipt/chg_41aa"}'
```

```json Response theme={null}
{ "url": "https://app.attensira.com/r/<token>", "expires_at": null }
```

A report link lasts `expires_days` (180 when omitted), and `expires_at` says when it ends. A receipt link has no expiry (`null`); [rotating the workspace's receipt link](https://docs.attensira.com/account/receipt.md#sharing-a-receipt-without-an-account) takes back every link the workspace ever shared, report links included. A report or receipt that is not the workspace's is a `404`, and nothing is signed for it. A scorecard link has no expiry either, and exists only while the workspace's public scorecard links are on: when they are off, the answer is a `409` (`state_conflict`), and a person turns them back on in the app. A week with no scorecard is a `404`. Any other type is a `400` listing `report`, `receipt` and `scorecard`.

***

## Money and your plan

> [!NOTE]
>
> Not on `api.attensira.com` yet: send it to `https://webapp.attensira.com` with the same key, as for [webhooks](https://docs.attensira.com/api/webhooks.md). That host answers errors in its [own envelope](https://docs.attensira.com/api/errors.md#errors-from-the-webapp-host).

### GET /v1/money

> [!NOTE]
>
> Read-only. No credits. Needs `read`. MCP: `get(attensira://{ws}/money)`.

The [money line](https://docs.attensira.com/account/plans.md#the-money-line) and the facts it is written from, for the key's organisation.

```json Response theme={null}
{
  "sentence": "$412.00 of your $1,500.00 budget spent this month. 7 changes shipped.",
  "status": "active",
  "month": "2026-10",
  "spent_cents": 41200,
  "budget_cents": 150000,
  "ceiling_cents": 150000,
  "budget_state": "partial",
  "changes_shipped": 7,
  "paused_at": null,
  "resume_at": null,
  "cancel_at": null
}
```

`status` is `active`, `paused` or `cancelling`. `budget_state` is `none`, `untouched`, `partial`, `reached` or `over`. `budget_cents` and `ceiling_cents` are `null` with no budget; `changes_shipped` is `null` when it could not be counted.

### POST /v1/subscription/\{action}

> [!NOTE]
>
> No credits. MCP: `act(subscription, pause|resume|cancel)`.

| Action | Who | Body |
| - | - | - |
| `pause` | A key with `steer` | `{"days": 14}`: 1–90, default 30 |
| `resume` | A person only | — |
| `cancel` | A person only | `{"reason": "..."}`, required |

`pause` answers the money view above, now `paused`. A pause sent while one holds only moves its end later; one that would end it sooner changes nothing and answers the pause that holds. `resume` and `cancel` from a key or an assistant are `403` with code `raise_human_only`, `details.outcome` `needs_human` and `details.elicitation`, the question to put to your person; nothing changes. See [Pausing, resuming and cancelling](https://docs.attensira.com/account/plans.md#pausing-resuming-and-cancelling).

***

## Prospect audits

> [!NOTE]
>
> Not yet on `api.attensira.com`: call these on `https://webapp.attensira.com` with the same key. They act on the key's account, not on one workspace. MCP reaches the reads through `list` and `get` on the `prospect_audit` type, and the convert through `act`; starting an audit is REST only for now. See [Prospect audits](https://docs.attensira.com/agencies/prospect-audits.md).

### POST /v1/prospect\_audits

> [!NOTE]
>
> Needs `steer` and a `spend` scope. Needs a plan and a balance that is not spent. Limited per account: 20 at once, then one every 3 minutes.

Starts an audit of a domain: `{"domain": "example.com"}`. Answers `201` with the new audit. While the domain's last audit is still running it answers that audit with `200`, and after a stage of it stopped for good it runs that stage again and answers `200`. An account with no plan is a `402` `insufficient_credits` that says to pick one, and nothing is started. Over the limit it is a `429` [`rate_limited`](https://docs.attensira.com/api/errors#rate_limited) with `retry_after`.

### GET /v1/prospect\_audits

> [!NOTE]
>
> Read-only. Needs `read`. MCP: `list` with `type``prospect_audit`.

The account's audits, newest first. `limit` is 1 to 100 (default 100); anything else is a `400`.

```json theme={null}
{
  "prospect_audits": [
    {
      "id": "pa_3f0c…",
      "domain": "example.com",
      "brand_name": "Example",
      "state": "ready",
      "reason": null,
      "stages": [
        {"stage": "draft", "state": "done", "reason": null, "will_retry": false, "attempts": 1},
        {"stage": "questions", "state": "done", "reason": null, "will_retry": false, "attempts": 1},
        {"stage": "read", "state": "done", "reason": null, "will_retry": false, "attempts": 1}
      ],
      "brand_book": [{"group": "company", "key": "what_you_do", "label": "What you do", "value": "Invoicing for freelancers", "source_url": "https://example.com/"}],
      "competitors": [{"name": "Rival", "domain": "rival.com"}],
      "questions": [
        {"text": "best invoicing tool for freelancers", "verdict": "mentioned", "rag": "amber",
         "engines": [{"platform": "chatgpt", "verdict": "mentioned", "rag": "amber"}]}
      ],
      "totals": {"recommended": 0, "mentioned": 1, "absent": 0, "not_read": 0},
      "platforms": ["chatgpt"],
      "read_at": "2026-10-30T12:04:00Z",
      "share_token": "9c1e…",
      "workspace_id": null,
      "converted_at": null,
      "created_at": "2026-10-30T12:00:00Z",
      "updated_at": "2026-10-30T12:04:00Z"
    }
  ]
}
```

| Field | Notes |
| - | - |
| `state` | `running`, `ready`, `partial` or `failed`. `reason` is the sentence for the first stage that did less than a full run, else `null` |
| `stages` | `draft`, `questions` and `read`, in order. `state` is `pending` (not started), `running`, `done`, `partial` or `failed`; `will_retry` is `true` while a failed stage waits to be retried by itself |
| `brand_book` | The drafted values, each with the page it was read from |
| `questions` | At most 50. `verdict` is `recommended`, `mentioned`, `absent` or `not_read`, and `null` before the read. `rag` is `green`, `amber`, `red`, or `null` for `not_read` |
| `platforms` | The engines the questions were read on, once each |
| `share_token` | Opens `GET /v1/public/prospect_audits/{token}` |
| `workspace_id`, `converted_at` | The client workspace the audit became, once converted |

### GET /v1/prospect\_audits/\{id}

> [!NOTE]
>
> Read-only. Needs `read`. MCP: `get` with `attensira://{workspace}/prospect_audit/{id}`.

One audit, in the shape above. Another account's audit is a `404`.

### POST /v1/prospect\_audits/\{id}/convert

> [!NOTE]
>
> Needs `steer` and a `spend` scope, and a balance that is not spent. MCP: `act` with action `convert`. Spends credits: the new workspace's questions are read from its first run onward.

Creates one client workspace in the account for the audit's domain, seeded with the Brand Book draft (as drafts, never over a value), the rivals (as candidates) and the questions (first in its starting questions, word for word). Answers `201` the first time and `200` with the same workspace on every repeat. When the account already has a workspace for the domain, the audit becomes that one. An existing plan or a workspace waiting for payment is never a `409` here. While the audit is still choosing its questions it is a `409` `state_conflict`, and nothing is created.

```json theme={null}
{"workspace_id": "665f…", "created": true, "prospect_audit": { … }}
```

### GET /v1/public/prospect\_audits/\{token}

> [!NOTE]
>
> No key. Read-only.

The audit behind a share token, branded as the account that ran it: `{branding: {name, logo_url, color, white_label}, domain, brand_name, state, brand_book, competitors, questions, totals, platforms, read_at, created_at}`. No ids. An unknown token is a `404`; opening one link too often is a `429` with `retry_after`.

***

## Proposals, topics, skills and sharing

The REST twins of the MCP tools that were MCP-only until 2026-10-25. Each sends the same call the tool does, so it answers the way the tool does. A proposal changes nothing on its own: it files an item to the Inbox for a person to approve. Send `Idempotency-Key` on the markets and brand-family proposals to make a retry safe.

| Endpoint | Tool | Body |
| - | - | - |
| `POST /v1/markets/proposals` | `propose_markets` | `markets` (required, the whole list after the change, primary first: `[{country, language?}]`), `engines`, `topic_ids`, `evidence` (required, one line each), `confirm_over_allowance` |
| `POST /v1/brand-family/proposals` | `propose_brand_properties` | `properties` (required): `[{kind: domain, subdomain, product or sub_brand, domain or name, evidence}]`. Never a competitor |
| `POST /v1/inbox/{id}/put-live` | `put_live` | `url`, or none for the item's suggested URL |
| `POST /v1/inbox/{id}/shipped` | `mark_work_item_shipped` | `url` (required): where you published it |
| `POST /v1/plan/proposals` | `propose_plan_change` | At least one of `monthly_budget_usd`, `cap_usd`, `auto_topup_enabled`. Raising spend is a person's decision, so this only proposes |
| `POST /v1/company-profile/proposals` | `propose_company_profile_edit` | `edits` (required): field id to value |
| `PATCH /v1/skills/{id}` | `update_skill` | At least one of `title`, `description`, `body`, `kind`, `enabled` |
| `DELETE /v1/skills/{id}` | `delete_skill` | None |
| `POST /v1/topics` | `create_topic` | `name` (required), `platforms`, `country` (two letters) |
| `PATCH /v1/topics/{id}` | `rename_topic` | `name` (required) |
| `POST /v1/topics/{id}/merge` | `merge_topics` | `into_topic_id` (required) |
| `POST /v1/topics/{id}/move-prompts` | `move_prompts_to_topic` | `prompt_ids` (required), `topic_id` |
| `POST /v1/work-areas` | `propose_project` | `proposal_id` or `proposal` |
| `POST /v1/reports/{id}/share` | `share_report` | None. `expires_in_days` is accepted and ignored: every report link lasts 180 days. Answers `{url, expires_at, expires_in_days}`, `url` being an `/r/<token>` [shared link](#shared-links) |

The reads that were MCP-only are the object and view reads: `GET /v1/objects/market`, `GET /v1/objects/brand_family`, `GET /v1/objects/plan`, `GET /v1/objects/company_profile`, `GET /v1/objects/skill`, `GET /v1/objects/connector`, `GET /v1/objects/topic`, `GET /v1/views/state_grid` and `GET /v1/views/markets_preview`.


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