Skip to content

Conversation

@antn
Copy link
Member

@antn antn commented Nov 18, 2025

Toward AUTH-5515.

Description

This adds support for the new resend invitation endpoint.

It can be used like this:

invitation = workos_client.user_management.resend_invitation(
    invitation_id="Z1uX3RbwcIl5fIGJJJCXXisdI"
)

Documentation

Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.

[x] Yes

If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.

https://github.com/workos/workos/pull/47145

@antn antn self-assigned this Nov 18, 2025
@antn antn requested a review from a team as a code owner November 18, 2025 09:47
@antn antn requested a review from csrbarber November 18, 2025 09:47
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Nov 18, 2025

Greptile Summary

  • Added resend_invitation method to support resending invitations via new API endpoint
  • Implemented in both sync (UserManagement) and async (AsyncUserManagement) classes with matching signatures
  • Includes comprehensive test coverage for success and error scenarios (not found, expired, revoked, accepted)

Confidence Score: 5/5

  • This PR is safe to merge with no concerns.
  • The implementation follows existing patterns perfectly, includes both sync and async versions, has comprehensive test coverage including error cases, and introduces no security concerns or breaking changes.
  • No files require special attention.

Sequence Diagram

sequenceDiagram
    participant User
    participant WorkOSClient
    participant UserManagement
    participant HTTPClient
    participant WorkOSAPI

    User->>WorkOSClient: resend_invitation(invitation_id)
    WorkOSClient->>UserManagement: resend_invitation(invitation_id)
    UserManagement->>HTTPClient: request(POST /invitations/{id}/resend)
    HTTPClient->>WorkOSAPI: POST /user_management/invitations/{id}/resend
    WorkOSAPI-->>HTTPClient: 200 OK (invitation data)
    HTTPClient-->>UserManagement: response
    UserManagement->>UserManagement: Invitation.model_validate(response)
    UserManagement-->>WorkOSClient: Invitation object
    WorkOSClient-->>User: Invitation object
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 files reviewed, no comments

Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format

@linear
Copy link

linear bot commented Nov 18, 2025

@antn antn merged commit 2aa2bb6 into main Nov 19, 2025
6 checks passed
@antn antn deleted the resend-invite branch November 19, 2025 00:50
@antn antn mentioned this pull request Nov 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants