---
title: "Login with email and password"
method: POST
path: "/auth/login"
tags: ["Auth"]
---

# Login with email and password

`POST /auth/login`

## Request

- Base URL: `http://localhost:5000/api/v1`
- URL: `http://localhost:5000/api/v1/auth/login`
- Auth: none required
- TypeScript: <https://skmtc.dev/scrubbe/apis/scrubbe-api/docs/auth/login/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- object
  - `email` string, email, required
  - `password` string, required

## Response `200`

Login successful

- AuthResponse
  - `user` User
    - `id` string, uuid
    - `email` string, email
    - `firstName` string
    - `lastName` string
    - `isVerified` boolean
    - `accountType` 'DEVELOPER' | 'BUSINESS'
    - `businessId` string, nullable
    - `roles` string[]
    - `createdAt` string, date-time
  - `tokens` AuthTokens
    - `accessToken` string
    - `refreshToken` string

## Other responses

- `401`: Invalid credentials

---

[API](https://skmtc.dev/scrubbe/apis/scrubbe-api.md) - [All operations](https://skmtc.dev/scrubbe/apis/scrubbe-api/llms.txt) - [OpenAPI document](https://skmtc.dev/scrubbe/apis/scrubbe-api/revisions/45bb33d61b7e?raw)
