Update the status of an organization invitation by ID.
Responses
-
The organization invitation status was updated successfully.
-
Bad Request
-
Unauthorized
-
Forbidden
-
The organization invitation status could not be updated.
-organization.invitation_status_not_changeable: The current status is not "Pending".
-organization.accepted_user_id_required: The status is "Accepted" butacceptedUserIdis not provided.
-organization.accepted_user_email_mismatch: The primary email of the accepted user does not match the invitee.
PUT
/api/organization-invitations/{id}/status
curl \
--request PUT 'https://[tenant_id].logto.app/api/organization-invitations/{id}/status' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"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"
}
]
}