---
title: "Clone a session"
method: POST
path: "/api/v1/sessions/{id}/clone"
tags: ["Sessions"]
---

# Clone a session

`POST /api/v1/sessions/{id}/clone`

## Request

- Base URL: `https://your-deployment.example.com`
- URL: `https://your-deployment.example.com/api/v1/sessions/{id}/clone`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`

Clones a session (called a "notebook" in the product UI), including its messages and attachments. Omit `targetSurface` to inherit the source workspace, send `null` for the main notebook list, or send a surface id for another workspace. An API key needs `notebooks:write`.

## Path parameters

- `id` string, required

## Request body

- CloneSessionRequest
  - `targetSurface` string, nullable

## Response `200`

The cloned session.

- CloneSessionResponse200
  - `id` string, required
  - `_id` string
  - `name` string, required
  - `userId` string, required
  - `knowledgeIds` string[]
  - `artifactIds` string[]
  - `tags` object[]
    - `name` string, required
    - `strength` number, required
  - `forceKnowledgeRetrieval` boolean
  - `retrievalTags` string[]
  - `lakeScopeExplicit` boolean: True when `retrievalTags` is a deliberate choice, so an empty list means "no lake" rather than "any".
  - `includeLibraryFiles` boolean: Whether the session grounds on your own library alongside its lakes. Absent when never set.
  - `lastUsedModel` string, nullable
  - `firstCreated` string, date-time, required
  - `lastUpdated` string, date-time, required

## Other responses

- `400`: The session id is missing or `targetSurface` is malformed.
- `401`: Missing or invalid credentials.
- `403`: The API key lacks `notebooks:write` or the caller is not allowed to clone sessions.
- `404`: No session with that id is visible to the caller.
- `405`: The path does not serve this HTTP method.
- `429`: The clone limit of 10 requests per minute per caller was exceeded.

---

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