---
title: "The words each section was approved in, with a version stamp."
method: GET
path: "/sites/{idOrSlug}/approved-copy"
tags: ["Sign-off"]
---

# The words each section was approved in, with a version stamp.

`GET /sites/{idOrSlug}/approved-copy`

## Request

- Base URL: `https://api.stacktr.ee`
- URL: `https://api.stacktr.ee/sites/{idOrSlug}/approved-copy`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://api.stacktr.ee/oauth/authorize`, token URL `https://api.stacktr.ee/oauth/token`, scopes: `sites:read`)

For one approval request (POST /sites/{idOrSlug}/approvals, the request_approval tool), the approved words of each section of the page, or of the whole page when it has no sections. A section is approved when every person named on the request approved the same words through their own link, on that section or on the whole page, whichever answer is newer. Its `text` is those words after its heading. When the section changed after it was approved, the words are read from the page's version history (the 20 newest versions) and `from` names the version; when they are not there any more, `text` is null and `reason` says so. The wording on the page now is never reported as approved for a section that changed. Sections not approved are listed with their status, who they wait on, and no text. `markdown` is the same as a document for a file or a pull request: a stamp line, then each heading and its words, with no page link in it. Owner-authed, read only. A record of who approved which words and when, not a legal e-signature.

## Query parameters

- `approval_id` string

## Response `200`

The approved copy.

- object
  - `page` object, required
    - `id` string
    - `title` string, nullable
    - `url` string
  - `approval` object, required
    - `id` string
    - `created_at` integer
    - `state` 'approved' | 'changes_requested' | 'pending': As GET /approvals/{id} has it, for the page as it is now.
    - `summary` string
    - `note` string, nullable
  - `version` object, required: The page as it is now.
    - `version` string: `live`, or the id of an earlier version (GET /sites/{idOrSlug}/versions).
    - `sha256` string: SHA-256 of that index.html.
    - `short` string: Its first 8 hex, for people.
    - `updated_at` integer, nullable: When that content was published. For an earlier version, known when someone answered on exactly it.
    - `replaced_at` integer, nullable: For an earlier version: when the update that replaced it happened.
  - `exported_at` integer
  - `scope` 'sections' | 'page': `page` when the page has no sections: then `sections` holds one entry, key `_page`.
  - `summary` string
  - `sections` object[], required
    - `key` string: The section key sign-off uses, or `_page` for the whole page.
    - `title` string
    - `heading` string, nullable: The heading's words, when the section opens with one.
    - `on_page` boolean: false for a section someone answered that the page no longer has.
    - `status` 'approved' | 'changes_requested' | 'pending'
    - `current` boolean, nullable: Approved sections: the approved words are the words on the page now.
    - `hash` string, nullable: What the approvals recorded: the section's 16-hex word hash, or the SHA-256 of index.html for the whole page.
    - `text` string, nullable: The approved words after the heading. null unless approved and readable.
    - `from` object, nullable: The version of the page the text was read from.
      - `version` string: `live`, or the id of an earlier version (GET /sites/{idOrSlug}/versions).
      - `sha256` string: SHA-256 of that index.html.
      - `short` string: Its first 8 hex, for people.
      - `updated_at` integer, nullable: When that content was published. For an earlier version, known when someone answered on exactly it.
      - `replaced_at` integer, nullable: For an earlier version: when the update that replaced it happened.
    - `approved_by` object[]
      - `name` string
      - `email` string, nullable
      - `email_verified` boolean
      - `via_link` string, nullable
      - `at` integer
      - `scope` 'section' | 'page'
      - `current` boolean
      - `reference` string
      - `note` string, nullable
    - `changes_requested_by` object[]
      - `name` string
      - `note` string, nullable
      - `at` integer
      - `scope` 'section' | 'page'
      - `current` boolean
    - `waiting_on` string[]
    - `reason` string, nullable
  - `markdown` string, required
  - `disclaimer` string

## Other responses

- `400`: e2e_site: an end-to-end encrypted page, whose words the server cannot read.
- `401`: Missing or invalid credentials.
- `404`: No such page on this account (not found), no request on it (no_approval), no request with that id on it (approval_not_found), or no index.html (no_content).

---

[API](https://skmtc.dev/stacktr/apis/stacktree-api.md) · [All operations](https://skmtc.dev/stacktr/apis/stacktree-api/llms.txt) · [OpenAPI document](https://skmtc.dev/stacktr/apis/stacktree-api/revisions/5878cce46977?raw)
