Skip to main content
Replaces the content of an existing memory belonging to the authenticated user.
Authorization
string
required
Bearer token obtained from the authenticate endpoint.
memory_id
string
required
UUID of the memory to update.
content
string
required
The new memory content.

Response

Returns the updated memory object.
id
string
Unique memory ID (UUID).
organization_id
string
Organization this memory belongs to.
member_id
string
Member this memory belongs to.
content
string
The updated memory content.
created_at
string
ISO 8601 timestamp when the memory was created.
updated_at
string
ISO 8601 timestamp when the memory was last updated.
curl -X PATCH https://api.trellis.sh/v1/user-memories/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"content": "Prefers concise responses with examples"}'
import requests

memory_id = "a1b2c3d4-e5f6-7890-abcd-ef1234567890"

response = requests.patch(
    f"https://api.trellis.sh/v1/user-memories/{memory_id}",
    headers={
        "Authorization": "Bearer YOUR_TOKEN",
        "Content-Type": "application/json",
    },
    json={"content": "Prefers concise responses with examples"},
)

memory = response.json()
const memoryId = "a1b2c3d4-e5f6-7890-abcd-ef1234567890";

const response = await fetch(
  `https://api.trellis.sh/v1/user-memories/${memoryId}`,
  {
    method: "PATCH",
    headers: {
      Authorization: "Bearer YOUR_TOKEN",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ content: "Prefers concise responses with examples" }),
  }
);

const memory = await response.json();
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "organization_id": "org_01HX...",
  "member_id": "member_01HX...",
  "content": "Prefers concise responses with examples",
  "created_at": "2025-03-01T10:00:00+00:00",
  "updated_at": "2025-03-20T09:15:00+00:00"
}
{
  "detail": "Missing Authorization header"
}
{
  "detail": "User memory not found"
}