Skip to main content
POST
/
auth
/
login
cURL
curl --request POST \
  --url http://sandbox.mintlify.com/auth/login \
  --header 'Content-Type: application/json' \
  --data '{}'
Authenticates a user with email and password, returning a Supabase session.

Request Body

FieldTypeRequiredDescription
emailstringYesUser email address
passwordstringYesUser password

Example Request

curl -X POST http://localhost:3001/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{
    "email": "user@example.com",
    "password": "your_password"
  }'

Example Response

{
  "access_token": "eyJhbGciOiJIUzI1NiIs...",
  "refresh_token": "refresh_token_here",
  "expires_in": 3600,
  "token_type": "Bearer",
  "user": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "email": "user@example.com"
  }
}

Authentication

After successful login, include the access_token in subsequent API requests:
Authorization: Bearer <access_token>

Common Errors

400 Bad Request

Invalid email or password format.

401 Unauthorized

Invalid email or password.

Body

application/json

The body is of type object.

Response

200 - undefined