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

# Login

`POST /api/v1/auth/login`

Authenticate with username and password, returning JWT token pair.

The 'tenant' field in the request body specifies which tenant to log into
(slug or numeric ID). If not provided, the token has no tenant context.

## Request body

- LoginRequest — Login request with username, password, and optional tenant.
  - `username` string, required
  - `password` string, required
  - `tenant` string, nullable — Tenant slug or numeric ID

## Response `200`

Successful Response

- TokenResponse — JWT token pair response returned on login and refresh.
  - `access_token` string, required
  - `refresh_token` string, required
  - `token_type` string
  - `expires_in` integer, required
  - `is_first_login` boolean

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/ninjavan/apis/salesforce-sales-cloud-replacement.md) · [All operations](https://skmtc.net/ninjavan/apis/salesforce-sales-cloud-replacement/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ninjavan/salesforce-sales-cloud-replacement/revisions/fd3a41a6260b/schema)
