---
title: "Login"
method: POST
path: "/auth/login"
tags: ["Authentication"]
---

# Login

`POST /auth/login`

## Request

- Base URL: `https://api.getmetacognition.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.getmetacognition.com/auth/login`
- Auth: none declared
- TypeScript: <https://skmtc.dev/metacognition/apis/tex-api/docs/auth/login/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- LoginRequest: Login credentials for obtaining JWT tokens.
  - `org_id` string, required: Organization identifier
  - `user_id` string, required: User identifier
  - `session_id` string, nullable: Optional session identifier
  - `password` string, nullable: Optional password

## Response `200`

Successful Response

- TokenResponse: JWT token response.
  - `access_token` string, required: JWT access token
  - `refresh_token` string, required: JWT refresh token
  - `token_type` string: Token type
  - `expires_in` integer, required: Token expiration in seconds

## Other responses

- `422`: Validation Error

---

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