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

# Sync

> Manually force a device sync with the edits made in the dashboard.



## OpenAPI

````yaml /references/device-api/v0.3.0/api.yaml post /sync
openapi: 3.0.3
info:
  title: Miru Agent API
  description: >-
    The API between the Miru Agent and any external client living on the same
    device as the Miru Agent. On Linux the agent serves it over the Unix socket
    `/run/miru/miru.sock` with no authentication. Over loopback TCP, which is on
    by default on Windows at `127.0.0.1:6478`, every route requires
    `Authorization: Bearer <token>`. Clients read the port and token from the
    agent's discovery file, `%ProgramData%\Miru\device-api\device-api.json` on
    Windows; the token changes every time the agent starts.
  version: v0.3
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  x-release-version: v0.3.0
  x-git-commit:
    sha: 13ce9431f6c8183218bb62bcfe1d025852c08de6
    url: >-
      https://github.com/mirurobotics/openapi/commit/13ce9431f6c8183218bb62bcfe1d025852c08de6
    message: 'chore(device): bump the Device API version (#518)'
    author: Ben's Agent
    branch: HEAD
    dirty: false
  x-build:
    built_at: '2026-11-17T04:03:13.976979+00:00'
servers:
  - url: http://localhost/v0.3
    description: localhost
security:
  - {}
  - BearerAuth: []
paths:
  /sync:
    post:
      tags:
        - Agent
      summary: Sync
      description: Manually force a device sync with the edits made in the dashboard.
      operationId: sync
      responses:
        '200':
          description: Successfully synced the device.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SyncResponse'
      x-codeSamples:
        - lang: curl
          label: curl (Linux)
          source: |-
            curl \
              --unix-socket /run/miru/miru.sock \
              --request POST \
              --url http://localhost/v0.3/sync
        - lang: powershell
          label: PowerShell (Windows)
          source: >-
            $api = Get-Content -Raw
            "$env:ProgramData\Miru\device-api\device-api.json" |
            ConvertFrom-Json; `

            Invoke-RestMethod -Method Post `
              -Uri "http://127.0.0.1:$($api.port)/v0.3/sync" `
              -Headers @{ Authorization = "Bearer $($api.token)" }
        - lang: Python
          source: |-
            from miru_device_sdk import Miru

            client = Miru()
            response = client.agent.sync()
            print(response.code)
components:
  schemas:
    SyncResponse:
      title: Sync Response
      type: object
      required:
        - code
        - message
        - last_synced_secs_ago
        - last_attempted_sync_secs_ago
        - in_cooldown
        - cooldown_ends_in_secs
      properties:
        code:
          $ref: '#/components/schemas/SyncResult'
        message:
          type: string
          example: The device is in cooldown and can sync again in 25 seconds.
          description: The message of the result.
        last_synced_secs_ago:
          type: integer
          format: int64
          minimum: 0
          nullable: true
          example: 120
          description: >-
            Seconds since the device last synced, as measured by the agent when
            it built this response, or null if it hasn't synced since the agent
            last started.
        last_attempted_sync_secs_ago:
          type: integer
          format: int64
          minimum: 0
          example: 5
          description: >-
            Seconds since the device last *attempted* to sync, as measured by
            the agent when it built this response.
        in_cooldown:
          type: boolean
          example: true
          description: Whether the device is currently in cooldown.
        cooldown_ends_in_secs:
          type: integer
          format: int64
          minimum: 0
          example: 25
          description: >-
            Seconds until the cooldown ends, rounded up, as measured by the
            agent when it built this response. `0` exactly when `in_cooldown` is
            false.
      example:
        code: in_cooldown
        message: The device is in cooldown and can sync again in 25 seconds.
        last_synced_secs_ago: 120
        last_attempted_sync_secs_ago: 5
        in_cooldown: true
        cooldown_ends_in_secs: 25
    SyncResult:
      type: string
      description: The result of attempting to sync the device.
      enum:
        - success
        - network_connection_error
        - in_cooldown
      x-enum-varnames:
        - SYNC_RESULT_SUCCESS
        - SYNC_RESULT_NETWORK_CONNECTION_ERROR
        - SYNC_RESULT_IN_COOLDOWN
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        The token from the agent's discovery file
        (`%ProgramData%\Miru\device-api\device-api.json` on Windows). Required
        over loopback TCP (`127.0.0.1:6478` by default on Windows) and accepted
        by every route; not used over the Unix socket.

````

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