Use REST API to add the tags.
This topic is for migrating from files to PaperUI but should help with understanding REST.