Update organization invitation status

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://openapi.logto.io/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "Logto API references MCP server": {
    "url": "https://openapi.logto.io/mcp"
  }
}

Close
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 128.

  • 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
    • tenantId string Required

      Maximum length is 21.

    • id string Required

      Minimum length is 1, maximum length is 21.

    • inviterId string | null Required

      Maximum length is 128.

    • invitee string Required

      Minimum length is 1, maximum length is 256.

    • acceptedUserId string | null Required

      Maximum length is 128.

    • organizationId string Required

      Minimum length is 1, maximum length is 21.

    • status string Required

      Values are Pending, Accepted, Expired, or Revoked.

    • createdAt number Required
    • updatedAt number Required
    • expiresAt number Required
    • organizationRoles array[object] Required
      Hide organizationRoles attributes Show organizationRoles attributes object
      • id string Required
      • name string Required
  • 400

    Bad Request

  • 401

    Unauthorized

  • 403

    Forbidden

  • 422

    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" but acceptedUserId is 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"
    }
  ]
}