> ## Documentation Index
> Fetch the complete documentation index at: https://docs.axiomancer.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Monitoring

> Four endpoints to register, list, update, and delete monitored Locus locations — with score-change alerts and configurable threshold notifications.

## `GET` `/api/monitors`

<Note>Requires Bearer token.</Note>

List your monitored locations.

**Example**

```bash theme={null}
curl "https://axiomlocus.io/api/monitors" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

**Response**

```json theme={null}
{
  "monitors": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "Mission District HQ",
      "lat": 37.7599,
      "lng": -122.4148,
      "created_at": "2025-12-01T08:00:00Z"
    }
  ]
}
```

| Field             | Type   | Description                          |
| ----------------- | ------ | ------------------------------------ |
| `monitors`        | array  | Array of monitored location objects. |
| `monitors[].id`   | uuid   | Unique monitor identifier.           |
| `monitors[].name` | string | User-provided location name.         |
| `monitors[].lat`  | float  | Latitude.                            |
| `monitors[].lng`  | float  | Longitude.                           |

## `POST` `/api/monitors`

<Note>Requires Bearer token.</Note>

Add a new monitored location.

**Request body**

```json theme={null}
{
  "name": "Mission District HQ",
  "lat": 37.7599,
  "lng": -122.4148
}
```

| Field  | Type   | Required | Default | Description                         |
| ------ | ------ | -------- | ------- | ----------------------------------- |
| `name` | string | ✓        |         | A name for this monitored location. |
| `lat`  | float  | ✓        |         | Latitude.                           |
| `lng`  | float  | ✓        |         | Longitude.                          |

**Example**

```bash theme={null}
curl -X POST "https://axiomlocus.io/api/monitors" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{"name":"Mission District HQ","lat":37.7599,"lng":-122.4148}'
```

**Response**

```json theme={null}
{
  "monitor": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Mission District HQ",
    "lat": 37.7599,
    "lng": -122.4148,
    "user_id": "...",
    "created_at": "2025-12-01T08:00:00Z"
  }
}
```

| Field     | Type   | Description                       |
| --------- | ------ | --------------------------------- |
| `monitor` | object | The newly created monitor object. |

## `DELETE` `/api/monitors`

<Note>Requires Bearer token.</Note>

Remove a monitored location.

**Query parameters**

| Name | Type | Required | Default | Description               |
| ---- | ---- | -------- | ------- | ------------------------- |
| `id` | uuid | ✓        |         | The monitor ID to delete. |

**Example**

```bash theme={null}
curl -X DELETE "https://axiomlocus.io/api/monitors?id=550e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

**Response**

```json theme={null}
{
  "success": true
}
```

| Field     | Type    | Description                     |
| --------- | ------- | ------------------------------- |
| `success` | boolean | Whether the deletion succeeded. |

## `GET` `/api/alerts/history`

<Note>Requires Bearer token.</Note>

View alert history for your monitored locations.

**Example**

```bash theme={null}
curl "https://axiomlocus.io/api/alerts/history" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

**Response**

```json theme={null}
{
  "alerts": [
    {
      "id": "a1b2c3d4",
      "monitor_id": "550e8400-...",
      "type": "score_change",
      "message": "Composite score dropped from 78 to 65",
      "created_at": "2025-12-15T14:30:00Z"
    }
  ]
}
```

| Field              | Type   | Description                                       |
| ------------------ | ------ | ------------------------------------------------- |
| `alerts`           | array  | Array of alert history objects.                   |
| `alerts[].type`    | string | Alert type (score\_change, source\_change, etc.). |
| `alerts[].message` | string | Human-readable alert description.                 |
