---
title: "Structural diff between two revisions"
method: GET
path: "/postures/{posture_id}/diff"
tags: ["Postures"]
---

# Structural diff between two revisions

`GET /postures/{posture_id}/diff`

## Request

- Base URL: `https://api.mnemom.ai/v1`
- URL: `https://api.mnemom.ai/v1/postures/{posture_id}/diff`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-Mnemom-Api-Key`

Authorization: an org-scoped posture is readable only by a member (any role) of the organization that owns it — the org is loaded from the posture row, never from the request — and a `posture_id` in an org the caller does not belong to returns the same 404 as a nonexistent posture, so the status never reveals that another tenant's posture exists. Platform-scoped default postures are the public catalog and are readable by any authenticated caller.

## Path parameters

- `posture_id` string, required

## Query parameters

- `from` integer, required
- `to` integer, required

## Response `200`

Diff payload.

- PostureDiff: Structural diff between two revisions (GET /v1/postures/{id}/diff). Matches handleDiffPostureRevisions exactly.
  - `posture_id` string, required
  - `from` object, required: The `from` revision endpoint.
    - `revision_no` integer, required
    - `revision_id` string, required
  - `to` object, required: The `to` revision endpoint.
    - `revision_no` integer, required
    - `revision_id` string, required
  - `changes` object[], required
    - `path` string, required: Dot-path to the changed leaf (`$` for a root scalar change).
    - `op` 'added' | 'removed' | 'changed', required
    - `before` unknown
    - `after` unknown

## Other responses

- `400`: Bad request
- `401`: Authentication required
- `403`: Forbidden
- `404`: Resource not found
- `429`: Rate-limit exceeded. The global per-IP limiter (100 requests/minute, applied to every `/v1/*` route) rejected this request. Back off until the window resets — `Retry-After` carries the cooldown in seconds and `X-RateLimit-Reset` the absolute reset time.
- `500`: Server error — request was well-formed but the server failed to fulfill it. Typically a downstream dependency (DB / RPC / external API) returned an unexpected error.

---

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