---
title: "Complete a repository-adoption session by binding the canonical intent that the CLI pushed."
method: POST
path: "/api/v1/onboarding/repo/complete"
tags: ["onboarding"]
---

# Complete a repository-adoption session by binding the canonical intent that the CLI pushed.

`POST /api/v1/onboarding/repo/complete`

Authentication is intentionally stricter than a normal workspace write: the API-key row id must exactly match the credential bound during exchange. Cookie sessions are rejected. Repeating completion for an already-adopted session is idempotent. On success the server emits onboarding_repo_spec_landed and the waiting browser observes the authoritative session row.

## Request body

- object
  - `sessionId` string, required — The session returned by the code exchange.
  - `intentId` string, required — The canonical intent id returned after the existing intent.md was created or updated. It must belong to the session's selected Product.

## Response `200`

Session marked adopted; returns the canonical intent and in-app URL.

- object

## Other responses

- `400` — sessionId or intentId is not a UUID.
- `401` — Missing, invalid, or expired API key.
- `403` — The caller is not the exact write credential bound to this adoption session.
- `404` — Session not found, or intent does not belong to the selected workspace/Product.
- `429` — Rate limit exceeded.
- `500` — Session completion failed.

## Changes

- **2026-08-31** `8ef75cba546a` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/pathmode/apis/pathmode-api/changes/api/v1/onboarding/repo/complete/post.md)

---

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