Create a system for inviting users to organisations via email with time-limited invitation links, supporting multiple invitations at once.
Authentication and Authorization
API endpoint require a valid JWT token in the Authorization header
Only users with the "Admin" role for the specific organization can send invitations
Acceptance Criteria
Admins can send invitations to single or multiple email addresses
Admins can specify which organisation a user can be invited to
System supports sending up to 50 invitations in a single request
Data Validation and Sanitization:
The API should validate the request payload to ensure the email field is present and valid
The API should validate that the org_id is a valid UUID
The JWT in the Authorization header must be valid and not expired
The API should validate that the requesting user has admin rights for the specified organization
Purpose
To invite users to join an organisation by sending secure, time-limited invite links via emails
Expected Outcome
A fully functional invitation system that allows organisation admins to invite new members and users (single or multiple) to join organisations through secure, time-limited invitation links sent to their email addresses.
Description
Create a system for inviting users to organisations via email with time-limited invitation links, supporting multiple invitations at once.
Authentication and Authorization
Acceptance Criteria
Data Validation and Sanitization:
Purpose
Expected Outcome
API Endpoints
1. Send Invitation(s) [POST] /api/v1/organisations/send-invite
Request Headers: Authorization: Bearer
Request Body:
Success Response (201 Created):
Error Handling
Requirements
Testing