Skip to content

Auth

Section titled “Mail a new verification link to the signed-in account”

POST /api/v1/auth/email/resend

Authentication: BearerAuth.

StatusDescriptionBody
202AcceptedNone
401UnauthorizedErrorResponse
429Too Many RequestsErrorResponse
500Internal Server ErrorErrorResponse
Section titled “Confirm an email address from a mailed link”

POST /api/v1/auth/email/verify

application/json, required: EmailTokenRequest

Token from the link

FieldTypeRequiredDescription
tokenstringYesAt most 128 characters.
StatusDescriptionBody
204No ContentNone
400Bad RequestErrorResponse
429Too Many RequestsErrorResponse
500Internal Server ErrorErrorResponse

GET /api/v1/auth/github

StatusDescriptionBody
302FoundNone
503Service UnavailableErrorResponse (text/plain)

GET /api/v1/auth/github/callback

NameInTypeRequiredDescription
codequerystringYesAuthorization code from GitHub
statequerystringYesCSRF state echoed from BeginGitHub
StatusDescriptionBody
302FoundNone
400Bad RequestErrorResponse (text/plain)
403ForbiddenErrorResponse (text/plain)
409ConflictErrorResponse (text/plain)

GET /api/v1/auth/google

StatusDescriptionBody
302FoundNone
503Service UnavailableErrorResponse (text/plain)

GET /api/v1/auth/google/callback

NameInTypeRequiredDescription
codequerystringYesAuthorization code from Google
statequerystringYesCSRF state echoed from BeginGoogle
StatusDescriptionBody
302FoundNone
400Bad RequestErrorResponse (text/plain)
403ForbiddenErrorResponse (text/plain)
409ConflictErrorResponse (text/plain)

POST /api/v1/auth/login

application/json, required: LoginRequest

Email and password

FieldTypeRequiredDescription
emailstringYes
passwordstringYes
StatusDescriptionBody
200OKAuthResponse
202Password checked out; finish with POST /auth/mfa/verifyMFAChallengeResponse
400Bad RequestErrorResponse
401UnauthorizedErrorResponse
403ForbiddenErrorResponse
429Too Many RequestsErrorResponse
500Internal Server ErrorErrorResponse

POST /api/v1/auth/logout

Revokes the session in the httpOnly cookie and clears it. Requires the session’s CSRF token in X-CSRF-Token and an allowed console origin.

NameInTypeRequiredDescription
X-CSRF-TokenheaderstringYesThe csrf_token issued with the session
StatusDescriptionBody
204No ContentNone
403ForbiddenErrorResponse
500Internal Server ErrorErrorResponse

POST /api/v1/auth/mfa/verify

Takes the ticket from a sign-in that answered mfa_required and a one-time or recovery code, and starts the session. The request must come from an allowed console origin.

application/json, required: MFAVerifyRequest

Ticket and code

FieldTypeRequiredDescription
codestringYesCode is a six-digit one-time code or a recovery code. At most 32 characters.
ticketstringYesAt most 256 characters.
StatusDescriptionBody
200OKAuthResponse
400Bad RequestErrorResponse
401UnauthorizedErrorResponse
403ForbiddenErrorResponse
429Too Many RequestsErrorResponse
500Internal Server ErrorErrorResponse

POST /api/v1/auth/oauth/exchange

application/json, required: OAuthExchangeRequest

One-time code from the OAuth callback redirect

FieldTypeRequiredDescription
codestringYes
StatusDescriptionBody
200OKAuthResponse
202Finish with POST /auth/mfa/verifyMFAChallengeResponse
400Bad RequestErrorResponse
401UnauthorizedErrorResponse
403ForbiddenErrorResponse
429Too Many RequestsErrorResponse

POST /api/v1/auth/password/forgot

Always answers 202, whether or not the email belongs to an account.

application/json, required: ForgotPasswordRequest

Account email

FieldTypeRequiredDescription
emailstringYesAt most 255 characters.
StatusDescriptionBody
202AcceptedNone
400Bad RequestErrorResponse
429Too Many RequestsErrorResponse
500Internal Server ErrorErrorResponse

POST /api/v1/auth/password/reset

Signs the account out of every session.

application/json, required: ResetPasswordRequest

Token and new password

FieldTypeRequiredDescription
passwordstringYesAt least 8 characters. At most 72 characters.
tokenstringYesAt most 128 characters.
StatusDescriptionBody
204No ContentNone
400Bad RequestErrorResponse
429Too Many RequestsErrorResponse
500Internal Server ErrorErrorResponse

Rotate the session and get a new access token

Section titled “Rotate the session and get a new access token”

POST /api/v1/auth/refresh

Reads the httpOnly session cookie, rotates it and returns new access and CSRF tokens. The request must come from an allowed console origin. A refresh token used before revokes the whole session.

StatusDescriptionBody
200OKAuthResponse
401UnauthorizedErrorResponse
403ForbiddenErrorResponse
429Too Many RequestsErrorResponse
500Internal Server ErrorErrorResponse

POST /api/v1/auth/signup

application/json, required: SignUpRequest

Credentials and profile fields

FieldTypeRequiredDescription
emailstringYesAt most 255 characters.
first_namestringYesAt most 50 characters.
last_namestringYesAt most 50 characters.
passwordstringYesBcrypt silently truncates passwords over 72 bytes, so we cap at 72. At least 8 characters. At most 72 characters.
StatusDescriptionBody
201CreatedAuthResponse
400Bad RequestErrorResponse
403ForbiddenErrorResponse
409ConflictErrorResponse
429Too Many RequestsErrorResponse
500Internal Server ErrorErrorResponse

Part of Crewlet. Generated from the OpenAPI document of the API, version 0.1.0.