Accept an invitation by its link's token
The console's `/invite/<token>` page posts the token after sign-in. The caller's verified email must be the invited one (403 `invite-email-mismatch`): the link is a way in, not a credential. 409 `invite-invalid` for an unknown token or an invitation that was revoked, has expired, or was accepted by someone else (or by the caller who has left its target since). The sign-in accepts pending invitations of the verified email before this page posts, so the caller's own acceptance answers 200 again with the same invitation.
openapi/harthelm.yaml at v1.5.0__Host-harthelm_session<token>Browser session of the UI (12 h idle, 7 days absolute). State-changing requests also need the header
Harthelm-CSRF: 1 and a matching Origin.
application/json- body
token*string1 <= length <= 128The accepted invitation.
application/json- response
id*stringuuidemail*stringorg_id*stringuuidorg_name?stringteam_id?IDAbsent for an organization invitation.
int641 <= valueteam_name?stringrole*stringowner or member for an organization invitation, admin or member for a team invitation.
"owner""admin""member"invited_by?A user as member lists show them.
state*InviteState"pending""accepted""revoked""expired"mail*InviteMailStateoff: mail is not configured, copy the link instead.
"off""queued""sent""failed"created_at*stringdate-timeexpires_at*stringdate-timeaccepted_at?stringdate-timecurl -X POST 'https://console.example.com/api/v1/invites/accept' \ -H 'Content-Type: application/json' \ -d '{ "token": "string"}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "email": "string", "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b", "org_name": "string", "team_id": 1, "team_name": "string", "role": "owner", "invited_by": { "id": 1, "name": "string", "email": "string", "picture_url": "string" }, "state": "pending", "mail": "off", "created_at": "2019-08-24T14:15:22Z", "expires_at": "2019-08-24T14:15:22Z", "accepted_at": "2019-08-24T14:15:22Z"}The caller's Git provider connections
The providers the caller connected (*Git connections*), with the number of live workspaces the caller owns whose origin is at that provider: disconnecting stops the git proxy for them until the caller connects again or an admin transfers their ownership. Connecting is the navigation `/auth/git/{provider}/start`; disconnecting is `DELETE /git/providers/{provider}/connection`.
Accept an invitation
The caller's verified email must be the invited one (403 `invite-email-mismatch`); a team invitation makes the caller a member of the organization first. 409 `invite-invalid` when it was revoked, has expired, or was accepted by someone else or by the caller who has left its target since; the caller's own acceptance answers 200 again.