Skip to content

User

GET /api/v1/user/me

Authentication: BearerAuth.

StatusDescriptionBody
200OKMeResponse
401UnauthorizedErrorResponse
404Not FoundErrorResponse
500Internal Server ErrorErrorResponse

PATCH /api/v1/user/me

Authentication: BearerAuth.

application/json, required: UpdateMeRequest

Fields to update

FieldTypeRequiredDescription
avatar_urlstringNo
first_namestringNoAt least 1 character. At most 50 characters.
last_namestringNoAt least 1 character. At most 50 characters.
StatusDescriptionBody
200OKUser
400Bad RequestErrorResponse
401UnauthorizedErrorResponse
404Not FoundErrorResponse
500Internal Server ErrorErrorResponse

POST /api/v1/user/me/avatar

Accepts a multipart form with a single “file” field (JPEG, PNG, or WebP). The image is re-encoded to a 512px JPEG (stripping metadata), stored in object storage, and the user’s avatar_url is updated. A previous avatar is deleted.

Authentication: BearerAuth.

multipart/form-data, required: object

Image file to upload

FieldTypeRequiredDescription
filestringYesImage file to upload
StatusDescriptionBody
200OKUser
400Bad RequestErrorResponse
401UnauthorizedErrorResponse
404Not FoundErrorResponse
413Request Entity Too LargeErrorResponse
415Unsupported Media TypeErrorResponse
500Internal Server ErrorErrorResponse

DELETE /api/v1/user/me/avatar

Clears the user’s avatar_url and deletes the stored object.

Authentication: BearerAuth.

StatusDescriptionBody
200OKUser
401UnauthorizedErrorResponse
404Not FoundErrorResponse
500Internal Server ErrorErrorResponse

POST /api/v1/user/me/mfa/totp

Returns a new TOTP secret, shown once. TOTP is on only after POST /user/me/mfa/totp/confirm proves the app has it.

Authentication: BearerAuth.

StatusDescriptionBody
200OKTOTPEnrollmentResponse
401UnauthorizedErrorResponse
409ConflictErrorResponse
500Internal Server ErrorErrorResponse

POST /api/v1/user/me/mfa/totp/confirm

Returns ten recovery codes, shown once; each signs in once in place of a code.

Authentication: BearerAuth.

application/json, required: MFACodeRequest

Current code from the app

FieldTypeRequiredDescription
codestringYesAt most 32 characters.
StatusDescriptionBody
200OKRecoveryCodesResponse
400Bad RequestErrorResponse
401UnauthorizedErrorResponse
409ConflictErrorResponse
429Too Many RequestsErrorResponse
500Internal Server ErrorErrorResponse

POST /api/v1/user/me/mfa/totp/disable

Takes a current code or a recovery code, so an access token alone cannot remove the second factor.

Authentication: BearerAuth.

application/json, required: MFACodeRequest

Current or recovery code

FieldTypeRequiredDescription
codestringYesAt most 32 characters.
StatusDescriptionBody
204No ContentNone
400Bad RequestErrorResponse
401UnauthorizedErrorResponse
409ConflictErrorResponse
429Too Many RequestsErrorResponse
500Internal Server ErrorErrorResponse

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