Skip to main content
POST
Reject a run's diff
The reference panel describes the current v3 operation. The notes below describe its v2 compatibility API. Follow the v3 request schema for current calls: v3 can move identifiers from the body or query into the URL. Keep the v2 method, path, and payload together when using the compatibility API.

v2 compatibility notes

POST /api/v2/knowledge/synchronized-sources/rejectDiff requires knowledge:manage. The body is {sourceId, runId, expectedRevision} at the diff’s current revision. Nothing more of the diff applies; changes already applied stay. The answer is {sourceId, outcome, revision, progressVersion} with outcome rejected. A diff that moved since expectedRevision answers 409 conflict. Only a Personal key is admitted, acting as its owner: the owner must hold the permission where the source lives, and is recorded as the decider, with the key named in the audit. An External App or platform key answers 403 forbidden, recorded: a person reviews and decides a source’s held changes. Send an Idempotency-Key to retry safely. A completed 200 response remains stored for 24 hours and is replayed only while the caller still holds knowledge:read and the source is still in its writable namespaces. Lost access, a missing source or a stored non-200 response yields 409 idempotency_result_unavailable; the request never runs twice.

Authorizations

Authorization
string
header
required

An External App: the JWT it obtains from POST /oauth/token with OAuth2 client_credentials. Pass as Authorization: Bearer <jwt>. An app's static companion key also authenticates as the app, but is deprecated and is not protected by Idempotency-Key.

Headers

Idempotency-Key
string

1–255 printable ASCII characters. A repeat with the same key and request never runs the write again, a 5xx included. It returns the first response (Idempotency-Replayed: true) only when the route's current authorization policy permits disclosure; otherwise 409 idempotency_result_unavailable. Honoured for External App JWTs and platform and MCP keys; an External App's static companion key is not protected.

Required string length: 1 - 255

Path Parameters

synchronizedSourceId
string
required
Minimum string length: 1
runId
string
required
Minimum string length: 1

Body

application/json

The run and the revision the decision was made on: the diff's revision to reject, or the shrink guard's revision (its revision in the diff state's shrinkGuards) to approve the guard.

expectedRevision
integer
required
Required range: x >= 0

Response

Reject a run's diff

data
object
required

A diff decision's result: the run's diff outcome after it (scheduled while it applies, rejected once stopped), with its new revision and progressVersion. A repeat of the same decision answers the same result.

meta
object
required