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

# Auth Endpoints

> Registration, login, logout, and password management.

## POST /v1/auth/register

Register a new user account.

**Request:**

```json theme={null}
{
  "name": "Jane Smith",
  "email": "jane@example.com",
  "password": "secret123",
  "password_confirmation": "secret123"
}
```

**Response (201):**

```json theme={null}
{
  "success": true,
  "data": {
    "token": "1|abc123...",
    "user": {
      "id": 1,
      "name": "Jane Smith",
      "email": "jane@example.com"
    }
  }
}
```

***

## POST /v1/auth/login

Authenticate and receive a Bearer token.

**Request:**

```json theme={null}
{
  "email": "jane@example.com",
  "password": "secret123"
}
```

**Response (200):**

```json theme={null}
{
  "success": true,
  "data": {
    "token": "1|abc123...",
    "user": {
      "id": 1,
      "name": "Jane Smith",
      "email": "jane@example.com",
      "status": 1
    }
  }
}
```

Rate limit: **5 requests / minute**

***

## POST /v1/auth/logout

Revoke the current device's token. Requires authentication.

**Response (200):**

```json theme={null}
{
  "success": true,
  "message": "Logged out successfully."
}
```

***

## POST /v1/auth/logout-all

Revoke all tokens for the authenticated user (logout from all devices).

**Response (200):**

```json theme={null}
{
  "success": true,
  "message": "Logged out from all devices."
}
```

***

## POST /v1/auth/forgot-password

Request a password reset email.

**Request:**

```json theme={null}
{
  "email": "jane@example.com"
}
```

**Response (200):**

```json theme={null}
{
  "success": true,
  "message": "Password reset link sent to your email."
}
```

Rate limit: **3 requests / minute**

***

## POST /v1/auth/reset-password

Reset password using the token from the reset email.

**Request:**

```json theme={null}
{
  "token": "reset_token_from_email",
  "email": "jane@example.com",
  "password": "new_password",
  "password_confirmation": "new_password"
}
```

**Response (200):**

```json theme={null}
{
  "success": true,
  "message": "Password reset successfully."
}
```

***

## POST /v1/auth/verify-email

Verify email address using the token from the verification email.

**Request:**

```json theme={null}
{
  "token": "verification_token"
}
```

***

## POST /v1/auth/resend-verification

Resend the email verification link. Requires authentication.

Rate limit: **6 requests / minute**

**Response (200):**

```json theme={null}
{
  "success": true,
  "message": "Verification email sent."
}
```

***

## GET /v1/status

API health check. Returns 200 if the API is operational. No authentication required.

**Response (200):**

```json theme={null}
{
  "success": true,
  "message": "API is running."
}
```
