Skip to main content
GET
/
api
/
adm
/
invitations
/
getPendingInvitations
Get Pending Invitations by Company
curl --request GET \
  --url https://localhost:44371/api/adm/invitations/getPendingInvitations \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "code": 200,
  "errorMessage": null,
  "entries": []
}

Description

Returns only invitations with Pending status (not accepted, expired, or cancelled) for a specific company. This endpoint is optimized for administrative dashboards showing users who have been invited but haven’t yet completed registration.

Input

  • Query Parameter: model (PendingUserInvitationsByCompanyIdQueryRequest, required) — Request containing:
    • companyId (guid, required) — Company identifier to query.

Output

Returns a PendingUserInvitationsByCompanyIdQueryReponse containing pending invitations or an empty list if none found.

Example Request

GET /api/admin/userInvitations/pending?companyId=3fa85f64-5717-4562-b3fc-2c963f66afa6
Authorization: Bearer {token}

Example Response

{
  "success": true,
  "code": 200,
  "errorMessage": null,
  "invitations": [
    {
      "id": "9ef15c43-a955-6f4h-c7g3-1h6d4f0e3g9c",
      "email": "[email protected]",
      "status": "Pending",
      "expirationDate": "2025-11-05T00:00:00Z"
    }
  ]
}

Errors

  • 400 Bad Request — Missing or invalid company ID.
  • 404 Not Found — Company does not exist.

Notes

  • Only returns invitations in Pending status; excludes accepted, expired, or cancelled invitations.
  • Empty results indicate no pending invitations for the company.
  • Expired invitations with Pending status are included; use expirationDate to filter client-side.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Query Parameters

CompanyId
string<guid>

The identifier of the company owning the invitations.

Response

Always returned. Check the success property in the response body to determine if the operation succeeded.

Standard response structure containing operation status and error information. Standard query response containing a collection of matching entities. Represents a paginated collection of pending user invitations for a company.

success
boolean

True if the operation completed successfully; false if an error occurred.

Example:

true

code
enum<string>

Result code indicating the outcome of the operation.

Available options:
Unknown,
Success,
BadRequest,
Unauthorized,
NotFound,
Error
Example:

200

errorMessage
string | null

Human-readable error message when an error occurs.

Example:

null

entries
object[] | null

Collection of entities matching the query criteria.

Example:
[]