Update a DID
Update a did:cheqd Decentralized Identifier (DID) using cheqd Studio.
Users are able to update DID Documents for various reasons, such as to include a new section (such as service
) or to rotate the verificationMethod
or authentication
keys within the DID Document.
With the /did/update
API, users are able to input either:
The specific section(s) of the DID Document to be updated; or
The full updated DID Document body.
Example Request formats
Update Service Section
To update individual sections of the DID Document, users are able to pass only the section they would like to update. For example, users may often want to update the service
section to add or change a serviceEndpoint
:
The above request format will replace the service
section of the existing DID Document with the new section. No extra information, such as the verificationMethod or authentication
keys need to be passed with the request, because cheqd Studio custodies the keys on behalf of the user.
Rotate Keys
Users may regularly want to rotate the keys used to control the DID. Like with the service
section above, users are able to pass the sections of the DID Document that include the rotated keys, usually contained within theverificationMethod
and authentication
sections.
The example above will rotate the keys that control the DID Document, updating the DID Document's verificationMethod
and authentication
sections accordingly.
Pass full updated DID Document body
Users may alternatively want to update the DID Document body in full, and pass the updated DID Document to the API. For example:
This method may be better for users wanting to update larger portions of the DID Document, or for having full visibility over the updated body.
Get started with the API below
Use the /did/update
API below to pass your DID Document update as a request, using either the full body or a specific section.
Last updated
Was this helpful?