# Startup routes: launch, sell

URL: /code/api/startup/lifecycle-launch · Id: `page:code/api/startup/lifecycle-launch`

> The Startup Verbs launch, sell as api.sb routes, with inputs, result, refusals and an example.

Reference for [Startup](/business/nouns/startup), one group of [Startup routes](/code/api/startup).

### Startup.launch
Launch puts a Startup live on its domain, serving its Offers to Customers. [Verb page](/business/nouns/startup/launch?interface=api).

```text
POST /{namespace}/startups/{startup}/launch
```

Path: `startup`. Emits [`Startup.launched`](/business/events/Startup.launched).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `startup` | [Startup](/business/nouns/startup) | Yes | The Startup to launch. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `startup` | [Startup](/business/nouns/startup) | Yes | The Startup, now live. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| Offers published (`live-offers`) | [`refused`](/code/api/errors/refused) | Publish an Offer with a price and terms. | [Offer.publish](/business/nouns/offer/publish) |
| Work defined (`live-work`) | [`refused`](/code/api/errors/refused) | Give every published Offer a Workflow with each step assigned. | [Workflow.create](/business/nouns/workflow/create) |
| People assigned (`live-people`) | [`refused`](/code/api/errors/refused) | Seat an Agent or a person in every Role the Workflows need. | [Role.staff](/business/nouns/role/staff) |
| Site published (`live-site`) | [`refused`](/code/api/errors/refused) | Publish the home, pricing, terms, and privacy Pages. | [Version.deploy](/business/nouns/version/deploy) |
| Test run passed (`live-test-run`) | [`refused`](/code/api/errors/refused) | Have a sample Customer accept every published Offer in test. | [Offer.accept](/business/nouns/offer/accept) |
| Portal ready (`live-portal`) | [`refused`](/code/api/errors/refused) | Build the Startup so the Portal serves every Customer record. | [Startup.build](/business/nouns/startup/build) |
| Agent API open (`live-agent-api`) | [`refused`](/code/api/errors/refused) | Build the Startup and fix each conformance failure it names. | [Startup.build](/business/nouns/startup/build) |
| Payouts connected (`live-payouts`) | [`refused`](/code/api/errors/refused) | Have a person claim the Startup and finish payouts onboarding. | [Startup.claim](/business/nouns/startup/claim) |
| Address resolves (`live-address`) | [`refused`](/code/api/errors/refused) | Connect the Domain, wait for its certificate, and check `walletsEnabled`. | [Domain.connect](/business/nouns/domain/connect) |
| Proof people want it (`live-slots`) | [`refused`](/code/api/errors/refused) | Run the cheapest test on each slot below Commitment, such as a fake door on the reserve page. | [Experiment.start](/business/nouns/experiment/start) |
| Sources secured (`live-sources`, [Dataset API](/products/templates/dataset-api), [Directory](/products/templates/directory) only) | [`refused`](/code/api/errors/refused) | Record a licensed, crawled, or synthetic Source for every Dataset. | [Source.create](/business/nouns/source/create) |
| Evals passing (`live-evals`, [Agent as a Service](/products/templates/agent-as-a-service) only) | [`refused`](/code/api/errors/refused) | Run the Evals again after fixing each failing task type. | [Action.evaluate](/business/nouns/action/evaluate) |
| SLA published (`live-sla`, [Services-as-Software](/products/templates/services-as-software), [E2E managed service](/products/templates/managed-service) only) | [`refused`](/code/api/errors/refused) | State the outcome, the SLA, and the remedy on every service Offer. | [Offer.publish](/business/nouns/offer/publish) |
| Supply seeded (`live-supply`, [Marketplace](/products/templates/marketplace), [Licensed-human marketplace](/products/templates/licensed-marketplace) only) | [`refused`](/code/api/errors/refused) | Onboard the first Suppliers and have each accept the supplier terms. | [Human.onboard](/business/nouns/human/onboard) |
| Credentials verified (`live-credentials`, [Licensed-human marketplace](/products/templates/licensed-marketplace) only) | [`refused`](/code/api/errors/refused) | Verify a current credential for each Supplier in each jurisdiction served. | [Credential.verify](/business/nouns/credential/verify) |
| Human steps staffed (`live-human-loop`, [E2E managed service](/products/templates/managed-service) only) | [`refused`](/code/api/errors/refused) | Seat a person in every human delivery step, with a response time. | [Role.staff](/business/nouns/role/staff) |
| 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. | None. |

**Example**

```bash
curl -X POST https://api.sb/leaseline.app/startups/startup_l3hr1EnUGY/launch \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
```

```json
{
  "api": "https://api.sb/leaseline.app",
  "startup": {
    "$id": "https://api.sb/leaseline.app/startups/startup_l3hr1EnUGY",
    "$type": "Startup",
    "name": "Leaseline"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Startup.launch",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```

### Startup.sell
Sell transfers a Startup, with its Customers, Domains and records, to a buyer under a signed Agreement. [Verb page](/business/nouns/startup/sell?interface=api).

```text
POST /{namespace}/startups/{startup}/sell
```

Path: `startup`. Body, as JSON: the other inputs. Emits [`Startup.sold`](/business/events/Startup.sold).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `startup` | [Startup](/business/nouns/startup) | Yes | The Startup to sell. |
| `agreement` | [Agreement](/business/nouns/agreement) | Yes | The signed sale Agreement. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `startup` | [Startup](/business/nouns/startup) | Yes | The Startup, held by the buyer. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| Own Domain (`sell-domain`) | [`refused`](/code/api/errors/refused) | Move each Domain into the Startup’s own registrar account and wait out any transfer lock; the account then moves whole at closing. | [Domain.transfer](/business/nouns/domain/transfer) |
| Own payments account (`sell-payments`) | [`refused`](/code/api/errors/refused) | Move payments to a Stripe account the Startup holds alone. | [Startup.claim](/business/nouns/startup/claim) |
| Agreements transfer (`sell-agreements`) | [`refused`](/code/api/errors/refused) | Sign assignable terms for each Agreement that names the Startup. | [Agreement.sign](/business/nouns/agreement/sign) |
| Data exports (`sell-export`) | [`refused`](/code/api/errors/refused) | Import the latest export into an empty namespace and compare the replayed state. | [Startup.import](/business/nouns/startup/import) |
| No shared credentials (`sell-credentials`) | [`refused`](/code/api/errors/refused) | Replace every shared key or login with one the Startup holds alone. | None. |
| Sale agreed (`sell-agreed`) | [`refused`](/code/api/errors/refused) | A signed sale agreement names the buyer and schedules the transfer of Brand, domain, Customers, and records. | None. |
| The input does not match the schema of the operation. | [`invalid-input`](/code/api/errors/invalid-input) | Read the schema of the operation, then send every required field with the right type. | None. |
| 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. | None. |

**Example**

```bash
curl -X POST https://api.sb/leaseline.app/startups/startup_l3hr1EnUGY/sell \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"agreement":"agreement_zHIUnX8LwY"}'
```

```json
{
  "api": "https://api.sb/leaseline.app",
  "startup": {
    "$id": "https://api.sb/leaseline.app/startups/startup_l3hr1EnUGY",
    "$type": "Startup",
    "name": "Leaseline"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Startup.sell",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```