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

Skip to main content

Update DWN Records

The following snippet allows you to read and update a particular record in a DWN:

// Get the record
const { record } = await web5.dwn.records.read({
message: {
filter: {
recordId: createdRecord.id
}
}
});

// Update the record
const {status} = await record.update({ data: "Hello, I'm updated!" });

Connect with us on Discord

Submit feedback: Open a GitHub issue

Edit this page: GitHub Repo

Contribute: Contributing Guide