Best way to establish a relation between a data element and specific users

I am wondering what the best way is to establish a relation between a data object and users. For instance, I want to store a list of users required to perform some action on a page as a JSON object in the properties of the page.

Should I store the usernames? As far as I know the username of a person can be changed if required. This would break my link.

Should I store the user key? Is the key immutable? In practice, the key seems to be much less convenient than the username when working with the Confluence Java API.

Any other option?

Thanks for any tip!

Don’t store the username - like you mentioned it can be changed… UserKey is immutable. Depending on which version of Confluence you’re using - the user key will become more prominent in the api.

Thanks. Good to know that user keys are going to be more prominent in the future