# update

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

> Changes the given properties of a Mapping.

Update changes the given properties of a [Mapping](/business/nouns/mapping). It is inherited: every [Noun](/business/nouns/noun) has `get`, `list`, `create`, `update` and `delete`.

## Inputs
| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Mapping. |
| `verb` | `string` | No | The Verb it serves, such as `Meeting.book`; a Verb has many Mappings, ranked. |
| `fields` | `json` | No | Each outside field or event and the Noun property or Event it maps to. |
| `direction` | `string` | No | `both` still keeps db.sb the record; the outside tool never becomes a second one. |
| `convert` | `text` | No | How a value changes on the way, such as cents to money or a picklist to closed values. |
| `rank` | `integer` | No | Order tried when the preferred Mapping fails or finds nothing; the Policy orders it by cost per accepted result. |
| `preferred` | `boolean` | No | True for the Mapping a Verb tries first. |
| `door` | `string` | No | How the outside endpoint is classed; an unclassed write is one-way and waits its delay window. |

## Outputs
| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `mapping` | [Mapping](/business/nouns/mapping) | Yes | The Mapping. |

## Effects
- Emits `Mapping.updated`.
- Two-way: `try`, `send`, `do`.

## 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. | [Mapping.update](/business/nouns/mapping/update) |

## When it waits
| Gate | Default |
| --- | --- |
| Decision class | Low: two-way, nothing at stake |
| [Delay window](/systems/trust-and-governance/controls/one-way-windows) | None: it runs once review passes. |
| 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
Change the latest mapping.
```

**API**

```bash
curl -X PATCH https://api.sb/patentpad.com/mappings/mapping_1 \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"verb":"Meeting.book"}'
```

```json
{
  "api": "https://api.sb/patentpad.com",
  "mapping": {
    "$id": "https://api.sb/patentpad.com/mappings/mapping_1",
    "$type": "Mapping",
    "verb": "Meeting.book",
    "fields": {}
  },
  "action": {
    "$id": "https://api.sb/patentpad.com/actions/action_1",
    "operation": "Mapping.update",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/patentpad.com/actions/action_1"
  }
}
```

**SDK**

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

const mapping = await $.Mapping.update({ id: 'mapping_1', verb: 'Meeting.book' })
```

**CLI**

```bash
npx startup-builder do Mapping.update --json '{"id":"mapping_1","verb":"Meeting.book"}'
```

**MCP**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Mapping.update({ id: 'mapping_1', verb: 'Meeting.book' })"
  }
}
```