Skip to content

Add accepted_user_id to invitation#525

Merged
gjtorikian merged 3 commits intomainfrom
add-accepted-user-id-to-invitation
Feb 4, 2026
Merged

Add accepted_user_id to invitation#525
gjtorikian merged 3 commits intomainfrom
add-accepted-user-id-to-invitation

Conversation

@gjtorikian
Copy link
Contributor

Description

The documentation mentions this field, but it was not being returned via this SDK.

Documentation

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

[ ] Yes

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

@gjtorikian gjtorikian requested a review from a team as a code owner February 4, 2026 20:28
@gjtorikian gjtorikian requested a review from alisherry February 4, 2026 20:28
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 4, 2026

Greptile Overview

Greptile Summary

This PR adds the missing accepted_user_id field to the Invitation model to align the SDK with the WorkOS API documentation. The field is correctly typed as Optional[str] and follows the existing pattern for optional user ID fields in the model.

Additionally, the PR updates GitHub workflow files to use new bot credential variable names (SDK_BOT_APP_ID and SDK_BOT_PRIVATE_KEY instead of WORKOS_BOT_APP_ID and WORKOS_BOT_PRIVATE_KEY).

  • Added accepted_user_id: Optional[str] = None to InvitationCommon class
  • Updated credential references in release and version-bump workflows
  • No breaking changes, purely additive field to match API spec

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • The changes are minimal and low-risk: adding a single optional field to a Pydantic model and updating workflow credential variable names. The field addition follows existing patterns, is non-breaking, and aligns with API documentation. The workflow changes are administrative and don't affect runtime behavior.
  • No files require special attention

Sequence Diagram

sequenceDiagram
    participant API as WorkOS API
    participant SDK as workos-python SDK
    participant App as Application Code
    
    Note over API,App: Invitation Flow with accepted_user_id field
    
    App->>SDK: user_management.get_invitation()
    SDK->>API: GET /user_management/invitations/{id}
    API-->>SDK: JSON response with accepted_user_id
    SDK->>SDK: Parse into Invitation model
    Note over SDK: Now includes accepted_user_id field
    SDK-->>App: Invitation object
    
    Note over App: Application can now access<br/>invitation.accepted_user_id
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.

No files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@gjtorikian gjtorikian merged commit e17e241 into main Feb 4, 2026
11 checks passed
@gjtorikian gjtorikian deleted the add-accepted-user-id-to-invitation branch February 4, 2026 20:40
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.

2 participants