Skip to main content

Create invitation

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

NameInTypeRequiredDescription
org_idpathstringyes
X-Org-Idheader`stringnull`no

Request body

FieldTypeRequiredDescription
emailsstring[]yes
rolestringno

Responses

StatusDescription
201Successful Response
422Validation Error

Response body

FieldTypeRequiredDescription
successfulInvitationResponse[]yes
failedInvitationFailure[]yes
email_delivery_configuredbooleanno

Operation ID: create_invitation_api_organizations__org_id__members_invite_post