SuperAI Flow Platform

Sections

Theme switcher

Resend user invitation email

Resend invitation email to an existing user account.

Triggers a new invitation email when the original invitation has expired, was not received, or the user needs another copy. The new invitation includes a fresh authentication link and account setup instructions.

Context: - User must already exist in the system with pending or active status - Email service managed by Supabase authentication backend - Invitation link expires after configured timeout (typically 24-72 hours) - Multiple invitations can be sent to the same user - Each invitation invalidates previous invitation tokens - Does not modify user account status or profile data

Behavior: 1. Validates email format in request body 2. Logs invitation request for audit purposes 3. Calls Supabase admin service to generate and send invitation 4. Queues invitation email for delivery via external email service 5. Returns success response immediately (email delivery is async) 6. Raises 500 error if authentication service is unavailable

Use Cases: - User reports not receiving original invitation email - Invitation link has expired (typically after 24-72 hours) - User accidentally deleted invitation email - Organization admin needs to re-invite inactive user - Testing user onboarding flow in development

Email Delivery: - Invitation sent asynchronously by Supabase auth service - success=true indicates request was accepted, not that email was delivered - Check email service logs for actual delivery confirmation - Email may be delayed due to rate limiting or provider issues - User should check spam/junk folder if email not received

Security Considerations: - Each invitation generates unique time-limited authentication token - Previous invitation tokens are invalidated when new one is sent - Email address must match existing user account (no arbitrary emails) - Rate limiting recommended to prevent invitation spam

Related Endpoints: - POST /admin/organizations/{org_id}/users - Create new user with initial invite - GET /profile/me - User profile after successful authentication

Body Parameters

emailstring Required

Email address of the user to re-invite. Must match an existing user account in pending or active status. A new invitation email will be sent to this address with a fresh authentication link and setup instructions.

Response

200
Object
Invitation email successfully queued for delivery

Response Attributes

emailstring Required

Email address that received the invitation. Echoes back the requested email for confirmation. Useful for logging and audit purposes.

messagestring Required

Human-readable message describing the result. Provides confirmation or additional context about the operation. Example: 'Invitation has been resent successfully'

successboolean Required

Indicates whether the invitation was successfully processed. True if invitation was queued/sent, False if operation failed. Note: This indicates the API succeeded, not that email was delivered.

404
Object
User with specified email address does not exist

Response Attributes

errorobject Required

Standard error detail structure.

This model matches the error format returned by the centralized exception handlers in app/api/errors/handlers.py.

Show child attributes

request_idnull
422
Object
Unprocessable Entity - Request validation failed

Response Attributes

errorobject Required

Standard error detail structure.

This model matches the error format returned by the centralized exception handlers in app/api/errors/handlers.py.

Show child attributes

request_idnull
500
Object
Authentication service unavailable or email delivery failed

Response Attributes

errorobject Required

Standard error detail structure.

This model matches the error format returned by the centralized exception handlers in app/api/errors/handlers.py.

Show child attributes

request_idnull
Was this section helpful?

What made this section unhelpful for you?

POST

/

Select
1

Response

Was this section helpful?

What made this section unhelpful for you?

View as Markdown

Ask an AI

Open in ChatGPTOpen in ClaudeOpen in Perplexity

Code with AI

Open in Copilot