API
Accept an invitation
Joins the workspace with the role and the addresses the invitation gives.
POST/account/invitations/{invitationId}/accept
Runs the real call on your workspace.
POST /account/invitations/{invitationId}/accept
Joins the workspace with the role and the addresses the invitation gives.
Example
Needs account:write. activate true also makes it the workspace the app opens for the person. The body can be left out.
curl -X POST "$OE/account/invitations/winv_6bb640f5b99e47deb758f1f5/accept" -H "$AUTH" \ -H "Content-Type: application/json" -d '{ "activate": true }'{ "object": "invitation", "id": "winv_6bb640f5b99e47deb758f1f5", "accepted": true, "workspaceId": "a8f3c2d1-6e4b-4c9a-b7d2-3f1e0c8a5b96", "workspaceName": "Globex", "addressesGranted": 2, "domainsGranted": 0, "activated": true}A workspace that asks everyone in it to sign in with two-factor authentication is a 403 two_factor_required until the person turns it on in the app.
An invitation that expired, was withdrawn or went to another address is a 422 (invitation_expired, invitation_revoked or invitation_wrong_account), and one that is not waiting any more a 404 invitation_not_found.
Accepting an invitation the person already accepted succeeds again and changes nothing.