---
title: "Check text against the approved words."
method: POST
path: "/sites/{idOrSlug}/approved-copy/check"
tags: ["Sign-off"]
---

# Check text against the approved words.

`POST /sites/{idOrSlug}/approved-copy/check`

## Request

- Base URL: `https://api.stacktr.ee`
- URL: `https://api.stacktr.ee/sites/{idOrSlug}/approved-copy/check`
- 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`)

Compares copy you have (a source file, a template, a rendered email) with the approved words from GET /sites/{idOrSlug}/approved-copy. `text` is searched for every approved section; `sections` compares the text given for each key with that section. Each approved section comes back `exact`, `differs` (with `difference`: where the words part ways, the approved words and what was found) or `missing`. Sections not approved, or whose approved words could not be read, are not compared (`match` null, with a `reason`). Words are compared after the normalizing the response lists in `normalized`: tags, entities, source-code escapes, whitespace and curly quotes. Placeholders such as {first_name} are part of the approved words and compared as written. `exact` says the visible words match; it does not cover markup, links or images. At most 500 KB of copy per call (413 too_large). Owner-authed. A POST for the size of the body; it reads and stores nothing.

## Request body

- object
  - `approval_id` string: Defaults to the newest request on the page.
  - `text` string: Copy to search for every approved section.
  - `sections` object: Section key to the text that should carry its approved words. The heading may be included or left out.

## Response `200`

One result per section.

- object
  - `verdict` 'all_exact' | 'differences' | 'incomplete': `all_exact`: every section on the page is approved and matched. `differences`: an approved section differs or is missing. `incomplete`: nothing differs, but not every section could be compared.
  - `summary` string
  - `counts` object
    - `exact` integer
    - `differs` integer
    - `missing` integer
    - `not_compared` integer
  - `version` object
    - `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.
  - `sections` object[]
    - `key` string
    - `title` string
    - `status` 'approved' | 'changes_requested' | 'pending'
    - `match` 'exact' | 'differs' | 'missing', nullable
    - `compared` 'section' | 'text', nullable
    - `difference` object, nullable
      - `at_word` integer: Where `expected` starts, counting the approved words from 1.
      - `before` string
      - `expected` string
      - `found` string
      - `after` string: Approved words found again after the change.
    - `quotes_folded` boolean: The match needed curly and straight quotes treated as the same.
    - `from` object, nullable
      - `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.
    - `reason` string, nullable
  - `unknown_sections` string[]: Keys sent that are not sections of this page.
  - `normalized` string[]
  - `proves` string
  - `disclaimer` string

## Other responses

- `400`: Not JSON, nothing_to_check, invalid_text, invalid_sections, too_many_sections, or e2e_site.
- `401`: Missing or invalid credentials.
- `404`: As GET /sites/{idOrSlug}/approved-copy.
- `413`: too_large: more than 500 KB of copy.

---

[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)
