---
title: "Login"
method: POST
path: "/auth/session/login"
tags: ["Session"]
---

# Login

`POST /auth/session/login`

Login to an account.

## Request body

- union
  - object
    - `email` string, required — Email
    - `password` string, required — Password
    - `friendly_name` string, nullable — Friendly name used for the session
  - object
    - `mfa_ticket` string, required — Unvalidated or authorised MFA ticket Used to resolve the correct account
    - `mfa_response` union — MFA response
      - object
        - `password` string, required
      - object
        - `recovery_code` string, required
      - object
        - `totp_code` string, required
    - `friendly_name` string, nullable — Friendly name used for the session

## Response `200`

- union
  - object
    - `result` 'Success', required
    - `_id` string, required — Unique Id
    - `user_id` string, required — User Id
    - `token` string, required — Session token
    - `name` string, required — Display name
    - `last_seen` string, date-time, required — ISO8601 formatted timestamp
    - `origin` string, nullable — Where the session is originating from
    - `subscription` WebPushSubscription — Web Push subscription
      - `endpoint` string, required
      - `p256dh` string, required
      - `auth` string, required
  - object
    - `result` 'MFA', required
    - `ticket` string, required
    - `allowed_methods` MFAMethod[], required
  - object
    - `result` 'Disabled', required
    - `user_id` string, required

## Other responses

- `default` — An error occurred.

## Changes

> 6 revisions in range; 3 could not be searched.

- **2026-07-26** `7a23c8b93766` — 2 breaking, 1 info
  - added `subschema #1, subschema #2` to the response body `oneOf` list for the response status `200`
  - added `subschema #65, subschema #66, subschema #67, subschema #81, subschema #82, subschema #83, subschema #84, subschema #85, subschema #86, subschema #87, subschema #88, subschema #89, subschema #90, subschema #91, subschema #92, subschema #93, subschema #94, subschema #95` to the response body `oneOf` list for the response status `default`
  - removed `subschema #1, subschema #2` from the response body `oneOf` list for the response status `200`

[Change history](https://skmtc.dev/revolt/apis/revolt-api/changes/auth/session/login/post.md)

---

[API](https://skmtc.dev/revolt/apis/revolt-api.md) · [All operations](https://skmtc.dev/revolt/apis/revolt-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/revolt/revolt-api/revisions/a09d9d97fec9/schema)
