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

# Update a device by ID



## OpenAPI

````yaml https://portal.unicontrol.me/v1/openapi patch /v1/devices/{id}
openapi: 3.1.0
info:
  title: Unicontrol API
  description: Welcome
  version: 1.0.0
servers:
  - url: http://0.0.0.0:3000
    description: Local Server
  - url: https://portal.test.flexhome.casa
    description: Development
  - url: https://portal.unicontrol.me
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/devices/{id}:
    patch:
      tags:
        - Devices
      summary: Update a device by ID
      operationId: patchV1DevicesById
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: number
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
              required:
                - name
        required: true
      responses:
        '200':
          description: Device updated successfully
        '400':
          description: Invalid request
        '404':
          description: User or device not found
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````