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

# POST /api/auth/login

`POST /api/auth/login`

## Request

- Base URL: `https://saasrock.com` (the document declares no server; this is the origin it was published from)
- URL: `https://saasrock.com/api/auth/login`
- Auth: none declared

Authenticate a user and get a token

## Request body

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

## Response `200`

User logged in successfully

- object
  - `token` string
  - `user` object
    - `id` string
    - `email` string

## Other responses

- `400`: Invalid email or password

---

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