Skip to main content
PUT
/
context
/
runtime
/
content
Write runtime sandbox file
curl --request PUT \
  --url https://api.getcargo.io/v1/context/runtime/content \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "path": "<string>",
  "content": "<string>",
  "commitMessage": "<string>"
}
'
{
  "commit": {
    "sha": "<string>",
    "message": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.getcargo.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

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.

Minimum string length: 1
content
string
required

Full UTF-8 content to write.

commitMessage
string

Optional commit message override. Defaults to 'context(runtime): write '.

Minimum string length: 1

Response

Successful response

commit
Commit · object
required