curl --request POST \
--url "https://directory.example.com/dids/did%3Aopenpayload%3A1111111111111111111111/devices" \
--header "Content-Type: application/json" \
--data '{
"did": "did:openpayload:1111111111111111111111",
"device_id": "mobile-01",
"action": "add_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
Add a device
Add a device to a public DID record.
curl --request POST \
--url "https://directory.example.com/dids/did%3Aopenpayload%3A1111111111111111111111/devices" \
--header "Content-Type: application/json" \
--data '{
"did": "did:openpayload:1111111111111111111111",
"device_id": "mobile-01",
"action": "add_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"
}
Add a device to a public DID record.
A device ID lets compatible services distinguish installations or endpoints controlled under one DID. It is public metadata, not a secret or authentication token.
This is a DID-key authorized update. Include
action: "add_device", control_nonce, valid_until,
signer_key_id, the SCALE canonical_payload, and signature as described in
Authorize a Directory update. The JSON field name for control_nonce is nonce.
Request
string
required
The DID to update.
string
required
The DID to update. It must match the path.
string
required
The device identifier.
curl --request POST \
--url "https://directory.example.com/dids/did%3Aopenpayload%3A1111111111111111111111/devices" \
--header "Content-Type: application/json" \
--data '{
"did": "did:openpayload:1111111111111111111111",
"device_id": "mobile-01",
"action": "add_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
string
required
The submission status.
string
required
The DID affected by the request.
string
required
The public operation name.
string
required
The submitted transaction hash.
string
required
A human-readable submission result.
{
"status": "accepted",
"did": "did:openpayload:1111111111111111111111",
"extrinsic": "apply_control_with_proof",
"tx_hash": "<transaction-hash>",
"message": "Chain extrinsic submitted"
}
202 Accepted means the Directory accepted the request for processing. It does not confirm final settlement.Straight to the point
POST /dids/{did}/devices
{"did":"<same-did>","device_id":"mobile-01"}
- Accepted:
202 - Device ID is public
- Adding a device does not add encryption keys to the DID document

