---
title: "Copy session"
method: POST
path: "/session/{session_id}/copy"
tags: ["session"]
---

# Copy session

`POST /session/{session_id}/copy`

Create a complete copy of a session with all its messages and tasks. The copied session will be independent and can be modified without affecting the original.

## Path parameters

- `session_id` string, uuid, required

## Response `200`

OK

- object
  - `code` integer
  - `error` string
  - `msg` string
  - `data` HandlerCopySessionResp
    - `new_session_id` string
    - `old_session_id` string

## Other responses

- `400` — Invalid session ID
- `404` — Session not found
- `413` — Session exceeds maximum copyable size
- `500` — Failed to copy session

## Changes

> 50 revisions in range; 1 could not be searched.

- **2026-02-21** `e231dcf674c7` — 1 info
  - endpoint added
- **2025-11-12** `a1c1bcb0e2ee` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/memodb-io/apis/acontext-api/changes/session/:session_id/copy/post.md)

---

[API](https://skmtc.dev/memodb-io/apis/acontext-api.md) · [All operations](https://skmtc.dev/memodb-io/apis/acontext-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/memodb-io/acontext-api/revisions/c8775333b1ed/schema)
