---
title: "Pause, change speed or advance the team world"
method: POST
path: "/api/clock"
tags: ["Simulation time"]
---

# Pause, change speed or advance the team world

`POST /api/clock`

## Request

- Base URL: `https://sim.animahealth.com`
- URL: `https://sim.animahealth.com/api/clock`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
  - API key in cookie `sim_session`

A real mutation of the current simulation world. Manual advance requires paused:true (set it in the same request if needed); otherwise 409. Advancing time executes due jobs. Clock events and visible action events are returned here; there is no separate event-stream endpoint.

## Query parameters

- `world` string

## Request body

- object
  - `paused` boolean
  - `speed` number
  - `advanceMinutes` number

## Response `200`

Success

- Clock
  - `now` number, required: Simulation Unix timestamp in milliseconds.
  - `paused` boolean, required
  - `speed` number, required
  - `events` Event[], required
    - `id` string, required
    - `time` number, required: Simulation Unix timestamp in milliseconds.
    - `type` string, required
    - `actor` string, required
    - `resourceId` string
    - `patientId` string
    - `detail` string, required
    - `visibleTo` string[], required

## Other responses

- `400`: Invalid input or unsupported workflow
- `401`: Missing or invalid credentials
- `403`: Scope, origin or operator restriction
- `404`: Unknown resource
- `409`: Stale version, invalid transition or unavailable capacity
- `413`: Request exceeds this operation's body-size limit
- `429`: Deployment has reached its 5,000-team capacity
- `500`: Internal simulation error

---

[API](https://skmtc.dev/animahealth/apis/nhs-sim-api.md) - [All operations](https://skmtc.dev/animahealth/apis/nhs-sim-api/llms.txt) - [OpenAPI document](https://skmtc.dev/animahealth/apis/nhs-sim-api/revisions/c7803d7a3e58?raw)
