---
title: "Get the pull request stack a trail belongs to"
method: GET
path: "/api/v1/trails/{forge}/{owner}/{repo}/{number}/stack"
tags: ["Trails"]
---

# Get the pull request stack a trail belongs to

`GET /api/v1/trails/{forge}/{owner}/{repo}/{number}/stack`

## Request

- Base URL: `https://entire.io` (the document declares no server; this is the origin it was published from)
- URL: `https://entire.io/api/v1/trails/{forge}/{owner}/{repo}/{number}/stack`
- Auth: none declared

## Path parameters

- `forge` string, required
- `owner` string, required
- `repo` string, required
- `number` string, required

## Response `200`

Trail stack, null when the trail is not in a stack

- object
  - `stack` object, nullable, required
    - `position` number, required
    - `size` number, required
    - `base` string
    - `pull_requests` object[], required
      - `pr_number` number, required
      - `trail_number` number, nullable, required
      - `title` string, nullable, required
      - `status` 'draft' | 'open' | 'merged' | 'closed', nullable, required
      - `current` boolean, required

## Other responses

- `404`: Trail not found

## Changes

- **2026-10-15** `f6c937689c77`: 1 info
  - added the optional property `stack/anyOf[subschema #1]/base` to the response with the `200` status
- **2026-10-08** `d755dd67ad29`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/entire/apis/entire-api/changes/api/v1/trails/:forge/:owner/:repo/:number/stack/get.md)

---

[API](https://skmtc.dev/entire/apis/entire-api.md) - [All operations](https://skmtc.dev/entire/apis/entire-api/llms.txt) - [OpenAPI document](https://skmtc.dev/entire/apis/entire-api/revisions/a24dfcc828d7?raw)
