---
title: "Ask, before publishing, whether a page would be a new version of one you have."
method: POST
path: "/sites/revision-match"
tags: ["Sites"]
---

# Ask, before publishing, whether a page would be a new version of one you have.

`POST /sites/revision-match`

## Request

- Base URL: `https://api.stacktr.ee`
- URL: `https://api.stacktr.ee/sites/revision-match`
- 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`)

Body `{"title": "...", "client": "...", "client_path": "..."}` (only `title` is needed). Answers `{"match": null}` or `{"match": {...}}` in the `likely_revision_of` shape, plus `slots_left` (free pages left, null on a plan that does not count them). Creates nothing: a client named here that has no space yet stays without one. When there is a match, PUT /sites/{match.id} updates that page in place (same link, no page slot) instead of publishing a second one. Owner-authed.

## Response `200`

The match, or null.

- object
  - `match` object, nullable
  - `slots_left` integer, nullable

## Other responses

- `401`: Missing or invalid credentials.

---

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