---
title: "Validate Credentials"
method: POST
path: "/api/auth/validate-credentials"
tags: ["auth"]
---

# Validate Credentials

`POST /api/auth/validate-credentials`

## Request

- Base URL: `https://api.maritime.sh` (the document declares no server; this is the origin it was published from)
- URL: `https://api.maritime.sh/api/auth/validate-credentials`
- Auth: none declared

Validate email/password credentials.

Called by Auth.js Credentials provider during login.
Rate limited to 5 attempts per minute per IP.

Returns:
    User data if credentials are valid

Raises:
    HTTPException 401: Invalid credentials
    HTTPException 429: Rate limit exceeded

## Request body

- LoginRequest: Request schema for credential validation.
  - `email` string, email, required
  - `password` string, required

## Response `200`

Successful Response

- UserResponse: Response schema for user data (excludes password hash).
  - `id` string, required
  - `email` string, required
  - `name` string, nullable
  - `image` string, nullable

## Other responses

- `422`: Validation Error

---

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