Post-Sharing
Get shares
Get
https://example.com/wp-json/dt-posts/v2/{post_type}/{post_id}/shares
Requires permission: view_any_{post_type}
or post is shared with user.
Return
(array) An array of shares
Example format:
Share the post with a user
POST
https://example.com/wp-json/dt-posts/v2/{post_type}/{post_id}/shares
Parameters
user_id (int): the id of the user to share the post with
Returns
1
if successful
Unshare the post with a user
DELETE
https://example.com/wp-json/dt-posts/v2/{post_type}/{post_id}/shares
Parameters
user_id (int): the id of the user to unshare the post with
Returns
1
if successful
Last updated