Opigno API provides an endpoint to get the list of pending user invitations. To retrieve this list, getPendingUserInvitations query should be called. The query returns the list of invitations that have been sent to the current user (fetched from the request) and are not accepted yet. The data contains pagination and sorting options. Supports cursor-based pagination (after, before) or limit-based (first, last). The same pagination approach as in other queries is used (for example, getCatalogData). The following arguments can be used in the query:
ArgumentTypeDescriptionDefault
afterCursorReturns results that come after the specified cursor. Should be used together with first parameter. Cannot be used if before is set.
beforeCursorReturns results that come before the specified cursor. Should be used together with last parameter. Cannot be used if after is set.
firstIntegerReturns up to the first N elements from the list. Required if after parameter is set. Cannot be used together with last.
lastIntegerReturns up to the first N elements from the list. Required if before parameter is set. Cannot be used together with first.
reverseBooleanAllows to change the order of the sorting to DESC.FALSE
sortKeyInvitationSortKeyProvides the possibility to change the query sorting key. Available options: CREATED (sorting by the creation date) or NAME (by the initiator user context name).CREATED
  query getPendingUserInvitations {
    getPendingUserInvitations(first: 1) {
      edges {
        node {
          initiatorUserContext {
            id
            uuid
          }
          cta {
            actionId
            title
            arguments {
              key
              value
            }
            metadata {
              key
              value
            }
          }
        }
      }
      pageInfo {
        hasNextPage
        startCursor
        endCursor
      }
      totalItems
    }
  }
The list of nodes in the response contains UserInvatation object, the full example can be found here.