---
title: "Sign in with email + password"
method: POST
path: "/auth/sign-in"
tags: ["Auth"]
---

# Sign in with email + password

`POST /auth/sign-in`

## Request

- Base URL: `https://api.mnemom.ai/v1`
- URL: `https://api.mnemom.ai/v1/auth/sign-in`
- Auth: none required

Server-enforces SSO for org-enforced domains (returns 403 with `code: sso_required`). For users with a verified TOTP factor, returns 200 `{ mfa_required: true, factor_id }` and sets a short-lived `mnemom_mfa_pending` cookie; otherwise issues `mnemom_session` and returns `{ user }`. When the deployment enforces Cloudflare Turnstile on sign-in, a missing or invalid `turnstile_token` returns 403 before the password is checked.

## Request body

- object
  - `email` string, email, required
  - `password` string, password, required
  - `turnstile_token` string: Cloudflare Turnstile token from the sign-in form. Optional; verified only when the deployment enforces Turnstile on sign-in.

## Response `200`

Full session issued OR MFA step-up required.

- union
  - object
    - `user` User, required: Supabase user shape. Fields beyond `id` and `email` are passthrough.
      - `id` string, uuid
      - `email` string, email
      - `app_metadata` object
      - `user_metadata` object
  - object
    - `mfa_required` true, required
    - `factor_id` string, required

## Other responses

- `400`: Bad request
- `401`: Authentication required
- `403`: Forbidden
- `415`: Body is not declared `application/json` (`unsupported_media_type`). Login-CSRF guard: a cross-site `<form enctype="text/plain">` cannot deliver a parseable body.
- `429`: Rate-limit exceeded. The global per-IP limiter (100 requests/minute, applied to every `/v1/*` route) rejected this request. Back off until the window resets — `Retry-After` carries the cooldown in seconds and `X-RateLimit-Reset` the absolute reset time.
- `500`: Server error — request was well-formed but the server failed to fulfill it. Typically a downstream dependency (DB / RPC / external API) returned an unexpected error.
- `502`: An upstream dependency returned an invalid response.
- `503`: An upstream dependency is currently unavailable. The request was not processed; retry after the cooldown window.

---

[API](https://skmtc.dev/mnemom/apis/mnemom-api.md) · [All operations](https://skmtc.dev/mnemom/apis/mnemom-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mnemom/apis/mnemom-api/revisions/274b7a6ea182?raw)
