---
title: "Write one file."
method: PUT
path: "/api/workspace/file"
---

# Write one file.

`PUT /api/workspace/file`

## Request

- Base URL: `https://shapelessai.com`
- URL: `https://shapelessai.com/api/workspace/file`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://shapelessai.com/api/auth/mcp/authorize`, token URL `https://shapelessai.com/api/auth/mcp/token`, scopes: `write`)

## Response `200`

OK

## Other responses

- `400`: Bad path, or frontmatter Brand Memory refuses (an authority that is not rule or reference, a stale_after that is not a real date); the error says which. Fix the file, do not resend it as is.
- `401`: No credential, or not valid.
- `403`: The key is missing the "write" scope.
- `413`: Over 256 KB; nothing was written.
- `429`: Over the key's rate limit (600 requests an hour).
- `502`: Brand Memory is not answering; nothing was written. Resend later.

## Changes

- **2026-10-20** `fae8f701d466`: 3 info
  - added the non-success response with the status `400`
  - added the non-success response with the status `413`
  - added the non-success response with the status `502`

[Operation history](https://skmtc.dev/shapelessai/apis/shapeless-api/changes/api/workspace/file/put.md)

---

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