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

# GET /sessions

> Get a list of sessions within a specified date range.

#### Authentication

This endpoint requires authentication. See [Authentication](/api-reference/authentication) for detailed information about required headers and how to obtain your API keys.

#### Query Params

<ParamField path="startDate" type="Date" required>
  Filter by start date (from this date). Format: ISOString
</ParamField>

<ParamField path="endDate" type="Date" required>
  Filter by end date (to this date). Format: ISOString
</ParamField>

<ParamField path="start" type="number" default="1">
  The starting page number for pagination. Used to control which page of
  results to return.
</ParamField>

<ParamField path="length" type="number" default="50">
  The number of results to return per page. Maximum value is typically 100.
</ParamField>

#### Example Request

```bash theme={null}
GET /sessions?startDate=2025-01-01T00:00:00.000Z&endDate=2025-01-31T23:59:59.999Z&start=1&length=25
```

#### Response

The response returns data in a **humanized format**, meaning all information is localized and ready to be displayed to end users in the requested language.

```json theme={null}
{
	"data": [
		{
			"_id": "sess_123456",
			"name": "Holistic Wellness Retreat",
			"number": "HWR-001",
			"text": "7-day comprehensive wellness program focusing on mental health, physical fitness, and nutritional balance",
			"availablePrograms": [
				{
					"_id": "prog_001",
					"name": "Mindfulness & Meditation"
				}
			],
			"availableUnits": [
				{
					"_id": "unit_001",
					"name": "Wellness Suite"
				}
			],
			"startDate": "2025-01-15T08:00:00.000Z",
			"endDate": "2025-01-22T18:00:00.000Z"
		}
	],
	"total": 65
}
```

<Note>
  **Pagination:** Use the `start` and `length` parameters to paginate through
  results. The response includes a `total` field indicating the total number
  of records available.
</Note>

#### Error Responses

<ResponseField name="400" type="Bad Request">
  Invalid query parameters or date format
</ResponseField>

<ResponseField name="401" type="Unauthorized">
  Missing or invalid authentication headers
</ResponseField>

<ResponseField name="403" type="Forbidden">
  Insufficient permissions to access data
</ResponseField>
