Skip to main content
Nowledge MemNowledge Mem

Save Session

POST
/threads/sessions/save

Save coding session(s) as conversation thread(s).

Auto-detects sessions from project_path. Creates new thread or appends to existing (with deduplication). Supports Claude Code, Codex, and Gemini CLI.

This endpoint assumes the backend machine can read the session files directly, so it is a local-host import surface. Remote-safe capture should use nmem t save --from ... from the client machine instead.

Args: request: Session save request with client, project_path, and options

Returns: SessionSaveResponse with results for each processed session

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request model for saving a coding session.

Response Body

application/json

application/json

curl -X POST "https://example.com/threads/sessions/save" \  -H "Content-Type: application/json" \  -d '{    "client": "string",    "project_path": "string"  }'
{  "client": "string",  "error": "string",  "hint": "string",  "persist_mode": "string",  "project_path": "string",  "results": [    {      "action": "string",      "file": "",      "message_count": 0,      "messages_added": 0,      "session_id": "string",      "thread_id": "string"    }  ],  "status": "string"}