Skip to main content
PUT
Write a memory file

Authorizations

Authorization
string
header
required

Your Reason API key from Settings › API keys. New keys use reason_; legacy ara_ keys remain accepted. Keys are capability-scoped: run, mcp:read, mcp:write, secrets:read, secrets:write, sessions:read, sessions:debug, knowledge:read, memory:read, memory:write, skills:read, skills:write, repos:read, repos:write, reviews:read, reviews:write, deployment:read, analytics:read, org:read, org:write, attachments:read, attachments:write, guardrails:read, guardrails:write, network:read, network:write, automations:read, automations:write, agent_auth:read. network:read and network:write are opt-in, excluded from default keys. network:read reads the saved workspace network policy; network:write replaces custom allowed hosts and requires a current organization owner/admin. Legacy project PATCH requests containing network_allowed_hosts also require network:write plus their existing run scope and project management permission; saved project hosts do not affect current session egress. Only owners/admins can mint or manage keys with network:write; keys cannot grant themselves more authority. See /docs/network-policies for replacement semantics and runtime applicability. mcp:write manages MCP server configuration only; it does not authorize remote MCP-tool execution. sessions:read reads sessions, including the assistant, reasoning and tool activity in their events. sessions:debug is privileged: only for organization owners/admins, it expands session events to the full diagnostic projection (diagnostic event kinds, status text and raw event metadata).

Path Parameters

orgId
string
required

Organization id or slug. Resolve it with GET /v3/self.

Body

application/json
scope
enum<string>
required

personal: the memory of the person the API key or OAuth grant belongs to, private to them. team: the Workspace's shared team memory, which every member's Sessions read.

Available options:
personal,
team
path
string
required

The file's path within the scope: MEMORY.md (the index) or a note such as web-app.md. A name without an extension gets .md, and paths are lower case, so Web-App and web-app.md are one note. Personal notes may sit in up to three folders (projects/web-app.md); team notes sit at the top or in a place folder such as reasons/<key>/. A memory:/ or team:/ prefix is accepted and ignored.

content
string
required

The file's complete new text; it replaces what the file holds. A note needs some text and at most 32 KiB; MEMORY.md at most 12 KiB. Text holding a secret, or instructions aimed at a later Session, is refused.

expected_revision_id
string | null

The revision_id of the file as last read: the write is refused with 409 when the file has changed since. null requires that the file does not exist yet. Leave it out to replace whatever the file holds.

Response

The file as stored.

scope
enum<string>

personal: the memory of the person the API key or OAuth grant belongs to, private to them. team: the Workspace's shared team memory, which every member's Sessions read.

Available options:
personal,
team
file
object
updated
boolean

False when the file already held this text, so nothing changed.