Adding theme api
Cherry picked themes-related commits (3ca4c871 and 60d166a3)
Add key to document