Skip to main content
PUT
Write a file

Authorizations

Authorization
string
header
required

An org API key (gh_live_…) from Settings → API keys in the console.

Path Parameters

agent_id
string
required

The agent’s id, e.g. billing or default.

path
string
required

The file’s path, like notes/customers.md (with its slashes as they are, or encoded as %2F).

Body

application/json
content
string
required

The whole text of the file.

Example:

"# Returns\nWithin 30 days, with the receipt."

Response

OK

object
any
agent_id
string
Example:

"billing"

path
string

Always starts with /.

Example:

"/notes/customers.md"

bytes
integer

Its size in UTF-8.

created_at
string<date-time>
updated_at
string<date-time>
updated_by
Person · object

Who last wrote the file: a person, an API key, or the agent itself during a task (task_id).

content
string

The file’s text. Only when you get or write one file.