You can retrieve an information about any single community the current user has access to by calling getCommunity query. As a response, it will return the Community object:
ParameterTypeDescription
idIDRequired. The community entity ID.
ownerUserContextUserContextContains the community owner user context data.
titleStringRequired. Represents the community title.
descriptionStringRequired. Represents the community description text. Can contain html tags.
visibilityCommunityVisibilityRequired. The community visibility.
createdIntRequired. Timestamp when the community was created.
membersNumberIntRequired. The number of the community members. Only users with associated not blocked context will be counted.
postNotificationEnabledBooleanA flag that indicates that email notification about a new post is enabled. Note that the notification itself should be implemented on the client side, because we don’t have an access to user emails in the API.
imageMediaImageThe community image (if it is set).
cta[Cta]Contains the list of Call To Action objects available for the given community.
lastPostTimeIntRepresents a timestamp when the last community post was created.

Community visibility

  • PRIVATE - private communities will not be returned in the search query results; a user can only be invited to a private community.
  • PUBLIC - users can join public communities by themselves, without the approval by the admin. Public communities are available in the search query results.

Community CTA

Action IDDescriptionCorresponding mutation/query
EDIT_COMMUNITYAllows to edit the given community. The action is available only for the community owner or users associated with the ADMINISTRATOR scope.editCommunity
DELETE_COMMUNITYAllows to delete the given community. The action is available only for the community owner or users associated with the ADMINISTRATOR scope.deleteCommunity
VIEW_MEMBERSAllows to view the given community members. Available for the community owner, members or users associated with the ADMINISTRATOR scope.getCommunityMembers
VIEW_SENT_INVITATIONSAllows to view the invitations sent from the community. Available only for the community owner or users associated with the ADMINISTRATOR scope.getCommunitySentInvitations
LEAVE_COMMUNITYMakes it possible to leave the community. Available for community members.leaveCommunity
INVITE_TO_COMMUNITYAllows to invite users from the network to join the community. Available for the community owner and members (only for the public communities).createCommunityInvitation
JOIN_COMMUNITYAllows to join the community. Available for the users who are not associated with the community yet (not owner and not a member).joinCommunity
CREATE_POSTAllows to create a post or a comment in the given community. Available only for the users associated with the community (the owner or a member).createPost
  query getCommunity {
    getCommunity(communityId: 2) {
      id
      title
      description
      ownerUserContext {
        displayName
        id
        uuid
      }
      visibility
      created
      membersNumber
      postNotificationEnabled
      image {
        url
      }
      lastPostTime
      cta {
        actionId
        arguments {
          key
          value
        }
        title
      }
    }
  }