> ## Documentation Index
> Fetch the complete documentation index at: https://docs.opigno.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a single community

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:

| 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](#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](#community-cta) 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`](/OpignoEnterpriseAPI/Community/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`](/OpignoEnterpriseAPI/Community/DeleteCommunity) |
| `VIEW_MEMBERS` | Allows to view the given community members. Available for the community owner, members or users associated with the `ADMINISTRATOR` scope. | [`getCommunityMembers`](/OpignoEnterpriseAPI/Community/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`](/OpignoEnterpriseAPI/Community/GetCommunitySentInvitations) |
| `LEAVE_COMMUNITY` | Makes it possible to leave the community. Available for community members. | [`leaveCommunity`](/OpignoEnterpriseAPI/Community/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`](/OpignoEnterpriseAPI/Community/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`](/OpignoEnterpriseAPI/Community/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`](/OpignoEnterpriseAPI/Post/CreatePost) |
| `REPORT_ABUSE` | Allows to report a joined community as an abusive. | [`reportAbuse`](/OpignoEnterpriseAPI/ReportAbuse) |

<CodeGroup>
  ```filename GraphQL theme={null}
    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
        }
      }
    }
  ```

  ```File Query result [expandable] theme={null}
  {
    "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"
          }
        ]
      }
    }
  }
  ```
</CodeGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.