# Update a memory item

`POST /memory_stores/{name}/items/{memory_id}`

Updates the specified memory item in the memory store.

## Parameters

### Path parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `name` | `string` | Yes | The name of the memory store. |
| `memory_id` | `string` | Yes | The ID of the memory item to update. |

### Query parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `api-version` | `string` | Yes | The API version to use for this operation. |

### Header parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `Foundry-Features` | `enum` | Yes | A feature flag opt-in required when using preview operations or modifying persisted preview resources. _Constant:_ `MemoryStores=V1Preview` |

## Request Body

Content-Type: `application/json` *(required)*

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `content` | `string` | Yes | The updated content of the memory. |

## Responses

### 200 — The request has succeeded.

Content-Type: `application/json`

A single memory item stored in the memory store, containing content and metadata.

**One of the following:**

#### `user_profile` — `user_profile (UserProfileMemoryItem)`

A memory item specifically containing user profile information extracted from conversations, such as preferences, interests, and personal details.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `memory_id` | `string` | Yes | The unique ID of the memory item. |
| `updated_at` | `FoundryTimestamp` | Yes | The last update time of the memory item. _Format:_ `unixtime` |
| `scope` | `string` | Yes | The namespace that logically groups and isolates memories, such as a user ID. |
| `content` | `string` | Yes | The content of the memory. |
| `kind` | `enum` | Yes | The kind of the memory item. _Constant:_ `user_profile` |

#### `chat_summary` — `chat_summary (ChatSummaryMemoryItem)`

A memory item containing a summary extracted from conversations.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `memory_id` | `string` | Yes | The unique ID of the memory item. |
| `updated_at` | `FoundryTimestamp` | Yes | The last update time of the memory item. _Format:_ `unixtime` |
| `scope` | `string` | Yes | The namespace that logically groups and isolates memories, such as a user ID. |
| `content` | `string` | Yes | The content of the memory. |
| `kind` | `enum` | Yes | The kind of the memory item. _Constant:_ `chat_summary` |

#### `procedural` — `procedural (ProceduralMemoryItem)`

A memory item containing a procedure extracted from conversations.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `memory_id` | `string` | Yes | The unique ID of the memory item. |
| `updated_at` | `FoundryTimestamp` | Yes | The last update time of the memory item. _Format:_ `unixtime` |
| `scope` | `string` | Yes | The namespace that logically groups and isolates memories, such as a user ID. |
| `content` | `string` | Yes | The content of the memory. |
| `kind` | `enum` | Yes | The kind of the memory item. _Constant:_ `procedural` |

### 4XX — Client error

Content-Type: `application/json`

Error response for API failures.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `error` | `OpenAI.Error` | Yes |  |

#### `error` — `OpenAI.Error`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `code` | `string \| null` | Yes |  |
| `message` | `string` | Yes |  |
| `param` | `string \| null` | No |  |
| `type` | `string` | No |  |
| `details` | `OpenAI.Error[]` | No |  |
| `additionalInfo` | `object` | No |  |
| `debugInfo` | `object` | No |  |

### 5XX — Server error

Content-Type: `application/json`

Error response for API failures.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `error` | `OpenAI.Error` | Yes |  |

#### `error` — `OpenAI.Error`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `code` | `string \| null` | Yes |  |
| `message` | `string` | Yes |  |
| `param` | `string \| null` | No |  |
| `type` | `string` | No |  |
| `details` | `OpenAI.Error[]` | No |  |
| `additionalInfo` | `object` | No |  |
| `debugInfo` | `object` | No |  |
