POST /api/organizations/{org_id}/members/invite
Create organization invitations for multiple email addresses. Sends emails to invitees with secure links to join the organization. Supports batch invitations - some may succeed while others fail. Permission rules: - Only owners and admins can create invitations - Admins can only invite with 'member' or 'admin' role (not 'owner') - Owners can invite with any role Args: org_id: Organization UUID invitation_data: Invitation details (emails array, role) request: FastAPI request user_id: Authenticated user ID (from dependency) Returns: BatchInvitationResponse: Lists of successful and failed invitations Raises: HTTPException 400: Invalid role or organization not found HTTPException 403: User lacks permission to invite HTTPException 429: Rate limit exceeded
Parameters
| Name | In | Type | Required | Description |
|---|
org_id | path | string | yes | — |
X-Org-Id | header | `string | null` | no |
Request body
| Field | Type | Required | Description |
|---|
emails | string[] | yes | — |
role | string | no | — |
Responses
| Status | Description |
|---|
201 | Successful Response |
422 | Validation Error |
Response body
| Field | Type | Required | Description |
|---|
successful | InvitationResponse[] | yes | — |
failed | InvitationFailure[] | yes | — |
email_delivery_configured | boolean | no | — |
Operation ID: create_invitation_api_organizations__org_id__members_invite_post