Update organization invitation status

PUT /api/organization-invitations/{id}/status

Update the status of an organization invitation by ID.

Path parameters

  • id string Required

    The unique identifier of the organization invitation.

application/json

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.

  • status string Required

    The status of the organization invitation.

    Values are Accepted or Revoked.

Responses

  • 200 application/json

    The organization invitation status was updated successfully.

    Hide response attributes Show response attributes object
  • 400

    Bad Request

  • 401

    Unauthorized

  • 403

    Forbidden

  • 422

    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 "Content-Type: application/json" \
 -d '{"acceptedUserId":"string","status":"Accepted"}'
Request examples
{
  "acceptedUserId": "string",
  "status": "Accepted"
}
Response examples (200)
{
  "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"
    }
  ]
}