Update organization invitation status
Update the status of an organization invitation by ID.
Path parameters
-
The unique identifier of the organization invitation.
Body Required
The organization invitation status to update.
-
acceptedUserId string | null
The ID of the user who accepted the organization invitation. Required if the status is "Accepted".
Maximum length is
21
. -
The status of the organization invitation.
Values are
Accepted
orRevoked
.
Responses
-
200 application/json
The organization invitation status was updated successfully.
-
Bad Request
-
Unauthorized
-
Forbidden
-
The organization invitation status could not be updated. This can happen if the current status is not "Pending" or if the status is "Accepted" and the accepted user ID is not provided.
PUT
/api/organization-invitations/{id}/status
curl \
-X PUT https://[tenant_id].logto.app/api/organization-invitations/{id}/status \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"acceptedUserId":"string","status":"Accepted"}'
Request examples
{
"acceptedUserId": "string",
"status": "Accepted"
}
Response examples (200)
{
"tenantId": "string",
"id": "string",
"inviterId": "string",
"invitee": "string",
"acceptedUserId": "string",
"organizationId": "string",
"status": "Pending",
"createdAt": 42.0,
"updatedAt": 42.0,
"expiresAt": 42.0,
"organizationRoles": [
{
"id": "string",
"name": "string"
}
]
}