def resend(
id: str,
*,
timeout: float | None = None,
) -> InviteResourceasync def resend(
id: str,
*,
timeout: float | None = None,
) -> InviteResourceRe-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:
| Condition | Status | Message |
|---|---|---|
| No pending invite with that id in the workspace | 404 | Invite not found. |
| The invite has already expired | 409 | This 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'])import asyncio
from envless import AsyncEnvless
async def main() -> None:
async with AsyncEnvless() as envless:
invite = await envless.invites.resend('inv_2Nk9')
print(invite['resendCount'], invite['lastResendAt'])
asyncio.run(main())Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | str | Yes | Invite id taken from a list call. |
timeout | float | No | Seconds 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.
resendCountis bumped before the email is handed off, but a failed send rolls it back along withlastResendAt, so a 500 leaves the counters where they were.resendCountandlastResendAtare 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.