# update

URL: /business/nouns/integration/update · Id: `verb:Integration.update` · Call: `await $.Integration.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 an Integration.

Update changes the given properties of an [Integration](/business/nouns/integration). 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 Integration. |
| `acquired` | `string` | No | One of `owned`, `wrapped`, or `recruited`. |
| `terms` | `text` | No | The terms the Startup holds the right to use and resell it under. |
| `scope` | `string` | No | One of `studio`, `startup`, or `customer`. |
| `sync` | `string` | No | Which side leads a sync connector: `platform` or `provider`. |
| `mode` | `string` | No | How records move: `mirror` writes db.sb out to the outside tool; `import` turns edits there into Changes. db.sb is the record in both. |
| `venue` | `string` | No | The id of the ad, social or app-store venue the account is on, when it is on one. |
| `account` | `string` | No | The outside account’s own id, such as an ad account, a workspace or a repository. |
| `grants` | `string[]` | No | The outside permissions the account holder approved: the narrowest set its Verbs need. |
| `connectedBy` | [Party](/business/nouns/party) | No | Who approved the connection; a Human’s own account is used only under that Human’s Mandate. |
| `environment` | `string` | No | A `test` Integration reaches only the upstream’s test account, as a Stripe test account does. |
| `expiresAt` | `datetime` | No | When access lapses unless refreshed. |
| `refreshedAt` | `datetime` | No | When the platform last renewed the outside token. |
| `lastError` | `string` | No | The error slug of the last failed call or refresh, cleared by the next success. |
| `cursor` | `string` | No | Where the last sync run stopped, so the next run reads only what changed. |

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

## Effects
- Emits `Integration.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. | [Integration.update](/business/nouns/integration/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 integration.
```

**API**

```bash
curl -X PATCH https://api.sb/patentpad.com/integrations/integration_1 \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"scope":"studio"}'
```

```json
{
  "api": "https://api.sb/patentpad.com",
  "integration": {
    "$id": "https://api.sb/patentpad.com/integrations/integration_1",
    "$type": "Integration",
    "acquired": "owned",
    "scope": "studio",
    "mode": "mirror",
    "state": "connecting"
  },
  "action": {
    "$id": "https://api.sb/patentpad.com/actions/action_1",
    "operation": "Integration.update",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/patentpad.com/actions/action_1"
  }
}
```

**SDK**

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

const integration = await $.Integration.update({ id: 'integration_1', scope: 'studio' })
```

**CLI**

```bash
npx startup-builder do Integration.update --json '{"id":"integration_1","scope":"studio"}'
```

**MCP**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Integration.update({ id: 'integration_1', scope: 'studio' })"
  }
}
```