Filesystem
Write File
Write file contents to the cell filesystem. Request body contains raw file bytes.
PUT
/v1/cells/{name}/fs/writeHTTP client
Set up your HTTP client with the auth header before calling the API. Match the authentication type shown above.
const BASE_URL = 'https://cells-api.mudbase.dev';
const HEADERS = {
'Authorization': 'Bearer YOUR_JWT_TOKEN',
'Content-Type': 'application/json',
};const BASE_URL = 'https://cells-api.mudbase.dev';
const HEADERS = {
'Authorization': 'Bearer YOUR_JWT_TOKEN',
'Content-Type': 'application/json',
};Example request
Call this endpoint using the client from SDK setup. Use View HTTP for a raw cURL example.
const res = await fetch('https://cells-api.mudbase.dev/v1/cells/YOUR_NAME/fs/write', {
method: 'PUT',
headers: HEADERS,
body: JSON.stringify({}),
});
const data = await res.json();const res = await fetch('https://cells-api.mudbase.dev/v1/cells/YOUR_NAME/fs/write', {
method: 'PUT',
headers: HEADERS,
body: JSON.stringify({}),
});
const data = await res.json();Playground
read-onlyBuild a request example for this endpoint. Read-only: the playground does not send requests. Run the request with curl or the SDK.
No Request Yet
Send a request to see the full inspector
Authentication
Requires Bearer key
Note
Include your API key in the
Authorization: Bearer YOUR_KEY header. View authentication guide →Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | - |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
path | string | Yes | Path to the file to write |
workingDir | string | Yes | Working directory for resolving relative paths |
mode | string | No | File permissions in octal (e.g., '0644') |
mkdir | boolean | No | Create parent directories if they don't exist |
Request Body
Raw file bytes to write.
json
{}{}Responses
200Success
json
{
"mode": "sensor quantify",
"path": "feed connect",
"size": 1002
}{
"mode": "sensor quantify",
"path": "feed connect",
"size": 1002
}400Bad Request - Invalid request body
404Not Found - Resource not found
413Payload Too Large - File contents exceed 16 MiB
500Internal Server Error
Errors
| Code | Meaning |
|---|---|
400 | Bad Request - Invalid request body |
404 | Not Found - Resource not found |
413 | Payload Too Large - File contents exceed 16 MiB |
500 | Internal Server Error |