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

Skip to main content

Make Records Public

When records are created, they are private by default. Private records are not accessible without the use of a protocol or permissions. To make a record publicly available, the record must be published.

In this guide, we’ll discuss how to publish a record.

Publish a record upon creation​

To publish a record, you must explicitly declare that record as published by setting the published attribute to true when creating it:

Publishing records in the future​

When specifying to publish a record without providing the datePublished attribute, the record will be published now (the same date it was created). However, it's also possible to publish a record in the future by providing a future date for the datePublished attribute:

info

The datePublished value must be in ISO 8601 standard format for representing dates and times. It must be expressed in the 'YYYY-MM-DDThh:mm:ss.ssssssZ' format, where YYYY is the 4-digit year, MM is the 2-digit month, DD is the 2-digit day, T is a separator, hh is the 2-digit hour in 24-hour format, mm is the 2-digit minute, ss.ssssss is the 2-digit second with microsecond precision of 6, and Z indicates the time is in Coordinated Universal Time (UTC).

Connect with us on Discord

Submit feedback: Open a GitHub issue

Edit this page: GitHub Repo

Contribute: Contributing Guide