# Reserved Act routes: update, delete

URL: /code/api/reserved-act/records-update · Id: `page:code/api/reserved-act/records-update`

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

Reference for [Reserved Act](/business/nouns/reserved-act), one group of [Reserved Act routes](/code/api/reserved-act).

### ReservedAct.update
Changes the given properties of a Reserved Act. [Verb page](/business/nouns/reserved-act/update?interface=api).

```text
PATCH /{namespace}/reserved-acts/{id}
```

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

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Reserved Act. |
| `jurisdiction` | `string` | No | Where the law reserves it. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `reservedAct` | [Reserved Act](/business/nouns/reserved-act) | Yes | The Reserved Act. |

**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/tutorloop.com/reserved-acts/reserved_PKPVsB1HFf \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jurisdiction":"US-DE"}'
```

```json
{
  "api": "https://api.sb/tutorloop.com",
  "reservedAct": {
    "$id": "https://api.sb/tutorloop.com/reserved-acts/reserved_PKPVsB1HFf",
    "$type": "ReservedAct",
    "jurisdiction": "US-DE"
  },
  "action": {
    "$id": "https://api.sb/tutorloop.com/actions/act_DEVhiF6mF5",
    "operation": "ReservedAct.update",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/tutorloop.com/actions/act_DEVhiF6mF5"
  }
}
```

### ReservedAct.delete
Deletes a Reserved Act: a soft delete that keeps its history, undone by `Thing.restore`. [Verb page](/business/nouns/reserved-act/delete?interface=api).

```text
DELETE /{namespace}/reserved-acts/{id}
```

Path: `id`. Emits `ReservedAct.deleted`.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Reserved Act. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `reservedAct` | [Reserved Act](/business/nouns/reserved-act) | Yes | The Reserved Act. |

**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/tutorloop.com/reserved-acts/reserved_PKPVsB1HFf \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
```

```json
{
  "api": "https://api.sb/tutorloop.com",
  "reservedAct": {
    "$id": "https://api.sb/tutorloop.com/reserved-acts/reserved_PKPVsB1HFf",
    "$type": "ReservedAct",
    "jurisdiction": "US-DE"
  },
  "action": {
    "$id": "https://api.sb/tutorloop.com/actions/act_DEVhiF6mF5",
    "operation": "ReservedAct.delete",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/tutorloop.com/actions/act_DEVhiF6mF5"
  }
}
```