curl --request PUT \
--url "https://directory.example.com/dids/did%3Aopenpayload%3A1111111111111111111111/document/key-agreements/did%3Aopenpayload%3A1111111111111111111111%23agreement" \
--header "Content-Type: application/json" \
--data '{
"did": "did:openpayload:1111111111111111111111",
"action": "UpdateKeyAgreement",
"key_agreement": {
"id": "did:openpayload:1111111111111111111111#agreement",
"type": "Multikey",
"controller": "did:openpayload:1111111111111111111111",
"publicKeyMultibase": "<new-public-key>"
},
"nonce": "<nonce>",
"valid_until": "<future-epoch-milliseconds>",
"signer_key_id": "root",
"canonical_payload": "<payload>",
"signature": "<signature>"
}'
{
"status": "accepted",
"did": "did:openpayload:1111111111111111111111",
"action": "UpdateKeyAgreement",
"tx_hash": "<transaction-hash>",
"message": "DID document modification submitted"
}
DID documents
Update key agreement
Update key agreement in a public OpenPayload DID document.
curl --request PUT \
--url "https://directory.example.com/dids/did%3Aopenpayload%3A1111111111111111111111/document/key-agreements/did%3Aopenpayload%3A1111111111111111111111%23agreement" \
--header "Content-Type: application/json" \
--data '{
"did": "did:openpayload:1111111111111111111111",
"action": "UpdateKeyAgreement",
"key_agreement": {
"id": "did:openpayload:1111111111111111111111#agreement",
"type": "Multikey",
"controller": "did:openpayload:1111111111111111111111",
"publicKeyMultibase": "<new-public-key>"
},
"nonce": "<nonce>",
"valid_until": "<future-epoch-milliseconds>",
"signer_key_id": "root",
"canonical_payload": "<payload>",
"signature": "<signature>"
}'
{
"status": "accepted",
"did": "did:openpayload:1111111111111111111111",
"action": "UpdateKeyAgreement",
"tx_hash": "<transaction-hash>",
"message": "DID document modification submitted"
}
Update key agreement in a public OpenPayload DID document.
Use this operation to rotate or correct an existing public key-agreement method while retaining its component identity. Other clients use these public values when preparing encrypted messages.
Read Authorize a Directory update before signing.
Path parameters
string
required
The DID to update.
string
required
The key-agreement ID.
Request body
string
required
The DID to update. It must match the path.
string
required
The operation name. Use
UpdateKeyAgreement.object
required
The public key agreement value for this operation.
string
required
The request nonce.
string
required
The authorization expiration time.
string
The public signing-key identifier. Defaults to
root.string
required
The payload supplied by an OpenPayload-compatible signer.
string
required
The authorization signature.
curl --request PUT \
--url "https://directory.example.com/dids/did%3Aopenpayload%3A1111111111111111111111/document/key-agreements/did%3Aopenpayload%3A1111111111111111111111%23agreement" \
--header "Content-Type: application/json" \
--data '{
"did": "did:openpayload:1111111111111111111111",
"action": "UpdateKeyAgreement",
"key_agreement": {
"id": "did:openpayload:1111111111111111111111#agreement",
"type": "Multikey",
"controller": "did:openpayload:1111111111111111111111",
"publicKeyMultibase": "<new-public-key>"
},
"nonce": "<nonce>",
"valid_until": "<future-epoch-milliseconds>",
"signer_key_id": "root",
"canonical_payload": "<payload>",
"signature": "<signature>"
}'
Response
string
required
The submission status.
string
required
The affected DID.
string
required
The document operation.
string
required
The transaction hash.
string
required
A human-readable submission result.
{
"status": "accepted",
"did": "did:openpayload:1111111111111111111111",
"action": "UpdateKeyAgreement",
"tx_hash": "<transaction-hash>",
"message": "DID document modification submitted"
}
202 Accepted means the Directory accepted the request for processing. It does not confirm final settlement.Straight to the point
- Action:
UpdateKeyAgreement - Body ID must equal the URL component
- Sign the complete replacement object

