---
title: "Reconcile Trajectories"
method: POST
path: "/api/trajectories/reconcile"
tags: ["trajectories"]
---

# Reconcile Trajectories

`POST /api/trajectories/reconcile`

Mark server-side trajectories as archived when the local
client no longer has them. Trajectories are append-only history
— the file on disk + summary + DB row are NEVER deleted, just
flagged with `archived_at`. The default list endpoint hides
archived; pass ?include_archived=1 to surface them again.

cloud_sync calls this once per sweep with the full list of
session_ids it sees on disk; anything the server holds for the
calling user that isn't in the list (and isn't already archived)
gets archived. Re-syncing a session that was previously archived
re-activates it (clears archived_at) — useful when a user
restores a trajectory locally.

Body: {"session_ids": ["...", "..."]}.
Scope = the caller's owned trajectories only.

## Headers

- `authorization` string, nullable

## Request body

- object

## Response `200`

Successful Response

- object

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/omicos/apis/omicos-server.md) · [All operations](https://skmtc.dev/omicos/apis/omicos-server/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/omicos/omicos-server/revisions/a00b94573ffe/schema)
