Invites

envless.invites.resend()

Send the invitation email again

def resend(
    id: str,
    *,
    timeout: float | None = None,
) -> InviteResource

Re-delivers the email for an invite that is still pending. Nothing new is created: the invite keeps its id, its token and its original expiresAt, which means resending does not buy the recipient more time. An invite that has already expired cannot be rescued this way, so revoke it and send a fresh one with members.invite.

A resend is not rate limited. There is no cap on how many times one invite can be sent again and no cooldown between calls, so a recipient who lost the email can be sent another one immediately. Only two things refuse the call:

ConditionStatusMessage
No pending invite with that id in the workspace404Invite not found.
The invite has already expired409This invitation has expired. Revoke it and invite the address again to send a fresh link.

The returned invite always has 'role': None on this route, since the endpoint does not re-resolve the role. Read the role from a list call if you need it. resendCount and lastResendAt do reflect the bump.

Example

from envless import envless

invite = envless.invites.resend('inv_2Nk9')

print(invite['resendCount'], invite['lastResendAt'])

Parameters

ParameterTypeRequiredDescription
idstrYesInvite id taken from a list call.
timeoutfloatNoSeconds each attempt of this call may take, the response body included, before it raises EnvlessNetworkError with is_timeout set. Overrides the client's timeout for this call, and 0 turns the limit off.

Returns

InviteResource for the same invite, with an incremented resendCount and a None role.

Worth knowing

  • There is no request body and the success status is 200, not 201.
  • resendCount is bumped before the email is handed off, but a failed send rolls it back along with lastResendAt, so a 500 leaves the counters where they were.
  • resendCount and lastResendAt are bookkeeping only. Nothing is enforced against them, so read them to see how often an invite has been chased rather than to work out what is left.
  • Both counters are per invite, not per address. Revoking a pending invite and inviting the address again starts a fresh count with a fresh expiry.

Required scopes

members:write

Underlying endpoint

POST /invites/{id}/resend

Request and response schema, every error code, and a live playground.

In TypeScript

envless.invites.resend()

The same method in @goenvless/sdk, with the same request, retries and errors.