> ## 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.

# Update

> Update a device by ID.

<Danger>This API version has reached end of life. See [supported versions](/developers/platform-api/versioning#supported-versions).</Danger>

| Scope           | Required |
| --------------- | -------- |
| `devices:write` | Yes      |


## OpenAPI

````yaml /references/platform-api/2025-10-21.yaml patch /devices/{device_id}
openapi: 3.0.3
info:
  title: Miru API
  version: 2025-10-21.zion
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://api.mirurobotics.com/beta
    description: Miru API
security:
  - ApiKeyAuth: []
paths:
  /devices/{device_id}:
    patch:
      tags:
        - Devices
      summary: Update
      description: Update a device by ID.
      operationId: updateDevice
      parameters:
        - $ref: '#/components/parameters/components-parameters-device_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateDeviceRequest'
      responses:
        '200':
          description: Successfully updated the device.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Device'
      x-codeSamples:
        - lang: Python
          source: |-
            from miru_server_sdk import Miru

            client = Miru(
                api_key="My API Key",
            )
            device = client.devices.update(
                device_id="dvc_123",
            )
            print(device.id)
components:
  parameters:
    components-parameters-device_id:
      name: device_id
      in: path
      required: true
      description: The unique identifier of the device.
      schema:
        type: string
        example: dvc_123
  schemas:
    UpdateDeviceRequest:
      title: Update Device Request
      type: object
      properties:
        name:
          type: string
          description: >-
            The new name of the device. If excluded from the request, the device
            name is not updated.
          example: Robot 1
    Device:
      allOf:
        - $ref: '#/components/schemas/BaseDevice'
    BaseDevice:
      title: Base Device
      type: object
      required:
        - object
        - id
        - name
        - status
        - last_connected_at
        - last_disconnected_at
        - created_at
        - updated_at
      properties:
        object:
          type: string
          enum:
            - device
          example: device
        id:
          type: string
          example: dvc_123
          description: ID of the device.
        name:
          type: string
          example: My Device
          description: Name of the device.
        status:
          $ref: '#/components/schemas/DeviceStatus'
        last_connected_at:
          type: string
          format: date-time
          example: '2021-01-01T00:00:00Z'
          nullable: true
          description: >-
            Timestamp of when the device was last made an initial connection
            (this is not the same as the last time the device was seen).
        last_disconnected_at:
          type: string
          format: date-time
          example: '2021-01-01T00:00:00Z'
          nullable: true
          description: >-
            Timestamp of when the device was last disconnected (this is not the
            same as the last time the device was seen).
        created_at:
          type: string
          format: date-time
          example: '2021-01-01T00:00:00Z'
          description: Timestamp of when the device was created.
        updated_at:
          type: string
          format: date-time
          example: '2021-01-01T00:00:00Z'
          description: Timestamp of when the device was last updated.
    DeviceStatus:
      type: string
      description: >
        The status of the device.

        - Inactive: The miru agent has not yet been installed / authenticated

        - Activating: The miru agent is currently being installed /
        authenticated (should only last for a few seconds)

        - Online: The miru agent has successfully pinged the server within the
        last 60 seconds.

        - Offline: The miru agent has not successfully pinged the server within
        the last 60 seconds (e.g. network issues, device is powered off, etc.)
      enum:
        - inactive
        - activating
        - online
        - offline
      x-enum-varnames:
        - DEVICE_STATUS_INACTIVE
        - DEVICE_STATUS_ACTIVATING
        - DEVICE_STATUS_ONLINE
        - DEVICE_STATUS_OFFLINE
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        The API key to use for authentication. Retrieve your API key from the
        [Miru dashboard](https://app.mirurobotics.com/settings/api-keys).

````