---
title: "POST /api/v1/{context_id}/consolidate"
method: POST
path: "/api/v1/{context_id}/consolidate"
---

# POST /api/v1/{context_id}/consolidate

`POST /api/v1/{context_id}/consolidate`

Phase 11b: pool recent facts and consolidate into observations. Scope-gated: only facts in the caller's `memory:read` region are pooled, and only groups in the caller's `memory:write` region are persisted (others are returned as dry-run previews).

## Path parameters

- `context_id` string, required

## Request body

- ConsolidateRequestJson
  - `dryRun` boolean
  - `factLimit` integer, nullable
  - `observationLimit` integer, nullable

## Response `200`

- ConsolidateResponseJson
  - `created` integer, required
  - `dryRun` boolean, required
  - `outcomes` ConsolidateOutcomeJson[], required
    - `entityName` string, required
    - `key` string, required
    - `kind` 'create' | 'update' | 'supersede', required — Bounded enum for the writer to dispatch on. Serializes as the `create` / `update` / `supersede` wire strings so it can stand in for the public `/consolidate` response `kind` field.
    - `observationId` string, nullable
    - `persisted` boolean, required — `false` marks a preview that was not committed: a dry-run request, or a scope group the caller can read but not write. Committed observations are `true`.
    - `proofCount` integer, required
    - `rationale` string, nullable
    - `value` string, required
  - `superseded` integer, required
  - `traceId` string, required
  - `updated` integer, required

## Other responses

- `401` — Unauthorized
- `422` — Invalid context id
- `503` — Server too busy: the per-pod in-flight request cap was exceeded. Retry per the `Retry-After` header.

## Changes

- **2026-08-24** `9f1598713067` — 2 info
  - added the non-success response with the status `503`
  - added the required property `outcomes/items/persisted` to the response with the `200` status

[Change history](https://skmtc.dev/surrealdb/apis/spectron/changes/api/v1/:context_id/consolidate/post.md)

---

[API](https://skmtc.dev/surrealdb/apis/spectron.md) · [All operations](https://skmtc.dev/surrealdb/apis/spectron/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/surrealdb/spectron/revisions/9f1598713067/schema)
