{"id":22702,"date":"2025-04-16T14:38:41","date_gmt":"2025-04-16T14:38:41","guid":{"rendered":"https:\/\/clockify.me\/help\/?p=22702"},"modified":"2025-05-12T12:28:10","modified_gmt":"2025-05-12T12:28:10","slug":"why-is-my-users-membership-section-empty-in-the-api-response","status":"publish","type":"post","link":"https:\/\/clockify.me\/help\/troubleshooting\/why-is-my-users-membership-section-empty-in-the-api-response","title":{"rendered":"Why is My User&#8217;s Membership Section Empty in the API Response?"},"content":{"rendered":"\n<p class=\"translation-block\">If you find that the <code>memberships<\/code> section is empty in the API response for getting user\u2019s info, it could be due to the <code>memberships<\/code> parameter being excluded.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Answer<\/h2>\n\n\n\n<p class=\"translation-block\">This is due to the change in the API\u2019s <code>membership<\/code> section, where membership data is returned as <code>empty by default<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Solution<\/h2>\n\n\n\n<p class=\"translation-block\">To resolve this, you need to include the <code>memberships<\/code> query parameter in your API call.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Add the memberships parameter to your query:\n<ul class=\"wp-block-list\">\n<li>Example:\n<ul class=\"wp-block-list\">\n<li><code>memberships=WORKSPACE<\/code><\/li>\n\n\n\n<li><code>memberships=PROJECT<\/code><\/li>\n\n\n\n<li><code>memberships=USERGROUP<\/code><\/li>\n\n\n\n<li><code>memberships=ALL<br><\/code>or,<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Directly in the URL:<\/li>\n<\/ul>\n\n\n\n<p>Example:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>https:\/\/api.clockify.me\/api\/v1\/workspaces\/{workspaceId}\/users?memberships=WORKSPACE<\/code><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"If you find that the memberships section is empty in the API response for gettin&#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-22702","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\/22702","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=22702"}],"version-history":[{"count":8,"href":"https:\/\/clockify.me\/help\/wp-json\/wp\/v2\/posts\/22702\/revisions"}],"predecessor-version":[{"id":23071,"href":"https:\/\/clockify.me\/help\/wp-json\/wp\/v2\/posts\/22702\/revisions\/23071"}],"wp:attachment":[{"href":"https:\/\/clockify.me\/help\/wp-json\/wp\/v2\/media?parent=22702"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/clockify.me\/help\/wp-json\/wp\/v2\/categories?post=22702"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/clockify.me\/help\/wp-json\/wp\/v2\/tags?post=22702"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}