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

# Login (JSON)

`POST /api/v1/auth/login`

## Request

- Base URL: `https://api.feedico.io`
- URL: `https://api.feedico.io/api/v1/auth/login`
- Auth: none declared

Returns a **session JWT** for Bearer use on routes that expect it (if added later).
This endpoint requires `Content-Type: application/json`.

## Request body

- LoginRequest
  - `email` string, email, required
  - `password` string, required: Account password (JSON string field name must be `password`).
  - `token` string, required: Full API token `fdco_...` matching `app_users.api_token_hash`.

## Response `200`

Logged in

- LoginSuccess
  - `ok` boolean, required
  - `tokenType` string, required
  - `sessionToken` string, required: JWT session token (7 days).
  - `expiresIn` integer, required: Session lifetime in seconds.
  - `user` LoginUserProfile, required
    - `id` string
    - `email` string, email
    - `fullName` string
    - `company` string
    - `companyWebsite` string, nullable: Public company or product URL (e.g. https://example.com).
    - `memberSince` string, date-time, nullable: Account creation time (ISO 8601).
    - `plan` object
      - `slug` string
      - `name` string
      - `priceNote` string
    - `planRenewsAt` string, date, nullable: Next subscription renewal date (YYYY-MM-DD) if set.
    - `daysUntilRenewal` integer, nullable: Whole days until `planRenewsAt` (UTC calendar days); null if renewal unknown.

## Other responses

- `400`: Bad request (invalid email, missing password, missing token, invalid JSON)
- `401`: Invalid credentials or API token
- `403`: API token not configured for this account
- `415`: Unsupported media type (not JSON)
- `503`: Auth or database not configured

---

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