Skip to main content
PATCH
Update a context file

Authorizations

Authorization
string
header
required

Can be either an Organization API Key or Personal Access Token (PAT).

Include in the Authorization header as: Bearer YOUR_TOKEN

Path Parameters

id
string<uuid>
required

The file's id. Use List context files to retrieve IDs.

Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"

Query Parameters

userId
string<uuid>

Target user ID (for org-scoped API keys)

Body

application/json
content
string
required

The content to replace the file's body, up to 20000 characters. This will replace the file's entire body. Read the file first with the Read a context file endpoint and then use this endpoint to submit your changes.

Example:

"Fiscal years start in February."

Response

The file's metadata. Use Read a context file to view the updated content body.

file
object
required