# Startup Template routes: update, delete

URL: /code/api/startup-template/records-update · Id: `page:code/api/startup-template/records-update`

> The Startup Template Verbs update, delete as api.sb routes, with inputs, result, refusals and an example.

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

### StartupTemplate.update
Changes the given properties of a Startup Template. [Verb page](/business/nouns/startup-template/update?interface=api).

```text
PATCH /{namespace}/startup-templates/{id}
```

Path: `id`. Body, as JSON: the other inputs. Emits `StartupTemplate.updated`.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Startup Template. |
| `slug` | `string` | No | The argument to `create --template` and the page path under `/start/templates`. |
| `operatingModel` | `string` | No | The human and Agent mix: `autonomous`, `single-human`, or `multi-human`. |
| `motions` | `string[]` | No | The Motions its Offers sell through, such as `b2b` or `b2a`. |
| `extends` | [Startup Template](/business/nouns/startup-template) | No | The base Startup Template whose Product Templates, Systems, Processes, and Roles it inherits. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `startupTemplate` | [Startup Template](/business/nouns/startup-template) | Yes | The Startup Template. |

**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. | None. |

**Example**

```bash
curl -X PATCH https://api.sb/leaseline.app/startup-templates/stpl_9OivLWR17L \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"slug":"leaseline"}'
```

```json
{
  "api": "https://api.sb/leaseline.app",
  "startupTemplate": {
    "$id": "https://api.sb/leaseline.app/startup-templates/stpl_9OivLWR17L",
    "$type": "StartupTemplate",
    "slug": "leaseline",
    "operatingModel": "autonomous",
    "motions": [
      "Example motions"
    ]
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "StartupTemplate.update",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```

### StartupTemplate.delete
Deletes a Startup Template: a soft delete that keeps its history, undone by `Thing.restore`. [Verb page](/business/nouns/startup-template/delete?interface=api).

```text
DELETE /{namespace}/startup-templates/{id}
```

Path: `id`. Emits `StartupTemplate.deleted`.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Startup Template. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `startupTemplate` | [Startup Template](/business/nouns/startup-template) | Yes | The Startup Template. |

**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. | None. |

**Example**

```bash
curl -X DELETE https://api.sb/leaseline.app/startup-templates/stpl_9OivLWR17L \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
```

```json
{
  "api": "https://api.sb/leaseline.app",
  "startupTemplate": {
    "$id": "https://api.sb/leaseline.app/startup-templates/stpl_9OivLWR17L",
    "$type": "StartupTemplate",
    "slug": "leaseline",
    "operatingModel": "autonomous",
    "motions": [
      "Example motions"
    ]
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "StartupTemplate.delete",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```