getCommunity query.
As a response, it will return the Community object:
| Parameter | Type | Description |
|---|---|---|
id | ID | Required. The community entity ID. |
ownerUserContext | UserContext | Contains the community owner user context data. |
title | String | Required. Represents the community title. |
description | String | Required. Represents the community description text. Can contain html tags. |
visibility | CommunityVisibility | Required. The community visibility. |
created | Int | Required. Timestamp when the community was created. |
membersNumber | Int | Required. The number of the community members. Only users with associated not blocked context will be counted. |
postNotificationEnabled | Boolean | A flag that indicates that a in-built site notification about a new post is enabled. |
image | MediaImage | The community image (if it is set). |
cta | [Cta] | Contains the list of Call To Action objects available for the given community. |
lastPostTime | Int | Represents 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 ID | Description | Corresponding mutation/query |
|---|---|---|
EDIT_COMMUNITY | Allows to edit the given community. The action is available only for the community owner or users associated with the ADMINISTRATOR scope. | editCommunity |
DELETE_COMMUNITY | Allows to delete the given community. The action is available only for the community owner or users associated with the ADMINISTRATOR scope. | deleteCommunity |
VIEW_MEMBERS | Allows to view the given community members. Available for the community owner, members or users associated with the ADMINISTRATOR scope. | getCommunityMembers |
VIEW_SENT_INVITATIONS | Allows to view the invitations sent from the community. Available only for the community owner or users associated with the ADMINISTRATOR scope. | getCommunitySentInvitations |
LEAVE_COMMUNITY | Makes it possible to leave the community. Available for community members. | leaveCommunity |
INVITE_TO_COMMUNITY | Allows to invite users from the network to join the community. Available for the community owner and members (only for the public communities). | createCommunityInvitation |
JOIN_COMMUNITY | Allows to join the community. Available for the users who are not associated with the community yet (not owner and not a member). | joinCommunity |
CREATE_POST | Allows 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 |
REPORT_ABUSE | Allows to report a joined community as an abusive. | reportAbuse |
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
}
}
}
{
"data": {
"getCommunity": {
"id": "2",
"title": "Example community",
"description": "<p>This is an example of the communtiy creation with the Opigno Enterprise API.</p>\n",
"ownerUserContext": {
"displayName": "John Doe",
"id": "1",
"uuid": "b004e1a8-ec3d-40ec-bf05-8a54a98843a1"
},
"visibility": "PUBLIC",
"created": 1757139550,
"membersNumber": 0,
"postNotificationEnabled": false,
"image": {
"url": "http://opigno-enterprise.docksal.site/sites/default/files/2025-09/Opigno_logo.png"
},
"lastPostTime": null,
"cta": [
{
"actionId": "EDIT_COMMUNITY",
"arguments": [
{
"key": "communityId",
"value": "2"
}
],
"title": "Edit"
},
{
"actionId": "VIEW_MEMBERS",
"arguments": [
{
"key": "communityId",
"value": "2"
}
],
"title": "Members"
},
{
"actionId": "VIEW_SENT_INVITATIONS",
"arguments": [
{
"key": "communityId",
"value": "2"
}
],
"title": "Invitations sent"
},
{
"actionId": "DELETE_COMMUNITY",
"arguments": [
{
"key": "communityId",
"value": "2"
}
],
"title": "Delete the community"
},
{
"actionId": "INVITE_TO_COMMUNITY",
"arguments": [
{
"key": "communityId",
"value": "2"
}
],
"title": "Invite"
},
{
"actionId": "CREATE_POST",
"arguments": [
{
"key": "communityId",
"value": "2"
}
],
"title": "Create post"
}
]
}
}
}