---
title: "PATCH /v2/devices/{device_id}"
method: PATCH
path: "/v2/devices/{device_id}"
tags: ["devices"]
---

# PATCH /v2/devices/{device_id}

`PATCH /v2/devices/{device_id}`

update a device with rfc5789 and rfc7396 specifications

## Path parameters

- `device_id` string, required

## Request body

- object
  - `current_state` object, required
  - `device_id` string
  - `ip_creation` string — ip address at creation
  - `locations` DeviceLocation[]
    - `address` string, required
    - `country` string
    - `device_id` string
    - `type` 'other' | 'home' | 'work' | 'public'
    - `user_id` string
  - `name` string
  - `public_keys` PublicKey[]
    - `alg` string
    - `crv` string
    - `date_insert` string, date-time
    - `date_update` string, date-time
    - `emails` string[]
    - `expire_date` string, date-time
    - `fingerprint` string
    - `kty` string
    - `key_id` string, required
    - `type` string
    - `resource_id` string, required
    - `resource_type` string
    - `size` integer
    - `use` string
    - `user_id` string, required
    - `x` integer
    - `y` integer
    - `key` string, required — DER or PEM key, base64 encoded
    - `label` string, required
  - `status` string
  - `type` 'other' | 'desktop' | 'laptop' | 'smartphone' | 'tablet'
  - `user_agent` string

## Response `204`

Update successful. No body is returned.

## Other responses

- `400` — json payload malformed
- `401` — Unauthorized access
- `403` — Forbidden patch. Server is refusing to apply the given patch's properties to this ressource
- `404` — device not found
- `422` — patch was semantically malformed or unprocessable

---

[API](https://skmtc.net/caliopen/apis/caliopen-http-rest-api.md) · [All operations](https://skmtc.net/caliopen/apis/caliopen-http-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/caliopen/caliopen-http-rest-api/revisions/f32b5d08284d/schema)
