> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chowder.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Write File

> Write text content to a file on the instance.

Writes text content to a file on the instance. If the file already exists, it will be overwritten. If it doesn't exist, it will be created (along with any necessary parent directories).

## Authentication

Requires an **org-level API key** or a **scoped token** with the appropriate permission.

## Path Parameters

<ParamField path="instance_id" type="string" required>
  The ID of the instance.
</ParamField>

## Body Parameters

<ParamField body="path" type="string" required>
  The file path to write to, relative to the instance root.
</ParamField>

<ParamField body="content" type="string" required>
  The text content to write to the file.
</ParamField>

## Response

Returns `204 No Content` on success.

<RequestExample>
  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
  curl -X PUT https://api.chowder.dev/v1/instances/ins_abc123/files/content \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "path": "config/custom.json",
      "content": "{\n  \"key\": \"value\"\n}"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```text 204 theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
  No Content
  ```
</ResponseExample>
