---
title: "Create an account session"
method: POST
path: "/auth/login"
tags: ["Accounts"]
---

# Create an account session

`POST /auth/login`

## Request

- Base URL: `https://api.temp.md`
- URL: `https://api.temp.md/auth/login`
- Auth: none declared
- TypeScript: <https://skmtc.dev/temp-md/apis/temp-md-public-api/docs/auth/login/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- LoginInput
  - `email` string, email, required
  - `password` string, password, required

## Response `200`

Authenticated account

- LoginResult
  - `token` string, required
  - `userId` string, required
  - `email` string, email, required

## Other responses

- `400`: Invalid request
- `401`: Authentication required or invalid
- `429`: Rate limit exceeded

---

[API](https://skmtc.dev/temp-md/apis/temp-md-public-api.md) - [All operations](https://skmtc.dev/temp-md/apis/temp-md-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/temp-md/apis/temp-md-public-api/revisions/4753682e1e3a?raw)
