# Publish my terms and privacy policy

URL: /systems/legal-and-corporate/publish-my-terms-and-privacy-policy · Id: `guide:publish-my-terms-and-privacy-policy` · Status: `live`

> Say "publish my terms and privacy policy" and get terms of service and a privacy notice at /terms and /privacy, filled from your Offers.

Publish the terms every buyer accepts and the notice every visitor reads. Both are written from your [Offers](/business/nouns/offer) and the data your [Products](/business/nouns/product) store.

Needs: [Startup](/business/nouns/startup)

**Before it runs**

- You leave the chat: Never.
- What it costs: Nothing.
- To undo it: Publish a new Version. Each Customer keeps the Version they accepted.

## What you get
- 1 terms of service, accepted at checkout (Agreement)
- 1 privacy notice written from the data your Products store (Document)
- 2 pages at /terms and /privacy, for people and as Markdown for agents (Page)

## Your agent does
**For agents**

- Guide: `guide:publish-my-terms-and-privacy-policy`, status `live`. Page: [/systems/legal-and-corporate/publish-my-terms-and-privacy-policy.md](/systems/legal-and-corporate/publish-my-terms-and-privacy-policy.md).
- Approval: none. Run it when the founder asks.
- Leaves the chat: never.
- Needs first: [Startup](/business/nouns/startup).
- Run: call the steps in order, each through the API, SDK, CLI or MCP tab below; a later step passes the `$id` an earlier one returns. Each value marked example is the sample business’s: pass the founder’s own.

| Step | Verb | Inputs (type, required, this guide’s value) | Returns |
| --- | --- | --- | --- |
| 1 | [`Agreement.create`](/business/nouns/agreement/create) (`verb:Agreement.create`) | `term` text: example `"Example term"` | `agreement` Agreement |
| 2 | [`Document.create`](/business/nouns/document/create) (`verb:Document.create`) | `form` string, required: example `"document"` | `document` Document |
| 3 | [`Page.create`](/business/nouns/page/create) (`verb:Page.create`) | `path` string, required: example `"/terms"` | `page` Page |

Returns: the last call answers with `page` and its `action`, whose `status` is `done`, `pending` (waiting on an Approval or a Worker), `failed`, `canceled` or `refused`:

```json
{
  "api": "https://api.sb/leaseline.app",
  "page": {
    "$id": "https://api.sb/leaseline.app/pages/page_TOlQyOh9uX",
    "$type": "Page",
    "path": "/terms"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Page.create",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```

Next: offer “Add a 30-day refund policy”, or “Add a cookie notice for visitors in the EU”.

Calls: `Agreement.create` → `Document.create` → `Page.create`

Ask:

```text
Publish my terms and privacy policy.
Write my terms of service.
I need a privacy policy.
```

API:

```bash
# 1. Agreement.create
curl -X POST https://api.sb/leaseline.app/agreements \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"term":"Example term"}'

# 2. Document.create
curl -X POST https://api.sb/leaseline.app/documents \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"form":"document"}'

# 3. Page.create
curl -X POST https://api.sb/leaseline.app/pages \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"path":"/terms"}'
```

SDK:

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

await $.Agreement.create({ term: 'Example term' })
await $.Document.create({ form: 'document' })
await $.Page.create({ path: '/terms' })
```

CLI:

```bash
npx startup-builder do Agreement.create --json '{"term":"Example term"}'
npx startup-builder do Document.create --json '{"form":"document"}'
npx startup-builder do Page.create --json '{"path":"/terms"}'
```

MCP:

```json
{
  "name": "do",
  "arguments": {
    "code": "await $.Agreement.create({ term: 'Example term' })\nawait $.Document.create({ form: 'document' })\nreturn await $.Page.create({ path: '/terms' })"
  }
}
```

## Change it
- Add a 30-day refund policy.
- Add a cookie notice for visitors in the EU.
- Show me which Customers accepted the old terms.

## Under the hood
- Systems: [Terms and policies](/systems/terms-and-policies), [Privacy](/systems/privacy), [Sites](/products/site/sites)
- Nouns: [Agreement](/business/nouns/agreement), [Document](/business/nouns/document), [Purpose](/business/nouns/purpose), [Page](/business/nouns/page)
- Events: `Agreement.created`, `Document.created`, `Page.created`

The terms become an [Agreement](/business/nouns/agreement) when a buyer accepts them at checkout, and each publish is a [Version](/business/nouns/version). The same [Workflow](/business/nouns/workflow) runs once when the [Startup](/business/nouns/startup) is created, so the paper is ready before the first Offer ([how paper works](/systems/legal-and-corporate/paper)).