{"id":22705,"date":"2025-04-17T13:31:06","date_gmt":"2025-04-17T13:31:06","guid":{"rendered":"https:\/\/clockify.me\/help\/?p=22705"},"modified":"2025-05-12T11:44:03","modified_gmt":"2025-05-12T11:44:03","slug":"how-to-find-newly-added-user-via-api","status":"publish","type":"post","link":"https:\/\/clockify.me\/help\/troubleshooting\/how-to-find-newly-added-user-via-api","title":{"rendered":"How to find newly-added user via API?"},"content":{"rendered":"\n<p>When you add a user to a workspace via API, you may want to identify the new user in the returned memberships array.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Solution<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li class=\"translation-block\"><strong>Check the last entry<\/strong>:<br>The newly added user will always be the <strong>last item<\/strong> in the <code>memberships<\/code> array.<\/li>\n<\/ul>\n\n\n\n<p class=\"tip translation-block\">You can also identify the <code>userID<\/code> by checking the last entry in the list of returned memberships.<\/p>\n","protected":false},"excerpt":{"rendered":"When you add a user to a workspace via API, you may want to identify the new use&#8230;","protected":false},"author":25,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_helpful_status":1,"_searchwp_excluded":"","footnotes":""},"categories":[75],"tags":[],"class_list":["post-22705","post","type-post","status-publish","format-standard","hentry","category-api-response"],"acf":[],"featured_image_src":null,"author_info":{"display_name":"tamara radijevac","author_link":"https:\/\/clockify.me\/help\/author\/tamara-radijevac"},"_links":{"self":[{"href":"https:\/\/clockify.me\/help\/wp-json\/wp\/v2\/posts\/22705","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/clockify.me\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/clockify.me\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/clockify.me\/help\/wp-json\/wp\/v2\/users\/25"}],"replies":[{"embeddable":true,"href":"https:\/\/clockify.me\/help\/wp-json\/wp\/v2\/comments?post=22705"}],"version-history":[{"count":5,"href":"https:\/\/clockify.me\/help\/wp-json\/wp\/v2\/posts\/22705\/revisions"}],"predecessor-version":[{"id":23068,"href":"https:\/\/clockify.me\/help\/wp-json\/wp\/v2\/posts\/22705\/revisions\/23068"}],"wp:attachment":[{"href":"https:\/\/clockify.me\/help\/wp-json\/wp\/v2\/media?parent=22705"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/clockify.me\/help\/wp-json\/wp\/v2\/categories?post=22705"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/clockify.me\/help\/wp-json\/wp\/v2\/tags?post=22705"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}