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

# List Subjects — GET /subjects Endpoint Reference Guide

> GET /v1/subjects — list all your subject profiles including type, color, weekly slots, and syllabus items. Optionally filter by type.

Use `GET /v1/subjects` to retrieve all your subject profiles. Each subject includes its type, color, weekly time slots, and the syllabus associated with it.

## Endpoint

```
GET https://api.taketime.app/v1/subjects
```

## Query Parameters

<ParamField query="type" type="string">
  Filter subjects by type. Accepted values: `study`, `training`, `inactive`. Omit this parameter to return all subjects regardless of type.
</ParamField>

## Response

Returns an array of subject objects inside the `data` field.

<ResponseField name="id" type="string">
  Unique identifier for the subject.
</ResponseField>

<ResponseField name="name" type="string">
  Display name of the subject.
</ResponseField>

<ResponseField name="type" type="string">
  The subject type. One of `study`, `training`, or `inactive`.
</ResponseField>

<ResponseField name="color" type="string">
  Hex color code used to represent this subject in the app (e.g. `#6366f1`).
</ResponseField>

<ResponseField name="slots" type="array">
  Array of weekly time slot objects. Each slot defines the days of the week and time range when this subject is scheduled.

  <Expandable title="Slot object fields">
    <ResponseField name="days" type="array of integers">
      Days of the week on which this slot is active. Uses the same day numbering as the API spec (e.g. `[1, 3, 5]`).
    </ResponseField>

    <ResponseField name="start" type="string">
      Slot start time in `HH:MM` format.
    </ResponseField>

    <ResponseField name="end" type="string">
      Slot end time in `HH:MM` format.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="syllabus" type="array">
  An array of syllabus topic objects for this subject. Each object contains `title` (string), `duration` (integer, minutes), and `done` (boolean).
</ResponseField>

**Example response**

```json theme={null}
{
  "data": [
    {
      "id": "sub_xyz",
      "name": "JavaScript",
      "type": "study",
      "color": "#6366f1",
      "slots": [
        {
          "days": [1, 3, 5],
          "start": "09:00",
          "end": "10:00"
        }
      ],
      "syllabus": [
        { "title": "Arrays", "duration": 30, "done": false }
      ]
    }
  ],
  "error": null,
  "meta": {
    "request_id": "req_abc123",
    "timestamp": "2026-06-11T09:00:00Z"
  }
}
```

## Examples

<CodeGroup>
  ```bash cURL theme={null}
  # List all study subjects
  curl "https://api.taketime.app/v1/subjects?type=study" \
    -H "Authorization: Bearer tt_live_your_key_here"
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    'https://api.taketime.app/v1/subjects?type=study',
    {
      headers: {
        'Authorization': 'Bearer tt_live_your_key_here',
      },
    }
  );

  const { data, error } = await response.json();

  if (error) {
    console.error('Error:', error.code, error.message);
  } else {
    console.log(`Found ${data.length} study subjects`);
  }
  ```
</CodeGroup>

<Note>
  Omit the `type` query parameter to retrieve all subjects across all types in a single request.
</Note>
