Skip to main content
POST
/
tenant
/
{tenantId}
/
admin
/
user
/
invitation
/
{id}
/
accept
AcceptTenantInvitation
curl --request POST \
  --url https://api.example.com/tenant/{tenantId}/admin/user/invitation/{id}/accept
{
  "isSuccess": true,
  "isFailure": false,
  "error": null,
  "value": {
    "id": 42,
    "name": "Example"
  }
}

Description

This endpoint accepts an invitation, adding the user to the tenant and establishing their membership.

Input

  • tenantId (path, required): Identifier of the tenant that issued the invitation
  • id (path, required): Identifier of the invitation to accept
  • cancellationToken (optional): Token to cancel the asynchronous operation

Output

Returns a Result<TenantViewModel> containing the tenant details now associated with the user.

Examples

Request:
POST /api/tenant/1024/invitations/9001/accept
Response (200 OK):
{
  "data": {
    "id": 1024,
    "name": "Acme Corp"
  },
  "isSuccess": true
}

Errors

  • 400 Bad Request: Invalid invitation identifier
  • 401 Unauthorized: Authentication credentials are missing or invalid
  • 403 Forbidden: User is not authorized to accept the invitation
  • 404 Not Found: Invitation does not exist
  • 409 Conflict: Invitation has already been processed
  • 500 Internal Server Error: Unexpected server error occurred

Notes

  • Only pending invitations can be accepted
  • User gains access to tenant immediately
  • Default roles may be assigned automatically

Path Parameters

tenantId
integer<int64>
required

Identifier of the tenant that issued the invitation.

id
integer<int64>
required

Identifier of the invitation to accept.

Response

Invitation accepted successfully.

Wrapper for API operation results containing success status, error information, and return value.

isSuccess
boolean

True if the operation completed successfully, false otherwise.

Example:

true

isFailure
boolean

True if the operation failed, false otherwise.

Example:

false

error
object

Error information returned when the operation fails.

Example:
{
"code": "ValidationError",
"message": "The request parameters failed validation.",
"info": [
"The Name field is required.",
"The Id field must be greater than 0."
]
}
value
object

The result value returned when the operation is successful.