# publish

URL: /business/nouns/site/publish · Id: `verb:Site.publish` · Call: `await $.Site.publish({ … })` (SDK) or the `do` tool at `https://api.sb/mcp`. Inputs says what to pass, Outputs what returns, When it waits who approves.

> Publish puts a Site’s current Pages live on its Domains, under its Brand.

Publish puts a [Site](/business/nouns/site)’s current [Pages](/business/nouns/page) live on its [Domains](/business/nouns/domain), under its [Brand](/business/nouns/brand).

## Inputs
| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `site` | [Site](/business/nouns/site) | Yes | The Site to publish. |

## Outputs
| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `site` | [Site](/business/nouns/site) | Yes | The Site, now live. |

## Effects
- Emits [`Site.published`](/business/events/Site.published).
- Performed by the [Designer](/agents/product/designer).
- Keeps the previous Pages, so a `revert` restores them.

## Refuses when
| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | [Site.publish](/business/nouns/site/publish) |
| The record is not in a state that allows this Verb, so the call is refused. | [`refused`](/code/api/errors/refused) | Read the record, run the Verb that moves it to an allowed state, then retry. | [Site.publish](/business/nouns/site/publish) |

## When it waits
| Gate | Default |
| --- | --- |
| Decision class | Medium: two-way, visible |
| [Delay window](/systems/trust-and-governance/controls/one-way-windows) | 1 business hour, in which a watcher can pause, redirect or cancel it; then it runs. |
| Limit | The call [Limit](/business/nouns/limit) of the [Permission](/business/nouns/permission) it runs under. |
| Over the Limit | It waits `pending` for an [Approval](/business/nouns/approval) from the [Founder](/agents/founding/founder). Approved, it runs; refused, it ends `refused` with [`limit-exceeded`](/code/api/errors/limit-exceeded); unanswered by its deadline, it ends `canceled`. |

## Example

**Ask**

```text
Publish the site “Algebra session”.
```

**API**

```bash
curl -X POST https://api.sb/tutorloop.com/sites/site_1/publish \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
```

```json
{
  "api": "https://api.sb/tutorloop.com",
  "site": {
    "$id": "https://api.sb/tutorloop.com/sites/site_1",
    "$type": "Site",
    "kind": "api"
  },
  "action": {
    "$id": "https://api.sb/tutorloop.com/actions/action_1",
    "operation": "Site.publish",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/tutorloop.com/actions/action_1"
  }
}
```

**SDK**

```ts
import { $ } from 'startup-builder'

const site = await $.Site.publish({ site: 'site_1' })
```

**CLI**

```bash
npx startup-builder do Site.publish --json '{"site":"site_1"}'
```

**MCP**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Site.publish({ site: 'site_1' })"
  }
}
```

Guides that call it: [Find out if anyone wants this](/start/guides/find-out-if-anyone-wants-this), [Put up a page](/start/guides/put-up-a-page).