---
title: "Authenticate user and get tokens"
method: POST
path: "/api/auth/login"
tags: ["Auth"]
---

# Authenticate user and get tokens

`POST /api/auth/login`

## Request

- Base URL: `https://api.production.yourmedley.com`
- URL: `https://api.production.yourmedley.com/api/auth/login`
- Auth: none declared

## Request body

- LoginRequest
  - `email` string, email, required: User's email address
  - `password` string, password, required: User's password
  - `remember_me` boolean: Whether to extend session duration

## Response `200`

Login successful

- LoginResponse
  - `success` boolean
  - `data` object
    - `user` User
      - `id` string, uuid
      - `email` string
      - `first_name` string
      - `last_name` string
      - `job_title` string
      - `avatar_url` string
      - `initials` string
      - `display_name` string
      - `personas` object[]
    - `tokens` object
      - `accessToken` string
      - `refreshToken` string

## Other responses

- `401`: Invalid credentials
- `423`: Account locked

---

[API](https://skmtc.dev/withmedley/apis/medley-api.md) - [All operations](https://skmtc.dev/withmedley/apis/medley-api/llms.txt) - [OpenAPI document](https://skmtc.dev/withmedley/apis/medley-api/revisions/40aaac5ca6bd?raw)
