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

# Open Campaigns

> Open the buyer's Campaigns Page — status, flight, and budget per campaign, opening one for its media buys and creatives

`open_campaigns_page` launches **Campaigns** — the buyer's campaign list with
status, flight, and budget on each row. Opening a row shows that campaign's
workspace: its media buys, creatives and their per-seller review status, and
for a draft campaign the [Review & go live](/v2/buyer/campaigns/tasks/open-campaign-receipt)
receipt.

It is a **widget launcher**: the tool returns the shared MCP App directive for
`ui://agentic-api/campaigns/mcp-app.html` plus the focus it was given, and the
Page self-fetches through V3 `search({kind: "campaign"})`,
`get({kind: "campaign"})`, and, when it needs the seeded header label,
`get({kind: "advertiser"})`. The host keeps these named reads bound to this
Page; it is buyer-only and read-only.

## Arguments

| Argument       | Required | Meaning                                                                                                                                                                                                                                    |
| -------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `advertiserId` | no       | Positive integer string. Scopes the list to one advertiser; the owner resolves the advertiser's name so the Page can label itself while it loads. Omit for every advertiser.                                                               |
| `campaignId`   | no       | Focuses one campaign. The owner reads it first, so an id this account cannot resolve is refused instead of opening a Page pointed at nothing. When the campaign is linked to an advertiser, the list is scoped to that advertiser as well. |

Resolve names to ids first with `search(kind: "advertiser")` or
`search(kind: "campaign")`; never invent an id.

## From an agent (MCP)

"Show my campaigns" opens the unscoped Page:

```json theme={null}
{
  "name": "open_campaigns_page",
  "arguments": {}
}
```

"How is the spring launch doing?" resolves the campaign, then focuses it:

```json theme={null}
{
  "name": "open_campaigns_page",
  "arguments": { "campaignId": "cmp_987654321" }
}
```

The result's `content` names what was opened — for example
`Opened Campaigns Page focused on "Spring launch" (active, managing); scoped to advertiser "Acme".`
— and `structuredContent.params` carries the seed the Page reads
(`advertiserId`, `advertiserName`, `campaignId`). When the focused campaign is
still a draft, the summary points at `open_campaign_receipt`.

## Text answers

For an answer in words — how many campaigns, which are paused, one campaign's
budget — use `search(kind: "campaign")` and `get(kind: "campaign", id)`
instead. The launcher never enumerates campaigns.

## Hosts without a widget surface

A host that cannot render MCP apps, such as Claude Code or a plain MCP client,
still receives the text result. When the launch is scoped to an advertiser,
that text ends with an `Open in the browser:` link that opens the same
Campaigns Page in Apostra chat for the account your API key belongs
to, focused on the launched campaign when there was one. The same URL is
available as `openInBrowserUrl` in the structured result. An unscoped launch
carries no link, because the hosted chat opens the Page for one advertiser, and
a seller account opening its own-supply or sponsored-buyer campaigns carries no
link either, because the buyer hosted chat does not model those scopes.

## Errors

| Code               | Meaning                                                                                                                                                  |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `WRONG_ACCOUNT`    | The active account is not a buyer account                                                                                                                |
| `VALIDATION_ERROR` | `advertiserId` is not a positive integer string, an unknown argument was supplied, or `campaignId` belongs to a different advertiser than `advertiserId` |
| `NOT_FOUND`        | `campaignId` or `advertiserId` cannot be resolved for this account                                                                                       |
