# REST API: Auth

> The 8 operations of the area Auth, with parameters, bodies and responses.

Source: https://pithyx.org/docs/reference/api/auth/
Markdown: https://pithyx.org/docs/reference/api/auth.md

Generated from the daemon's OpenAPI document. Conventions, sign-in, the CSRF header and the WebSocket are on [API](https://pithyx.org/docs/developers/daemon/api/).

## POST /api/auth/login

**Request body**: `application/json`: [LoginRequest](https://pithyx.org/docs/reference/api/schemas/#loginrequest)

**Responses**

- 200: `application/json`: [LoginResponse](https://pithyx.org/docs/reference/api/schemas/#loginresponse)

Any failure answers with problem details (`application/problem+json`) and a stable code from the [error reference](https://pithyx.org/docs/reference/errors/).

## POST /api/auth/login/totp

**Request body**: `application/json`: [TotpLoginRequest](https://pithyx.org/docs/reference/api/schemas/#totploginrequest)

**Responses**

- 200: `application/json`: [UserInfo](https://pithyx.org/docs/reference/api/schemas/#userinfo)

Any failure answers with problem details (`application/problem+json`) and a stable code from the [error reference](https://pithyx.org/docs/reference/errors/).

## POST /api/auth/logout

**Responses**

- 204

Any failure answers with problem details (`application/problem+json`) and a stable code from the [error reference](https://pithyx.org/docs/reference/errors/).

## POST /api/auth/recover

**Request body**: `application/json`: [RecoverRequest](https://pithyx.org/docs/reference/api/schemas/#recoverrequest)

**Responses**

- 200: `application/json`: [RecoverResponse](https://pithyx.org/docs/reference/api/schemas/#recoverresponse)

Any failure answers with problem details (`application/problem+json`) and a stable code from the [error reference](https://pithyx.org/docs/reference/errors/).

## GET /api/auth/session

**Responses**

- 200: `application/json`: [UserInfo](https://pithyx.org/docs/reference/api/schemas/#userinfo)

Any failure answers with problem details (`application/problem+json`) and a stable code from the [error reference](https://pithyx.org/docs/reference/errors/).

## POST /api/auth/totp/confirm

**Request body**: `application/json`: [TotpConfirmRequest](https://pithyx.org/docs/reference/api/schemas/#totpconfirmrequest)

**Responses**

- 200: `application/json`: [RecoveryCodes](https://pithyx.org/docs/reference/api/schemas/#recoverycodes)

Any failure answers with problem details (`application/problem+json`) and a stable code from the [error reference](https://pithyx.org/docs/reference/errors/).

## POST /api/auth/totp/disable

**Request body**: `application/json`: [TotpDisableRequest](https://pithyx.org/docs/reference/api/schemas/#totpdisablerequest)

**Responses**

- 204

Any failure answers with problem details (`application/problem+json`) and a stable code from the [error reference](https://pithyx.org/docs/reference/errors/).

## POST /api/auth/totp/enroll

**Responses**

- 200: `application/json`: [TotpEnrollment](https://pithyx.org/docs/reference/api/schemas/#totpenrollment)

Any failure answers with problem details (`application/problem+json`) and a stable code from the [error reference](https://pithyx.org/docs/reference/errors/).
