> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shinzo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Login

> Authenticate with email and password to receive a JWT token.

# Login

Authenticate a user with email and password to receive a JWT token for subsequent API requests.

## Authentication

No authentication required.

<ParamField body="email" type="string" required>Registered email address</ParamField>
<ParamField body="password" type="string" required>User password</ParamField>

## Example Request

```bash theme={null}
curl -X POST https://api.app.shinzo.ai/auth/login \
  -H "Content-Type: application/json" \
  -d '{
    "email": "user@example.com",
    "password": "securepassword123"
  }'
```

## Response

```json theme={null}
{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "user": {
    "uuid": "usr_abc123def456",
    "email": "user@example.com"
  }
}
```

## Status Codes

| Code  | Description                      |
| ----- | -------------------------------- |
| `200` | Login successful                 |
| `400` | Invalid request (missing fields) |
| `401` | Invalid email or password        |
| `403` | Email not verified               |

## Token Usage

The returned JWT token should be included in the `Authorization` header for authenticated requests:

```bash theme={null}
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
```

## Token Expiration

JWT tokens expire after 24 hours. After expiration, users must log in again to obtain a new token.

## Error Response - Email Not Verified

If the user's email is not verified:

```json theme={null}
{
  "error": "Email not verified. Please check your inbox for a verification email."
}
```

Use the [Resend Verification](/api/auth/resend-verification) endpoint to request a new verification email.
