Update a DID
Update a DID Document using cheqd Studio.
This endpoint updates a DID Document. As an input, it can take JUST the sections/parameters that need to be updated in the DID Document (in this scenario, it fetches the current DID Document and applies the updated section). Alternatively, it take the fully-assembled DID Document with updated sections as well as unchanged sections.
DID identifier to be updated.
did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0
Authentication section of the DID Document.
List of key references (publicKeys) which will be used for signing the message. The should be in hexadecimal format and placed in the wallet of current user.
The request was successful.
A problem with the input fields has occurred. Additional state information plus metadata may be available in the response body.
Access token is missing or invalid
An internal error has occurred. Additional state information plus metadata may be available in the response body.
POST /did/update HTTP/1.1
Host: studio-api.cheqd.net
x-api-key: YOUR_API_KEY
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 1436
"did='did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0'&service=[{'id':'did:cheqd:mainnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0#service-1','type':'LinkedDomains','serviceEndpoint':['https://example.com'],'priority':0,'recipientKeys':['did:cheqd:mainnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0#key-1'],'routingKeys':['did:cheqd:mainnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0#key-2'],'accept':['didcomm/aip2;env=rfc587']}]&verificationMethod=[{'controller':'did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0','id':'did:cheqd:testnet :7bf81a20-633c-4cc7-bc4a-5a45801005e0#key-1','publicKeyBase58':'BTJiso1S4iSiReP6wGksSneGfiKHxz9SYcm2KknpqBJt','type':'Ed25519VerificationKey2018'}]&authentication=['text']&publicKeyHexs=['text']&didDocument={'@context':['https://www.w3.org/ns/did/v1'],'id':'did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0','controller':['did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0'],'verificationMethod':[{'id':'did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0#key-1','type':'Ed25519VerificationKey2018','controller':'did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0','publicKeyBase58':'z6MkkVbyHJLLjdjU5B62DaJ4mkdMdUkttf9UqySSkA9bVTeZ'}],'authentication':['did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0#key-1'],'service':[{'id':'did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0#service-1','type':'LinkedDomains','serviceEndpoint':['https://example.com']}]}"
{
"did": "text",
"controllerKeyId": "text",
"keys": [
{}
],
"services": [
{
"id": "did:cheqd:mainnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0#service-1",
"type": "LinkedDomains",
"serviceEndpoint": [
"https://example.com"
],
"priority": 0,
"recipientKeys": [
"did:cheqd:mainnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0#key-1"
],
"routingKeys": [
"did:cheqd:mainnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0#key-2"
],
"accept": [
"didcomm/aip2;env=rfc587"
]
}
],
"controllerKeyRefs": [
"text"
],
"controllerKeys": [
"text"
]
}
Last updated
Was this helpful?