Chelabase
Login apiLogin

Accept Invite

POST
/auth/v1/accept-invite

Accepts a member invite and signs in (the HttpOnly session cookie). With user and code (the code from the invite email), the code sets the first password and verifies the email; an account someone else registered without proving the email has its old password replaced and every session ended. With email (an existing account, from the invite notice), the account's own password signs in and no password is set. The link's token t must match an open invite. A removed member's ban is lifted only then; any other ban is member_suspended. If a step after the code fails, the error is invite_incomplete with error.accept_ticket: send it back in place of code, with the same password, to finish. A weak password is refused before the code is used.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

One of three shapes: user + code (a new person, or an account nobody proved: the code sets the first password), user + acceptTicket (a retry after the code was spent), or email (an existing account, from the code-less notice: password is its own). t is always the link's token.

acceptTicket?|

From an invite_incomplete error: finishes the steps after the (spent) code. Send it in place of code, with the same password.

code?|

The six-digit invite code from the invite email, or from the admin's link.

email?|

An existing account's email (the notice's link carries only t).

password*string

The new password with code or acceptTicket; the account's own with email.

t*string

The invite link's token (t).

user?|

The invitee's identity user id, from a code link (?user=).

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/auth/v1/accept-invite" \  -H "Content-Type: application/json" \  -d '{    "password": "string",    "t": "string"  }'
{  "next": "studio"}