---
title: "Write runtime sandbox file"
method: PUT
path: "/context/runtime/content"
tags: ["Context - Runtime"]
---

# Write runtime sandbox file

`PUT /context/runtime/content`

Create or overwrite a file in the workspace runtime sandbox and push the change to the workspace's default branch on GitHub.

## Request body

- object — Write a file in the workspace runtime sandbox and push the change to the default branch.
  - `path` string, required — Path of the file to write, relative to the workspace working directory.
  - `content` string, required — Full UTF-8 content to write.
  - `commitMessage` string — Optional commit message override. Defaults to 'context(runtime): write <path>'.

## Response `200`

Successful response

- object
  - `commit` object, required
    - `sha` string, required
    - `message` string, required

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `404` — Not found
- `500` — Internal server error

---

[API](https://skmtc.net/getcargo/apis/cargo-api.md) · [All operations](https://skmtc.net/getcargo/apis/cargo-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getcargo/cargo-api/revisions/1d5a19e01d83/schema)
