---
title: "Log in with email and password"
method: POST
path: "/api/v1/auth/login"
tags: ["Authentication"]
---

# Log in with email and password

`POST /api/v1/auth/login`

## Request

- Base URL: `https://api.skills-hub.ai`
- URL: `https://api.skills-hub.ai/api/v1/auth/login`
- Auth: one of:
  - HTTP bearer
  - API key in header `Authorization`

Public. Authenticates `email`/`password`, sets an httpOnly `refreshToken` cookie, and returns a short-lived `accessToken` plus the public profile. Brute-force protected: repeated failures lock the account (keyed on email + IP) and return `429 TOO_MANY_ATTEMPTS` with a `Retry-After` header.

## Response `200`

Successful response. The returned fields are described in this endpoint's summary/description; typed per-field response schemas are being added incrementally.

- object
  - `accessToken` string, required
  - `expiresIn` integer, required
  - `user` object, required
    - `id` string, required
    - `username` string, required
    - `displayName` string, nullable, required
    - `avatarUrl` string, nullable, required
    - `bio` string, nullable, required
    - `githubUrl` string, nullable, required
    - `trustLevel` 'NEW' | 'ESTABLISHED' | 'TRUSTED', required
    - `isAdmin` boolean, required
    - `createdAt` string, date-time, required
    - `skillCount` integer, required
    - `totalInstalls` integer, required
    - `followerCount` integer, required
    - `followingCount` integer, required
    - `userFollowing` boolean, required

---

[API](https://skmtc.dev/skills-hub/apis/skills-hub-ai-api.md) · [All operations](https://skmtc.dev/skills-hub/apis/skills-hub-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/skills-hub/apis/skills-hub-ai-api/revisions/cb5d46d80300?raw)
