---
title: "Retrieve a full section (story) of the Masnavi"
method: GET
path: "/api/section"
tags: ["rest"]
---

# Retrieve a full section (story) of the Masnavi

`GET /api/section`

## Request

- Base URL: `https://masnavi.ai`
- URL: `https://masnavi.ai/api/section`
- Auth: none declared

Fetch a named section (story / بخش) with all its beyts.

## Query parameters

- `slug` string, nullable: Stable URL slug like 'd2-sh40'.
- `section_id` integer, nullable: Numeric section id.

## Response `200`

Successful Response

- SectionDetail
  - `id` integer, required
  - `slug` string, required
  - `title_fa` string, required
  - `daftar` integer, required
  - `first_beyt_global` integer, nullable
  - `last_beyt_global` integer, nullable
  - `beyt_count` integer
  - `beyts` Beyt[]
    - `citation` string, required: Canonical citation, e.g. 'M3:1278'
    - `daftar` integer, required
    - `beyt_in_daftar` integer, required
    - `beyt_global` integer, required
    - `mesra1` string, required: First hemistich (with diacritics)
    - `mesra2` string, required: Second hemistich
    - `section_id` integer, required
    - `section_title` string, required
    - `section_slug` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/masnavi/apis/masnavi-ai.md) · [All operations](https://skmtc.dev/masnavi/apis/masnavi-ai/llms.txt) · [OpenAPI document](https://skmtc.dev/masnavi/apis/masnavi-ai/revisions/2622163d327c?raw)
