---
title: "User login"
method: POST
path: "/api/v1/login"
tags: ["Authentication"]
---

# User login

`POST /api/v1/login`

## Request

- Base URL: `https://stackby.com`
- URL: `https://stackby.com/api/v1/login`
- Auth: none declared

Authenticate user with email and password

## Request body

- LoginRequest
  - `email` string, email, required
  - `password` string, required

## Response `200`

Login successful

- object
  - `success` boolean
  - `message` string
  - `data` object
    - `token` string
    - `user` User
      - `id` integer
      - `email` string, email
      - `firstName` string
      - `lastName` string
      - `name` string
      - `companyName` string
      - `timezone` string
      - `createdAt` string, date-time
      - `updatedAt` string, date-time
  - `timestamp` string, date-time

## Other responses

- `401`: Authentication failed

---

[API](https://skmtc.dev/stackby/apis/stackby-api-complete-documentation.md) - [All operations](https://skmtc.dev/stackby/apis/stackby-api-complete-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/stackby/apis/stackby-api-complete-documentation/revisions/c9909a003a56?raw)
