Accept invitation
POST /api/organizations/members/invite/accept
Accept an organization invitation via authenticated POST request. This endpoint is called by the frontend after displaying the acceptance modal. Requires authentication - cookies are sent because this is a same-origin request. Args: request_data: Contains the invitation token user_id: Authenticated user ID (from dependency) Returns: AcceptInvitationResponse: Success response with organization details Raises: HTTPException 400: Invalid or expired token HTTPException 403: Email mismatch HTTPException 409: User already a member
Request body
| Field | Type | Required | Description |
|---|---|---|---|
token | string | yes | — |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
Response body
| Field | Type | Required | Description |
|---|---|---|---|
success | boolean | yes | — |
org_id | string | yes | — |
org_name | string | yes | — |
role | string | yes | — |
Operation ID: accept_invitation_api_organizations_members_invite_accept_post