Skip to content

POST /fs/*path - Create file or directory

POST
/v1/sessions/{session_id}/fs/{path}
session_id
required
string

Session ID (prefixed, e.g., sess_…)

path
required
string

File or directory path

Request to create a file

object
content

File content (text or base64-encoded)

string | null
encoding

Content encoding: “text” or “base64”

string | null
is_directory

Whether to create a directory instead of a file

boolean | null
is_readonly

Whether file is read-only

boolean | null

Created successfully

Complete file with content

object
content

Base64-encoded content for binary files, plain text for text files

string | null
created_at
required
string format: date-time
encoding

Content encoding: “text” or “base64”

string
id
required
string format: uuid
is_directory
required
boolean
is_readonly
required
boolean
name
required
string
path
required
string
session_id
required
string format: uuid
size_bytes
required
integer format: int64
updated_at
required
string format: date-time

Invalid session ID or request

Already exists

Internal server error