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

# Get clock sync status

> Check whether built-in host wall-clock sync is enabled and configurable inside a sandbox.

Query the current status of the sandbox daemon’s built-in wall-clock syncer. For details on how `CLOCK_MONOTONIC`, `CLOCK_BOOTTIME`, and `CLOCK_REALTIME` behave across suspend and resume, see [How clocks work in sandboxes](https://docs.tensorlake.ai/sandboxes/clocks.md).

## Example request

Set `SANDBOX_URL` to the `sandbox_url` returned by [Get Sandbox](https://docs.tensorlake.ai/api-reference/v2/sandboxes/get.md) and authenticate with your Tensorlake API key:

```bash theme={null}
curl "${SANDBOX_URL%/}/api/v1/clock-sync" \
  -H "Authorization: Bearer $TENSORLAKE_API_KEY"
```

This requests the current wall-clock sync status from the sandbox daemon with `Cache-Control: no-store`.

## Response fields

The response describes both whether host UTC syncing is active and whether this runtime lets you change it:

* **`enabled`**: `true` when host wall-clock syncing is active (including runtimes where the host clock is authoritative, such as gVisor), or `false` when disabled or unavailable
* **`configurable`**: `true` on VM sandboxes with `/dev/ptp0` (`KVM virtual PTP`) and `CAP_SYS_TIME`, or `false` when mutations are rejected with `501 Not Implemented`
* **`reason`**: present when `configurable` is `false` to explain why wall-clock sync can’t be toggled


## OpenAPI

````yaml get /api/v1/clock-sync
openapi: 3.1.0
info:
  title: Tensorlake API
  description: Tensorlake Cloud APIs for Sandboxes and Serverless Workflows
  license:
    name: ''
  version: 0.1.0
servers:
  - url: https://api.tensorlake.ai/
security:
  - bearerAuth: []
tags:
  - name: Tensorlake Cloud API
    description: Tensorlake Cloud APIs for Sandboxes and Serverless Workflows
paths:
  /api/v1/clock-sync:
    servers:
      - url: https://{identifier}.sandbox.tensorlake.ai
        description: >-
          Example sandbox proxy host for a specific running sandbox. For
          programmatic access, use the sandbox's `ingress_endpoint`.
        variables:
          identifier:
            default: example-sandbox
            description: The sandbox ID or sandbox name.
    get:
      tags:
        - sandbox-runtime
      summary: Get clock sync status
      description: |
        Read the current state of the sandbox daemon's built-in `CLOCK_REALTIME`
        wall-clock syncer. Use the `sandbox_url` returned by the sandbox API and
        authenticate with your Tensorlake API key.
      operationId: sandbox_runtime_get_clock_sync
      responses:
        '200':
          description: Current wall-clock sync status
          headers:
            Cache-Control:
              description: Status must not be cached.
              schema:
                type: string
                enum:
                  - no-store
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SandboxClockSyncStatus'
              example:
                enabled: true
                configurable: true
        '401':
          description: Unauthorized. Invalid or missing credentials
        '403':
          description: Forbidden. Your API key does not grant access to this sandbox
        '404':
          description: Sandbox not found
        '409':
          $ref: '#/components/responses/SandboxAutoResumeDisabled'
components:
  schemas:
    SandboxClockSyncStatus:
      type: object
      required:
        - enabled
        - configurable
      properties:
        enabled:
          type: boolean
          description: >-
            Whether host UTC wall-clock syncing is currently active. Always true
            on runtimes where the host clock is authoritative (such as gVisor).
        configurable:
          type: boolean
          description: >-
            Whether this runtime allows toggling wall-clock sync via PUT
            /api/v1/clock-sync or /run/tensorlake/guest.sock.
        reason:
          type: string
          description: Human-readable explanation present when configurable is false.
    SandboxProxyError:
      type: object
      required:
        - error
      properties:
        error:
          type: string
        code:
          type: string
  responses:
    SandboxAutoResumeDisabled:
      description: >-
        The sandbox is suspended and automatic resume is disabled. The proxy
        rejects the request without waking it. Explicitly resume before
        retrying, or PATCH auto_resume to true to allow subsequent traffic to
        wake it.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SandboxProxyError'
          example:
            error: >-
              Sandbox 'parked-agent' is suspended and automatic resume is
              disabled; resume it explicitly before sending traffic.
            code: SANDBOX_AUTO_RESUME_DISABLED
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.