# Monitor routes: update

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

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

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

### Monitor.update
Changes the given properties of a Monitor. [Verb page](/business/nouns/monitor/update?interface=api).

```text
PATCH /{namespace}/monitors/{id}
```

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

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Monitor. |
| `kind` | `string` | No | `internal` watches the Startup’s own routes and jobs; `outside` watches the world, such as a rival’s price. |
| `target` | `string` | No | What it checks: a route, a Domain, a Keyword, a prompt or a page. |
| `every` | `string` | No | How often it runs, such as `1m` or `1d`. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `monitor` | [Monitor](/business/nouns/monitor) | Yes | The Monitor. |

**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/monitors/monitor_8Ed0ESvvRl \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"kind":"internal"}'
```

```json
{
  "api": "https://api.sb/leaseline.app",
  "monitor": {
    "$id": "https://api.sb/leaseline.app/monitors/monitor_8Ed0ESvvRl",
    "$type": "Monitor",
    "kind": "internal",
    "target": "/health"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Monitor.update",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```