When you click on the magnifying glass icon, you can see the sample code but when you click on the button, it will execute the code, did you know about it?
So the first thing is: when you are trying to Add tag to page, the tag group must exist.
In this case the API example for "Adding tag to page", will add tag to CMS_Document -> column DocumentsTag which will automatically create a record for this tag in CMS_Tag table and store relationship between ID of page and ID of document in the CMS_DocumentTag table.
By design of application, every tag that is added to any document/page is automatically created in the CMS_Tag table and their relationship is stored in the CMS_DocumentTag table.
But I believe that in this case it would be even easier and faster to try to execute the code and check all the changes in the database, so you don't need just to guess :)