# Get Playground lifecycle

```http
GET /api/public/v1/competitions/lean-kernel-challenge/playground/lifecycle
```

**Scope**: none. No authentication is required.

Returns the authoritative current Playground state and its configured time window. Read this before creating or changing a Solution, starting a Run, or publishing a Solution.

## Example request

```bash
curl \
  "https://api.sair.foundation/api/public/v1/competitions/lean-kernel-challenge/playground/lifecycle"
```

## Response fields

| Field | Type and meaning |
| :--- | :--- |
| `state` | `"not_started" \| "open" \| "read_only"` — Effective Playground state. |
| `opensAt` | `string` — Opening instant normalized to ISO 8601 UTC. |
| `closesAt` | `string` — Closing instant normalized to ISO 8601 UTC. |

`read_only` is returned after the deadline, when the Competition is not active, or when the Playground feature is disabled. Dates alone are not sufficient to determine write availability; use `state`.

## Example response

```json
{
  "ok": true,
  "data": {
    "state": "open",
    "opensAt": "2026-08-04T08:00:00Z",
    "closesAt": "2026-09-30T12:00:00Z"
  }
}
```

Successful responses use `Content-Type: application/json`.

## Errors

| HTTP | Code | When |
| :---: | :--- | :--- |
| `404` | `NOT_FOUND` | The Competition cannot be found. |
| `502` | `PLATFORM_UNAVAILABLE` | The authoritative Competition configuration cannot be read. |
| `502` | `PLAYGROUND_CONFIGURATION_INVALID` | Opening or closing time is missing, malformed, or reversed. |

See [Errors](../../../errors.md) for the standard error envelope.
