---
title: "POST /api/v1/{context_id}/documents/recompute-links"
method: POST
path: "/api/v1/{context_id}/documents/recompute-links"
---

# POST /api/v1/{context_id}/documents/recompute-links

`POST /api/v1/{context_id}/documents/recompute-links`

Phase 6c: recompute doc-to-doc semantic_similarity edges across the Context. Returns the number of edges emitted (existing edges are retained — the (in, out, kind) triple is unique).

## Path parameters

- `context_id` string, required

## Response `200`

- RecomputeLinksResponse — Phase 6c: doc-to-doc semantic link recomputation.
  - `linksEmitted` integer, required

## Other responses

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

## Changes

- **2026-08-24** `9f1598713067` — 1 info
  - added the non-success response with the status `503`

[Change history](https://skmtc.dev/surrealdb/apis/spectron/changes/api/v1/:context_id/documents/recompute-links/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)
