I have a couple of city maps like that, filled with map pins or NPCs that the players have control over. I periodically duplicate the map, tokens included so there is an immediate backup. If nothing has gone wrong for a while, but the tokens have increased, I delete and make a new backup. You can undo (Cmd/Ctrl-Z) an accidental deletion, but only immediately afterward. I think an API would suffer similar limitations. It might be possible to create a new token that is a virtual duplicate of the old upon deletion. It would definitely have a different token_id. Given the nature of how gmnotes are retrieved though, I suspect it might be impossible to re-create it entirely. Maybe someone with better API chops than me would have a more authoritative answer, though.