Accept Invitation Edge Function
Handles the acceptance of team invitations, creating the necessary client and site memberships for the authenticated user.
POST /accept-invitation
Required - JWT in Authorization header
{ "token": "abc123-invitation-token" } Copy
{ "token": "abc123-invitation-token" }
200 - Success with client details (client_id, client_name, role)
400 - Invalid/expired invitation, missing token, or already a member
401 - Missing or invalid authorization header
403 - Email mismatch (invitation sent to different email)
404 - Invitation not found
500 - Internal server error
Fileoverview
Accept Invitation Edge Function
Handles the acceptance of team invitations, creating the necessary client and site memberships for the authenticated user.
Endpoint
POST /accept-invitation
Auth
Required - JWT in Authorization header
Remarks
Example: Request body
Returns
200 - Success with client details (client_id, client_name, role)
Returns
400 - Invalid/expired invitation, missing token, or already a member
Returns
401 - Missing or invalid authorization header
Returns
403 - Email mismatch (invitation sent to different email)
Returns
404 - Invitation not found
Returns
500 - Internal server error