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

# Login

`POST /v1/auth/login`

## Request

- The document declares no server URL.
- Auth: none declared

## Request body

- AuthLoginBody
  - `email` string, required: The user email.
  - `password` string, required: The user password.

## Response `200`

Successful Response

- AuthLoginResponse
  - `object` 'key': Type of the object.
  - `id` integer, required: ID of the key.
  - `name` string, required: Name of the key.
  - `value` string, required: Value of the key.
  - `user_id` integer, required: ID of the user that owns the key.
  - `expires` integer, nullable: Time of expiration, as Unix timestamp. If None, the key never expires.
  - `created` integer, required: Time of creation, as Unix timestamp.
  - `revoked` boolean, required: Whether the key has been revoked.

## Other responses

- `401`: Invalid email or password.
- `422`: Validation Error

## Changes

- **2026-09-29** `2f7a4a0aac8f`: 1 info
  - endpoint added
- **2026-09-29** `da70d9cd1957`: 1 breaking
  - api path removed without deprecation
- **2026-09-28** `87472bc2094f`: 1 info
  - added the required property `revoked` to the response with the `200` status
- **2026-09-21** `5fdbd3614b8c`: 1 breaking, 1 info
  - removed the required property `user` from the response with the `200` status
  - added the required property `user_id` to the response with the `200` status
- **2026-07-23** `f2624a610e5a`: 1 info
  - removed the non-success response with the status `404`

[Operation history](https://skmtc.dev/betagouv/apis/opengatellm/changes/v1/auth/login/post.md)

---

[API](https://skmtc.dev/betagouv/apis/opengatellm.md) - [All operations](https://skmtc.dev/betagouv/apis/opengatellm/llms.txt) - [OpenAPI document](https://skmtc.dev/betagouv/apis/opengatellm/revisions/2f7a4a0aac8f?raw)
