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

# API Reference Overview

> Overview of LearnWay REST API v2 endpoints, authentication headers, error envelopes, and rate limits.

# API Reference Overview

The LearnWay API is organized around REST standards. All request and response bodies use JSON.

***

## Base URL & Versioning

```
Production: https://api.learnway.xyz/api/v2
Local Dev:   http://localhost:3000/api/v2
```

***

## Authentication Header

Except for public endpoints marked `@Public()`, all endpoints require a valid Bearer JWT:

```http theme={null}
Authorization: Bearer <your_access_token>
```

***

## Standard Response Envelope

```json theme={null}
{
  "success": true,
  "data": { ... },
  "message": "Operation completed successfully"
}
```

***

## Error Response Envelope

```json theme={null}
{
  "statusCode": 400,
  "message": "Validation failed: email must be a valid email",
  "error": "Bad Request"
}
```
