curl --request PATCH \
--url "https://directory.example.com/dids/did%3Aopenpayload%3A1111111111111111111111/devices/mobile-01" \
--header "Content-Type: application/json" \
--data '{
"did": "did:openpayload:1111111111111111111111",
"new_device_id": "mobile-02",
"action": "update_device",
"nonce": "<control_nonce>",
"valid_until": "<epoch-millis>",
"signer_key_id": "<authorized-key-id>",
"canonical_payload": "<base64-or-hex-scale-payload>",
"signature": "<base64-ed25519-signature>"
}'
{
"status": "accepted",
"did": "did:openpayload:1111111111111111111111",
"extrinsic": "apply_control_with_proof",
"tx_hash": "<transaction-hash>",
"message": "Chain extrinsic submitted"
}
DIDs
Rename a device
Change the public identifier of an existing device on an OpenPayload DID
curl --request PATCH \
--url "https://directory.example.com/dids/did%3Aopenpayload%3A1111111111111111111111/devices/mobile-01" \
--header "Content-Type: application/json" \
--data '{
"did": "did:openpayload:1111111111111111111111",
"new_device_id": "mobile-02",
"action": "update_device",
"nonce": "<control_nonce>",
"valid_until": "<epoch-millis>",
"signer_key_id": "<authorized-key-id>",
"canonical_payload": "<base64-or-hex-scale-payload>",
"signature": "<base64-ed25519-signature>"
}'
{
"status": "accepted",
"did": "did:openpayload:1111111111111111111111",
"extrinsic": "apply_control_with_proof",
"tx_hash": "<transaction-hash>",
"message": "Chain extrinsic submitted"
}
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.
This request requires the DID-key proof fields documented in Authorize a Directory update,
using action
update_device and the current control_nonce.
Request
string
required
The DID that owns the device.
string
required
The current device identifier.
string
required
The same DID used in the path.
string
required
The replacement device identifier.
curl --request PATCH \
--url "https://directory.example.com/dids/did%3Aopenpayload%3A1111111111111111111111/devices/mobile-01" \
--header "Content-Type: application/json" \
--data '{
"did": "did:openpayload:1111111111111111111111",
"new_device_id": "mobile-02",
"action": "update_device",
"nonce": "<control_nonce>",
"valid_until": "<epoch-millis>",
"signer_key_id": "<authorized-key-id>",
"canonical_payload": "<base64-or-hex-scale-payload>",
"signature": "<base64-ed25519-signature>"
}'
Response
{
"status": "accepted",
"did": "did:openpayload:1111111111111111111111",
"extrinsic": "apply_control_with_proof",
"tx_hash": "<transaction-hash>",
"message": "Chain extrinsic submitted"
}
Straight to the point
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

