.. and press ENTER to ask a question on web5, how to write code and more.

Skip to main content

Update a DID

A DID Document provides a way to link a DID with the way the DID subject can be reached, i.e., through public keys, services endpoints, and more. There are several reasons why one might need to update a DID document including adding/deleting/updating service endpoints and keys.

In this guide, we'll demonstrate how to update a DID Document using the Web5 SDK.

Prerequisites

To update a DID, you need access to your full BearerDid.

Adding a Service​

To add a new service, you can obtain the list of services from the DID Document, then add your new service to the list.

JavaScript
Kotlin
Swift

Updating a Service​

To update a service, you can find the service within the existing list of services, update any of the values, then republish the DID Document.

JavaScript
Kotlin
Swift

Deleting a Service​

To delete a service, you can remove the service from the existing list of services, then republish the DID Document.

JavaScript
Kotlin
Swift

Connect with us on Discord

Submit feedback: Open a GitHub issue

Edit this page: GitHub Repo

Contribute: Contributing Guide