---
title: "Copy a folder from the caller's machine into the workspace [write]"
method: POST
path: "/sessions/{id}/workspace/import"
---

# Copy a folder from the caller's machine into the workspace \[write\]

`POST /sessions/{id}/workspace/import`

## Request

- Base URL: `https://api.agentsky.dev/v1`
- URL: `https://api.agentsky.dev/v1/sessions/{id}/workspace/import`
- Auth: HTTP bearer

The body is the folder as a gzipped tar (up to 25 MB). It is unpacked at <workspace root>/<name> as the workspace owner and made a git repository whose first commit is that copy, so /workspace/patch later answers the work done on it. Wakes a parked pod. 400 invalid_name, 409 already_exists, 413 archive_too_large, 422 invalid_archive.

## Path parameters

- `id` string, required

## Query parameters

- `name` string, required

## Request body `application/gzip`

- string, binary

## Response `200`

OK

- object
  - `path` string
  - `files` integer

## Other responses

- `default`: Error — { error: { code, message, request_id } }

## Changes

- **2026-11-02** `e5e8f0229a99`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/agentsky/apis/agentsky-developer-api/changes/sessions/:id/workspace/import/post.md)

---

[API](https://skmtc.dev/agentsky/apis/agentsky-developer-api.md) - [All operations](https://skmtc.dev/agentsky/apis/agentsky-developer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/agentsky/apis/agentsky-developer-api/revisions/8280a065ef6a?raw)
