> ## 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 the list of the community sent invitations

To retrieve the list of the users who have been invited to the given community and have not accepted the invitation yet,
`getCommunitySentInvitations` query should be called.
The query result contains pagination and it is possible to change the sorting order and key.
Supports cursor-based (`after`, `before`) or limit-based (`first`, `last`) pagination.

<Note>
  Query results will be available only for the user associated with the community owner context
  or users associated with `ADMINISTRATOR` scope.
</Note>

The following arguments can be used in the query:

| Argument      | Type                         | Description                                                                                                                                                                    | Default   |
| :------------ | :--------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------- |
| `communityId` | `ID`                         | **Required**. ID of the community to get the list of sent invitations.                                                                                                         | —         |
| `after`       | `Cursor`                     | Returns results that come after the specified cursor. Should be used together with `first` parameter. Cannot be used if `before` is set.                                       | —         |
| `before`      | `Cursor`                     | Returns results that come before the specified cursor. Should be used together with `last` parameter. Cannot be used if `after` is set.                                        | —         |
| `first`       | `Integer`                    | Returns up to the first N elements from the list. Required if `after` parameter is set. Cannot be used together with `last`.                                                   | —         |
| `last`        | `Integer`                    | Returns up to the first N elements from the list. Required if `before` parameter is set. Cannot be used together with `first`.                                                 | —         |
| `reverse`     | `Boolean`                    | Allows to change the order of the sorting to `DESC`.                                                                                                                           | `false`   |
| `sortKey`     | `CommunityInvitationSortKey` | Provides the possibility to change the query sorting key. Available options: `CREATED` (sorting by the invitation creation date) or `NAME` (by the invitee user context name). | `CREATED` |

<CodeGroup>
  ```filename GraphQL theme={null}
    query getCommunitySentInvitations {
      getCommunitySentInvitations(communityId: 1, first: 1) {
        edges {
          node {
            id
            created
            inviteeUserContext {
              displayName
              id
              uuid
            }
          }
        }
        totalItems
      }
    }
  ```

  ```File Query result [expandable] theme={null}
  {
    "data": {
      "getCommunitySentInvitations": {
        "edges": [
          {
            "node": {
              "id": "2",
              "created": 1757161347,
              "inviteeUserContext": {
                "displayName": "LA Admin",
                "id": "181",
                "uuid": "8e3fd687-39d1-4778-8ac6-fc388274b9e5"
              }
            }
          }
        ],
        "totalItems": 1
      }
    }
  }
  ```
</CodeGroup>

The list of nodes in the response contains `CommunityInvatation` object, the full description can be found [here](/OpignoEnterpriseAPI/Community/CreateCommunityInvitation/#community-invitation-object).
