---
search:
  tags:
    - memory
    - PATCH
seo:
  description: >-
    Update memory. Reference for the PATCH
    /workspaces/{organizationId}/memory/{id} endpoint in the Pile API.
sidebar:
  label: Update memory
  badge: PATCH
title: Update memory
type: openapi-operation
---
`PATCH /workspaces/{organizationId}/memory/{id}`

**Request body** (`application/json`)

- `fact` (string)
- `kind` (string)
- `validUntil` (string | null)

Request body example:

```json
{
  "fact": "string",
  "kind": "string",
  "validUntil": "string"
}
```

**Responses**

- `200` — Memory fact updated
- `404` — Memory fact not found

Response example, 200:

```json
{
  "memory": {
    "id": "string",
    "entityType": "string",
    "entityId": "string",
    "kind": "string",
    "fact": "string",
    "sourceSessionId": "string",
    "sourceAgentSlug": "string",
    "validUntil": "string",
    "createdAt": "string"
  }
}
```
