Add client-side api

Jira issue: wp-998