Interface OrganizationInvitationsResource


public interface OrganizationInvitationsResource
Managing organization invitations.
Since:
Keycloak server 26.5.0
  • Method Summary

    Modifier and Type
    Method
    Description
    jakarta.ws.rs.core.Response
    Delete an invitation permanently.
    org.keycloak.representations.idm.OrganizationInvitationRepresentation
    get(String id)
    Get invitation by ID.
    default List<org.keycloak.representations.idm.OrganizationInvitationRepresentation>
    Return all invitations in the organization.
    default List<org.keycloak.representations.idm.OrganizationInvitationRepresentation>
    list(Integer first, Integer max)
    Return invitations in the organization with pagination.
    default List<org.keycloak.representations.idm.OrganizationInvitationRepresentation>
    list(String status, String email, Integer first, Integer max)
    Return invitations in the organization filtered by status.
    List<org.keycloak.representations.idm.OrganizationInvitationRepresentation>
    list(String status, String email, String search, String firstName, String lastName, Integer first, Integer max)
    Return invitations in the organization.
    jakarta.ws.rs.core.Response
    Resend an invitation email.
  • Method Details

    • list

      default List<org.keycloak.representations.idm.OrganizationInvitationRepresentation> list()
      Return all invitations in the organization.
      Returns:
      a list containing all organization invitations.
    • list

      default List<org.keycloak.representations.idm.OrganizationInvitationRepresentation> list(Integer first, Integer max)
      Return invitations in the organization with pagination.
      Parameters:
      first - index of the first element (pagination offset). If null, starts from 0.
      max - the maximum number of results. If null, returns all results.
      Returns:
      a list containing organization invitations.
    • list

      default List<org.keycloak.representations.idm.OrganizationInvitationRepresentation> list(String status, String email, Integer first, Integer max)
      Return invitations in the organization filtered by status.
      Parameters:
      first - index of the first element (pagination offset). If null, starts from 0.
      max - the maximum number of results. If null, returns all results.
      status - filter by invitation status (PENDING, EXPIRED). If null, returns all statuses.
      email - filter by exact email match. If null, no email filtering is applied.
      Returns:
      a list containing organization invitations matching the criteria.
    • list

      @GET @Produces("application/json") List<org.keycloak.representations.idm.OrganizationInvitationRepresentation> list(@QueryParam("status") String status, @QueryParam("email") String email, @QueryParam("search") String search, @QueryParam("firstName") String firstName, @QueryParam("lastName") String lastName, @QueryParam("first") Integer first, @QueryParam("max") Integer max)
      Return invitations in the organization.
      Parameters:
      first - index of the first element (pagination offset). If null, starts from 0.
      max - the maximum number of results. If null, returns all results.
      status - filter by invitation status (PENDING, EXPIRED). If null, returns all statuses.
      email - filter by exact email match. If null, no email filtering is applied.
      search - search text applied across email, firstName, and lastName fields. If null, no search filtering is applied.
      firstName - filter by exact first name match. If null, no firstName filtering is applied.
      lastName - filter by exact last name match. If null, no lastName filtering is applied.
      Returns:
      a list containing organization invitations matching the criteria.
    • get

      @GET @Path("/{id}") @Produces("application/json") org.keycloak.representations.idm.OrganizationInvitationRepresentation get(@PathParam("id") String id)
      Get invitation by ID.
      Parameters:
      id - the invitation ID.
      Returns:
      the invitation representation.
    • delete

      @DELETE @Path("/{id}") jakarta.ws.rs.core.Response delete(@PathParam("id") String id)
      Delete an invitation permanently. This action cannot be undone.
      Parameters:
      id - the invitation ID.
      Returns:
      response indicating success or failure.
    • resend

      @POST @Path("/{id}/resend") jakarta.ws.rs.core.Response resend(@PathParam("id") String id)
      Resend an invitation email. This generates a new invitation token with fresh expiration time.
      Parameters:
      id - the invitation ID.
      Returns:
      response indicating success or failure.