# convert

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

> Convert ends a qualified Lead’s pursuit as a Lead: it opens a Deal or routes the Lead to self-serve checkout.

Convert ends a qualified [Lead](/business/nouns/lead)’s pursuit as a Lead: it opens a [Deal](/business/nouns/deal) or routes the Lead to self-serve checkout.

## Inputs
| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `lead` | [Lead](/business/nouns/lead) | Yes | The qualified Lead. |
| `offer` | [Offer](/business/nouns/offer) | Yes | The Offer the Deal pursues, or the checkout sells. |
| `route` | `string` | Yes | Where the Lead goes: `deal` for an assisted sale or `checkout` for self-serve. |

## Outputs
| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `deal` | [Deal](/business/nouns/deal) | No | The opened Deal, when the route is `deal`. |
| `lead` | [Lead](/business/nouns/lead) | Yes | The Lead, now converted. |

## Effects
- Emits [`Lead.converted`](/business/events/Lead.converted).
- Performed by the [Sales Lead](/agents/sales/sales-lead).
- Two-way: it runs at once, in the `try`, `send` and `do` modes.
- Moves the Lead to `converted` and keeps its Acquisition on the Deal and the later Customer.

## 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. | [Lead.convert](/business/nouns/lead/convert) |

## 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
Convert the latest lead with an offer.
```

**API**

```bash
curl -X POST https://api.sb/shiftnote.app/leads/lead_1/convert \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"offer":"offer_1","route":"Example route"}'
```

```json
{
  "api": "https://api.sb/shiftnote.app",
  "deal": {
    "$id": "https://api.sb/shiftnote.app/deals/deal_1",
    "$type": "Deal",
    "status": "Open"
  },
  "lead": {
    "$id": "https://api.sb/shiftnote.app/leads/lead_1",
    "$type": "Lead",
    "status": "converted"
  },
  "action": {
    "$id": "https://api.sb/shiftnote.app/actions/action_1",
    "operation": "Lead.convert",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/shiftnote.app/actions/action_1"
  }
}
```

**SDK**

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

const { deal, lead } = await $.Lead.convert({ lead: 'lead_1', offer: 'offer_1', route: 'Example route' })
```

**CLI**

```bash
npx startup-builder do Lead.convert --json '{"lead":"lead_1","offer":"offer_1","route":"Example route"}'
```

**MCP**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Lead.convert({ lead: 'lead_1', offer: 'offer_1', route: 'Example route' })"
  }
}
```