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

# Auth Endpoints

> Platform authentication — signup, login, logout

## Sign up

```
POST /v1/auth/signup
```

Create a new platform account.

**Request body:**

```json theme={null}
{
  "email": "you@example.com",
  "password": "your-password",
  "name": "Your Name"
}
```

**Response `201`:**

```json theme={null}
{
  "data": {
    "id": "usr_abc123",
    "email": "you@example.com",
    "name": "Your Name",
    "totpEnabled": false
  }
}
```

***

## Log in

```
POST /v1/auth/login
```

Authenticate with email + password. On success, sets a session cookie.

**Request body:**

```json theme={null}
{
  "email": "you@example.com",
  "password": "your-password",
  "totpCode": "123456"
}
```

The `totpCode` field is required only if MFA is enabled on the account.

**Response `200`:**

```json theme={null}
{
  "data": {
    "id": "usr_abc123",
    "email": "you@example.com",
    "name": "Your Name",
    "totpEnabled": true
  }
}
```

**Rate limiting:** After 10 failed attempts, the account is locked for 30 minutes.

***

## Log out

```
POST /v1/auth/logout
```

Invalidates the current session. No request body needed.

**Response `204`:** No content.
