---
title: "Log in"
method: POST
path: "/api/auth/login"
tags: ["Auth"]
---

# Log in

`POST /api/auth/login`

Authenticates a user based on valid credentials and returns JWT token and refresh token

## Request body

- LoginRequest — This Represents the request for the "/login" endpoint, handled by the HandleAsync method.
  - `email` string, email, required — The Email of the user. Must be a valid email address
  - `password` string, required — The Password of the account

## Response `200`

User has been successfully authenticated

- LoginResponse — A response record used in the Login result
  - `email` string — Email for the user initiating the successful login request
  - `accessToken` string — Access token returned upon success
  - `refreshToken` string — Refresh token returned upon success

## Other responses

- `400` — The supplied credentials are invalid!

## Changes

- **2025-03-24** `fbc3fe6ecbf1` — 2 breaking
  - the request property `password` became required
  - the `password` request property's minLength was increased from `0` to `8`

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

---

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