# Guard

URL: /business/nouns/guard · Id: `noun:guard`

> A Guard is a check every outbound Message and publish passes, from code rules to model review to a Human for high stakes.

A Guard is a check every outbound [Message](/business/nouns/message) and publish passes, from code rules to model review to a [Human](/business/nouns/human) for high stakes.

## Properties
| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `tier` | `string` | Yes | One of `code`, `model`, `reviewer`, or `human`. |
| `checks` | `string` | No | What it refuses; a `claim` Guard checks a stated term or promise against the record that backs it. Never randomized. |

## Object
```json
{
  "$id": "https://api.sb/shiftnote.app/guards/guard_1",
  "$type": "Guard",
  "tier": "code",
  "checks": "tone"
}
```

## Relationships
- <a id="rel-screens"></a>A Guard **screens** many [Messages](/business/nouns/message): Guards check every outbound [Message](/business/nouns/message) before it goes out. `screens`, inverse [`screenedBy`](/business/nouns/message#rel-screened-by).

## Verbs
| Verb | Description | Subject | Event | Class |
| --- | --- | --- | --- | --- |
| <a id="create"></a>[Guard.create](/business/nouns/guard/create) | Creates a Guard. Inherited from [Noun](/business/nouns/noun). | None. | `Guard.created` | Two-way: `try`, `send`, `do` |
| <a id="get"></a>[Guard.get](/business/nouns/guard/get) | Returns one Guard by id. Inherited from [Noun](/business/nouns/noun). | None. | None. | Read: `try`, `do` |
| <a id="list"></a>[Guard.list](/business/nouns/guard/list) | Returns Guards, newest first, one page at a time. Inherited from [Noun](/business/nouns/noun). | None. | None. | Read: `try`, `do` |
| <a id="update"></a>[Guard.update](/business/nouns/guard/update) | Changes the given properties of a Guard. Inherited from [Noun](/business/nouns/noun). | None. | `Guard.updated` | Two-way: `try`, `send`, `do` |
| <a id="delete"></a>[Guard.delete](/business/nouns/guard/delete) | Deletes a Guard; its history is kept. Inherited from [Noun](/business/nouns/noun). | None. | `Guard.deleted` | One-way: `send`, `do` |

## Permissions
Which Access level may call each Verb. One-way Verbs wait their delay window.

| Operation | `owner` | `admin` | `member` | `viewer` |
| --- | --- | --- | --- | --- |
| `Guard.create` | Yes | Yes | No | No |
| `Guard.get` | Yes | Yes | Yes | Yes |
| `Guard.list` | Yes | Yes | Yes | Yes |
| `Guard.update` | Yes | Yes | No | No |
| `Guard.delete` | Yes | Yes | No | No |

## Call it

**Ask**

```text
Add a guard to RouteWise.
```

**API**

```bash
curl -X POST https://api.sb/routewise.dev/guards \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tier":"code"}'
```

```json
{
  "api": "https://api.sb/routewise.dev",
  "guard": {
    "$id": "https://api.sb/routewise.dev/guards/guard_1",
    "$type": "Guard",
    "tier": "code"
  },
  "action": {
    "$id": "https://api.sb/routewise.dev/actions/action_1",
    "operation": "Guard.create",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/routewise.dev/actions/action_1"
  }
}
```

**SDK**

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

const guard = await $.Guard.create({ tier: 'code' })
```

**CLI**

```bash
npx startup-builder do Guard.create --json '{"tier":"code"}'
```

**MCP**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Guard.create({ tier: 'code' })"
  }
}
```

## Example
A Guard blocks a sales email that promises "guaranteed 100% accuracy," because the [Offer](/business/nouns/offer) warrants 99.5%. The [Agent](/business/nouns/agent) rewrites it before it sends.