---
title: "Writes a file into a feature's workspace"
method: PUT
path: "/lambdas/{privateKey}/features/{feature}/workspace/{path}"
tags: ["Workspace"]
---

# Writes a file into a feature's workspace

`PUT /lambdas/{privateKey}/features/{feature}/workspace/{path}`

## Request

- Base URL: `https://genhttp.dev/api/v1`
- URL: `https://genhttp.dev/api/v1/lambdas/{privateKey}/features/{feature}/workspace/{path}`
- Auth: none declared

## Path parameters

- `privateKey` string, required
- `feature` string, required
- `path` string, required

## Request body

- FileRequest: A file to write into a workspace.
  - `Content` string, nullable: Its bytes, base64 encoded; empty for an empty file

## Response `200`

The file as it was written

- WorkspaceEntry: One file of a workspace.
  - `Path` string: Its path within the workspace, with forward slashes: `logs/today.txt`
  - `Size` integer: How many bytes it holds
  - `Modified` string, date-time: When it was last written

## Other responses

- `204`: A response containing no body
- `400`: The content is not base64, it does not fit into the data allowance of the lambda, or the path cannot be used. Nothing was written.
- `404`: No lambda has this editor key, or the lambda has no feature with this key: it never existed, or it was merged or deleted.
- `409`: The lambda's workspace is switched off.

---

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