As suggested by the Plone API documentation, the following should work:
from plone import api import tranaction portal = api.portal.get() obj = api.content.create(type='Document', title='My Title', subjects=('First Tag', 'Second Tag'), container=portal) transaction.commit()
I don't get an error message upon creating the object, nor do I get one when I commit the transaction. The object in indeed instantiated on the ZODB, and is viewable when in Plone (within the proper container). When I edit the object and look within the "Categorization" tab and then "Tags", nothing was saved (even though all the other data for the other properties) were saved.
Is there some property name for the tags property for the Dexterity objects. Note, so far, I've used "subjects" and "topics" and "tags" as the property name -- all to no avail. If there is some exception to the general rule (of looking at the Dexterity object description under the site setup) please tell us. pointing to some (specific) file on GitHub would work just as well.