# Get maintenance mode

> The platform.maintenance.get operation: GET /api/v1/platform/maintenance in the REST API and the platform_maintenance_get tool in the MCP server.

Whether maintenance mode is on (docs/runbooks/restore-drill.md), and who switched it last, when and why. While
it is on, every request answers `503` with `Retry-After` (except the health endpoint and the platform
console's maintenance page) and the job runner does nothing. Platform admins and support staff.

## At a glance

- **REST:** `GET /api/v1/platform/maintenance`
- **MCP tool:** `platform_maintenance_get`
- **Operation ID:** `platform.maintenance.get`
- **Scope:** Platform
- **Permission:** `platform:read`
- **Risk tier:** `read`
- **Dry run:** Not supported
- **Idempotency:** Not needed (read only)
- **Modes:** Test and live
- **Authentication:** API key with the `platform:read` scope
- **Since:** M13

## Request

### Query parameters

This operation takes no query parameters.

## Response

`200 OK` with a JSON object:

| Field               | Type                     | Description                                                     |
| ------------------- | ------------------------ | --------------------------------------------------------------- |
| `object`            | `"platform_maintenance"` |                                                                 |
| `on`                | boolean                  | While on, requests answer 503 and job runner passes do nothing. |
| `reason`            | string or null           | Why it was last switched.                                       |
| `since`             | date-time or null        | When it was last switched (null: never).                        |
| `by`                | string or null           | Who switched it last: a user (`usr_…`) or a system actor.       |
| `retryAfterSeconds` | integer                  | What `Retry-After` says to callers while it is on.              |

## Examples

### Off, after a restore drill

```http
GET /api/v1/platform/maintenance
Authorization: Bearer or_test_…
```

Response (`200`):

```json
{
  "object": "platform_maintenance",
  "on": false,
  "reason": "Restore finished and verified; production points at the restored cluster.",
  "since": "2026-11-03T09:00:00.000Z",
  "by": "usr_01m5wvkry1e6w94sjxgme33fsa",
  "retryAfterSeconds": 120
}
```

## Errors

| Code                                                                                   | HTTP status | When                                                                | What to do                                                                      |
| -------------------------------------------------------------------------------------- | ----------- | ------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| [`permission_denied`](https://ownrecord.io/docs/reference/errors.md#permission_denied) | 403         | You aren't platform staff with read access to the platform console. | Ask an organization owner or admin for a role or scope that allows this action. |

It can also return these [common errors](https://ownrecord.io/docs/reference.md#common-errors): [`validation_failed`](https://ownrecord.io/docs/reference/errors.md#validation_failed), [`api_version_unsupported`](https://ownrecord.io/docs/reference/errors.md#api_version_unsupported), [`authentication_required`](https://ownrecord.io/docs/reference/errors.md#authentication_required), [`api_key_invalid`](https://ownrecord.io/docs/reference/errors.md#api_key_invalid), [`resource_not_found`](https://ownrecord.io/docs/reference/errors.md#resource_not_found), [`dry_run_not_supported`](https://ownrecord.io/docs/reference/errors.md#dry_run_not_supported), [`rate_limited`](https://ownrecord.io/docs/reference/errors.md#rate_limited), [`internal_error`](https://ownrecord.io/docs/reference/errors.md#internal_error).
