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

# Rename a device

> Change the public identifier of an existing device on a Talaria DID

A DID can list multiple devices. This endpoint changes a device identifier while keeping it associated with the same public identity.

Use it when a client rotates its local device identifier or replaces a provisional name. It does not update encryption keys inside the DID document.

## Request

<ParamField path="did" type="string" required>
  The DID that owns the device.
</ParamField>

<ParamField path="deviceId" type="string" required>
  The current device identifier.
</ParamField>

<ParamField body="did" type="string" required>
  The same DID used in the path.
</ParamField>

<ParamField body="new_device_id" type="string" required>
  The replacement device identifier.
</ParamField>

<RequestExample>
  ```bash Request theme={null}
  curl --request PATCH \
    --url "https://directory.example.com/dids/did%3Atalaria%3A1111111111111111111111/devices/mobile-01" \
    --header "Content-Type: application/json" \
    --data '{
      "did": "did:talaria:1111111111111111111111",
      "new_device_id": "mobile-02"
    }'
  ```
</RequestExample>

## Response

<ResponseExample>
  ```json 202 Response theme={null}
  {
    "status": "accepted",
    "did": "did:talaria:1111111111111111111111",
    "extrinsic": "update_device",
    "tx_hash": "<transaction-hash>",
    "message": "Chain extrinsic submitted"
  }
  ```
</ResponseExample>

## Straight to the point

```http theme={null}
PATCH /dids/{did}/devices/{currentDeviceId}
Content-Type: application/json

{"did":"<same-did>","new_device_id":"<replacement>"}
```

* Accepted: `202`
* Path/body DID mismatch: `403`
* Missing current or new identifier: `400`
