Skip to content

Feature Request: Add resend_invitation operation #227

@max-zheng

Description

@max-zheng

Problem

The SDK supports send_invitation and revoke_invitation, but not resending a pending invitation. Currently we have to make a direct HTTP call:

client.post(format!(
    "{}/user_management/invitations/{}/resend",
    base_url, invitation_id
))
.bearer_auth(&api_key)
.send()
.await

Proposed Solution

Add a ResendInvitation trait following the existing pattern:

pub struct ResendInvitationParams<'a> {
    pub invitation_id: &'a InvitationId,
}

#[async_trait]
pub trait ResendInvitation {
    async fn resend_invitation(
        &self,
        params: &ResendInvitationParams<'_>,
    ) -> WorkOsResult<Invitation, ResendInvitationError>;
}

API Reference

WorkOS Docs: Resend an invitation

POST /user_management/invitations/{invitation_id}/resend

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions