Skip to main content
POST
/
auth
/
login
Login
curl --request POST \
  --url https://api.example.com/auth/login \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "<string>",
  "password": "<string>"
}
'
{
  "timestamp": "2026-03-09T10:30:00.000+00:00",
  "status": 400,
  "error": "Bad Request",
  "message": "Validation failed",
  "errors": [
    {
      "field": "email",
      "message": "must not be blank"
    }
  ]
}
Authenticates a user with email and password credentials. Returns JWT access and refresh tokens for subsequent authenticated requests.

Request Body

email
string
required
User’s email address.
password
string
required
User’s password.

Response

token
string
JWT access token used to authenticate API requests. Include this token in the Authorization header as Bearer {token}.
refreshToken
string
Refresh token used to obtain a new access token when the current one expires. Use this with the /auth/refresh endpoint.
type
string
Token type, always returns Bearer.

Example Request

curl -X POST https://api.dailytracker.com/auth/login \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "password": "securepassword123"
  }'

Example Response

{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
  "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwidHlwZSI6InJlZnJlc2giLCJpYXQiOjE1MTYyMzkwMjJ9.Kx3w8c9fR5mS4jD7eL2qP1vN8bT6zY0aH3sG9fK1mLp",
  "type": "Bearer"
}

Error Responses

{
  "timestamp": "2026-03-09T10:30:00.000+00:00",
  "status": 400,
  "error": "Bad Request",
  "message": "Validation failed",
  "errors": [
    {
      "field": "email",
      "message": "must not be blank"
    }
  ]
}

Build docs developers (and LLMs) love