---
title: "Reference: login"
description: "Example request and response for POST /v1/auth/login."
---

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

# Reference: login

## Endpoint

`POST /v1/auth/login`

Use this endpoint to create an authenticated session.

## Request body

- **`email`** `string` *(required)* — User email address.

- **`password`** `string` *(required)* — User password.

- **`telemetry_id`** `string` — Optional device fingerprint telemetry ID.

**Request example:**

```bash cURL
curl -X POST "https://api.wazapin.com/v1/auth/login" \
  -H "Content-Type: application/json" \
  -d '{
"email": "user@example.com",
"password": "password123",
"telemetry_id": "tel_abc123"
  }'
```

**Response example:**

```json 200 Success
{
  "data": {
"id": "a6c8ca86-2f29-4fe6-a077-1e56cb4ec2f2",
"name": "Demo User",
"email": "user@example.com",
"email_verified": true,
"timezone": "Asia/Jakarta",
"week_start": "monday",
"created_at": "2026-03-04T06:10:14Z"
  }
}
```

```json 401 Unauthorized
{
  "title": "Unauthorized",
  "status": 401,
  "detail": "invalid email or password"
}
```

## Notes

- Successful login also sets `Set-Cookie` session token.
- For public API calls after login, use `X-Api-Key` as the primary auth header.

Source: https://docs.wazapin.id/api/reference-auth-login/index.mdx
