---
title: "Authenticate with a credential and receive a session token"
method: POST
path: "/auth/login"
tags: ["auth"]
---

# Authenticate with a credential and receive a session token

`POST /auth/login`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/auth/login`
- Auth: none required

## Request body

- object
  - `credential` string, required

## Response `201`

Login successful

- object
  - `token` string
  - `expiresAt` string, date-time
  - `user` AuthUser
    - `id` integer, required
    - `displayName` string, required
    - `email` string, nullable
    - `avatarUrl` string, nullable
    - `roles` string[], required

## Other responses

- `401`: Invalid credentials

## Changes

- **2026-03-25** `e10ca0cbf01a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/szl-holdings/apis/szl-holdings-dreamstack-api/changes/auth/login/post.md)

---

[API](https://skmtc.dev/szl-holdings/apis/szl-holdings-dreamstack-api.md) - [All operations](https://skmtc.dev/szl-holdings/apis/szl-holdings-dreamstack-api/llms.txt) - [OpenAPI document](https://skmtc.dev/szl-holdings/apis/szl-holdings-dreamstack-api/revisions/6ad730b13e59?raw)
