Any user associated with the community (the owner or a member) can invite other users from their network to the community.
Members can invite others only to the public communities.Users associated with the ADMINISTRATOR scope can invite to the community any user, not only the ones from their network.

Community invitation object

Community invitations enhance social engagement by allowing users to invite other users from their network to join communities.
ParameterTypeDescription
idIDRequired. ID of the community invitation entity.
initiatorUserContextUserContextRequired. The loaded user context associated with the user who created the community invitation.
inviteeUserContextUserContextRequired. The loaded user context associated with the invitee.
communityCommunityRequired. Community that is related to the invitation.
createdIntRequired. Timestamp when the community invitation was created.
ctaCtaThe list of the available CTA.

Community invitation CTA

Action IDDescriptionCorresponding mutation
ACCEPT_COMMUNITY_INVITATIONAvailable for the user associated with the invitee context. Allows to accept the invitation and, as a result, become the community member.acceptCommunityInvitation
DECLINE_COMMUNITY_INVITATIONAvailable for the user associated with the invitee context. Allows to decline the given community invitation.declineCommunityInvitation
CANCEL_COMMUNITY_INVITATIONAvailable for the user associated with the community owner context. Allows to cancel the given community invitation.cancelCommunityInvitation

Create a community invitation

To invite a new member, the createCommunityInvitation mutation should be executed. It accepts the following arguments:
ArgumentTypeDescription
communityIdIDRequired. ID of the community to invite a user.
inviteeUserContextIdIDRequired. The user context ID to be invited to the community.
  mutation createCommunityInvitation {
    createCommunityInvitation(communityId: 2, inviteeUserContextId: 345) {
      errors
      response {
        id,
        community {
          id
        },
        created,
        cta {
          actionId
          arguments {
            key
            value
          }
        }
      }
    }
  }
After the successful mutation execution, the community invitation will be created. Then it can be accepted or declined by the invitee or cancelled by the community owner or users associated with the ADMINISTRATOR scope, if it was not accepted yet.