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

# Login

`POST /api/v1/auth/login`

## Request

- Base URL: `https://www.endlesstravelplans.com`
- URL: `https://www.endlesstravelplans.com/api/v1/auth/login`
- Auth: none required

Authenticate with email and password. Returns a token or 2FA challenge.

## Request body

- object
  - `email` string, required
  - `password` string, required

## Response `200`

- union
  - object: Signed in
    - `user` object
      - `id` integer
      - `first_name` string
      - `last_name` string
      - `email` string
      - `phone` string, nullable
      - `bio` string, nullable
      - `preferred_language` string, nullable
      - `timezone` string
      - `profile_photo_url` string, nullable
      - `has_pro_access` boolean
      - `subscription_plan` string
      - `can_create_trip` boolean
      - `max_saved_trips` integer
      - `is_anonymous` boolean
      - `marketing_consent` boolean
      - `marketing_consent_source` string
      - `created_at` string
    - `token` string
    - `expires_in` integer
    - `expires_at` string
  - object: Two factor challenge
    - `requires_2fa` boolean
    - `two_factor_token` string
  - object: Recorded shape (tests/Fixtures/api-shapes/auth-login.json)
    - `expires_at` string
    - `expires_in` integer
    - `token` string
    - `user` object
      - `bio` string, nullable
      - `can_create_trip` boolean
      - `created_at` string
      - `email` string
      - `first_name` string
      - `has_pro_access` boolean
      - `id` integer
      - `is_anonymous` boolean
      - `last_name` string
      - `marketing_consent` string, nullable
      - `marketing_consent_source` string, nullable
      - `max_saved_trips` integer
      - `phone` string, nullable
      - `preferred_language` string, nullable
      - `profile_photo_url` string, nullable
      - `subscription_plan` string
      - `timezone` string, nullable

## Other responses

- `401`
- `422`: validation_failed: The request body failed validation; field messages are in `errors`.
- `429`: rate_limited: A throttle or a per-account allowance refused the request; `retry_after` or `remaining` may be present.
- `500`: server_error: Unhandled failure; quote `request_id` to support.

---

[API](https://skmtc.dev/endlesstravelplans/apis/endless-travel-plans-api.md) · [All operations](https://skmtc.dev/endlesstravelplans/apis/endless-travel-plans-api/llms.txt) · [OpenAPI document](https://skmtc.dev/endlesstravelplans/apis/endless-travel-plans-api/revisions/ae82ed3e4a8f?raw)
