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

# Update a device

> Updates the specified device identifier. Any parameters that have not been provided will be left unchanged.



## OpenAPI

````yaml api-reference/anode/flatpeak-api-spec-anode.json PATCH /devices/{id}
openapi: 3.0.3
info:
  description: Flatpeak API
  version: 2025-09-14.anode
  title: Flatpeak API
  termsOfService: https://flatpeak.com/legal
  contact:
    name: Technical Support
    email: support@flatpeak.com
    url: https://flatpeak.com/contact
  license:
    name: Apache 2.0
    url: https://flatpeak.com/legal
servers:
  - url: https://api.flatpeak.com
    description: Location
security: []
tags:
  - name: Consumption
    description: Consumption operations
  - name: Customers
    description: Customer operations
  - name: Devices
    description: Device operations
  - name: Meters
    description: Meter readings operations
  - name: Events
    description: Events operations
  - name: Login
    description: Bearer auth token operations
  - name: Connect
    description: Connect operations
  - name: Locations
    description: Location operations
  - name: Rates
    description: Rates operations
  - name: Costs
    description: Consumption cost calculations
  - name: Schedules
    description: Consumption schedules
  - name: Tariffs
    description: Tariff operations
  - name: Slots
    description: Slots operations
externalDocs:
  description: Location documentation
  url: https://docs.flatpeak.com
paths:
  /devices/{id}:
    parameters:
      - in: path
        name: id
        description: Flatpeak `device_id`.
        required: true
        schema:
          example: dev_6563a6757360a6d6a628e839
          type: string
    patch:
      tags:
        - Devices
      summary: Update a device
      description: >-
        Updates the specified device identifier. Any parameters that have not
        been provided will be left unchanged.
      operationId: update-device
      requestBody:
        $ref: '#/components/requestBodies/DeviceUpdate'
      responses:
        '200':
          $ref: '#/components/responses/Device'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '409':
          $ref: '#/components/responses/409'
        '429':
          $ref: '#/components/responses/429'
      security:
        - bearerAuth: []
components:
  requestBodies:
    DeviceUpdate:
      content:
        application/json:
          schema:
            type: object
            properties:
              reference_id:
                type: string
                description: >-
                  A reference that is meaningful to you, for example, an ID from
                  your system.
                example: DEV1234567890
      description: Updates a Device
  responses:
    '403':
      description: 403 forbidden
      content:
        application/json:
          schema:
            type: object
            x-examples:
              Example:
                message: Bad credentials
            properties:
              object:
                type: string
                example: error
                x-stoplight:
                  id: gria4ysjd9zhk
                default: error
              type:
                type: string
                x-stoplight:
                  id: 7mhtfljidnqcu
                example: invalid_request
                default: invalid_request
              code:
                type: string
                x-stoplight:
                  id: sy7ljpdy5wdes
                example: access_denied
                default: access_denied
              time_created:
                type: string
                x-stoplight:
                  id: 84d5biv9dfbc9
                format: date-time
                example: '2025-01-01T00:00:00Z'
            required:
              - object
              - type
              - code
          examples: {}
    '404':
      description: 404 response
      content:
        application/json:
          schema:
            type: object
            x-examples:
              Example:
                message: Not Found
            properties:
              object:
                type: string
                example: error
                x-stoplight:
                  id: qyc690tqd4dnh
                default: error
              type:
                type: string
                x-stoplight:
                  id: 6sog2aaccgb59
                example: invalid_request
                default: invalid_request
              code:
                type: string
                x-stoplight:
                  id: 6l9jrgodwxi0c
                example: not_found
                default: not_found
              time_created:
                type: string
                x-stoplight:
                  id: 1ywndy1nsshcz
                example: '2025-01-01T00:00:00Z'
                format: date-time
          examples: {}
    '409':
      description: 409 conflict
      content:
        application/json:
          schema:
            type: object
            x-examples:
              Example:
                message: Conflict
            properties:
              object:
                type: string
                x-stoplight:
                  id: fk1kol4j7b61e
                default: error
                example: error
              type:
                type: string
                x-stoplight:
                  id: oyyg98j0zeytg
                default: conflict
                example: conflict
              code:
                type: string
                x-stoplight:
                  id: 9c88baxga1b2j
                default: duplicate_reference
                example: duplicate_reference
              message:
                type: string
                example: Reference ID already exists
                default: Reference ID already exists
          examples: {}
    '429':
      description: 429 Too many requests
      content:
        application/json:
          schema:
            type: object
            properties:
              object:
                type: string
                x-stoplight:
                  id: irkmp11gg6sjx
                example: error
                default: error
              type:
                type: string
                x-stoplight:
                  id: u0gq12cizam3d
                default: rate_limit
                example: rate_limit
              code:
                type: string
                x-stoplight:
                  id: uh7x9404d4w3q
                default: too_many_requests
                example: too_many_requests
              message:
                type: string
                x-stoplight:
                  id: 9z8h79l1coblc
                default: Too many requests. Please retry after a short delay.
                example: Too many requests. Please retry after a short delay.
              time_created:
                type: string
                x-stoplight:
                  id: ea7o3uvdojrtc
                format: date-time
                default: '2026-01-29T17:11:52Z'
                example: '2026-01-29T17:11:52Z'
            required:
              - object
              - type
              - code
              - message
    Device:
      description: ''
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Device'
  schemas:
    Device:
      type: object
      x-examples: {}
      description: This object represents a device or another asset of a compatible type.
      title: Device
      x-tags:
        - Devices
      properties:
        id:
          type: string
          description: Flatpeak unique object `id`.
          example: dev_63a6087272941ef077a8fd3e
          readOnly: true
        object:
          type: string
          description: Represents the object’s type.
          example: device
          readOnly: true
        live_mode:
          type: boolean
          x-stoplight:
            id: 49pa8oln5zly4
          description: >-
            Has the value true if the object exists in live mode or the value
            false if the object exists in test mode.
        reference_id:
          type: string
          description: >-
            A reference that is meaningful to you, for example, an ID from your
            system.
          example: DEV1234567890
          x-stoplight:
            id: gcnayduh1z16f
          readOnly: true
        last_seen:
          type: string
          description: Timestamp of when the device has last queried the service.
          example: '2022-03-22T11:12:21Z'
          format: date-time
        time_created:
          type: string
          description: Time when the object was created, in UTC.
          example: '2022-01-24T14:15:22Z'
        account_id:
          type: string
          description: Flatpeak account ID.
          example: acc_661677911f2197045e6cf1b1
          x-stoplight:
            id: gcnayduh1z16f
          readOnly: true
      required:
        - id
        - object
        - live_mode
        - reference_id
        - time_created
        - account_id
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Authenticate with `bearer` you obtained from
        [authentication](/api-reference/anode/authentication) endpoint.

````