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

# Login with credentials

`POST /api/auth/login`

## Request body

- object
  - `username` string, required
  - `password` string, required

## Response `200`

Login successful. Sets __Host-mc-session cookie (HTTPS) or mc-session (HTTP).

- object
  - `user` User
    - `id` integer
    - `username` string
    - `display_name` string
    - `role` 'admin' | 'operator' | 'viewer'
    - `provider` string
    - `email` string
    - `avatar_url` string
    - `created_at` integer
    - `last_login_at` integer

## Other responses

- `400` — Invalid request
- `401` — Invalid credentials
- `429` — Rate limit exceeded

## Changes

- **2026-03-02** `39aff788d955` — 2 breaking, 13 info
  - the response's body type changed from no type to `object` for status `401`
  - the `user` response's property type changed from no type to `object` for status `200`
  - added the media type `application/json` for the response with the status `400`
  - added the media type `application/json` for the response with the status `429`
  - …11 more

[Change history](https://skmtc.dev/builderz-labs/apis/mission-control-api/changes/api/auth/login/post.md)

---

[API](https://skmtc.dev/builderz-labs/apis/mission-control-api.md) · [All operations](https://skmtc.dev/builderz-labs/apis/mission-control-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/builderz-labs/mission-control-api/revisions/751f6c65ac77/schema)
