---
title: "Resolve which project a session belongs to"
method: POST
path: "/api/v1/context/match"
tags: ["Session Memory"]
---

# Resolve which project a session belongs to

`POST /api/v1/context/match`

## Request

- Base URL: `http://localhost:8080`
- URL: `http://localhost:8080/api/v1/context/match`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

## Request body

- object: Resolve which project a session/cwd belongs to.
  - `cwd` string
  - `workspace_key` string
  - `text` string

## Response `200`

Match result

- object
  - `match_decision` 'matched_existing' | 'new_project' | 'ambiguous' | 'ignored', required
  - `confidence` number, required
  - `project_candidate` object, nullable
    - `project_id` string
    - `project_name` string, required
    - `reason` string
    - `score` number
  - `should_create_project` boolean, required
  - `needs_user_confirmation` boolean, required

---

[API](https://skmtc.dev/deerdawn/apis/deerdawn-session-memory-api.md) · [All operations](https://skmtc.dev/deerdawn/apis/deerdawn-session-memory-api/llms.txt) · [OpenAPI document](https://skmtc.dev/deerdawn/apis/deerdawn-session-memory-api/revisions/002b48818bf9?raw)
