# Update a memory store

`POST /memory_stores/{name}`

Updates the specified memory store with the supplied configuration changes.

## Parameters

### Path parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `name` | `string` | Yes | The name of the memory store 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 |
|----------|------|----------|-------------|
| `description` | `string` | No | A human-readable description of the memory store. |
| `metadata` | `object` | No | Arbitrary key-value metadata to associate with the memory store. |

## Responses

### 200 — The request has succeeded.

Content-Type: `application/json`

A memory store that can store and retrieve user memories.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `object` | `enum` | Yes | The object type, which is always 'memory_store'. _Constant:_ `memory_store` |
| `id` | `string` | Yes | The unique identifier of the memory store. |
| `created_at` | `FoundryTimestamp` | Yes | The Unix timestamp (seconds) when the memory store was created. _Format:_ `unixtime` |
| `updated_at` | `FoundryTimestamp` | Yes | The Unix timestamp (seconds) when the memory store was last updated. _Format:_ `unixtime` |
| `name` | `string` | Yes | The name of the memory store. |
| `description` | `string` | No | A human-readable description of the memory store. |
| `metadata` | `object` | No | Arbitrary key-value metadata to associate with the memory store. |
| `definition` | `MemoryStoreDefaultDefinition` | Yes | The definition of the memory store. |

#### `definition` — `MemoryStoreDefaultDefinition`

The definition of the memory store.

**One of the following:**

##### `default` — `default (MemoryStoreDefaultDefinition)`

Default memory store implementation.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `kind` | `enum` | Yes | The kind of the memory store. _Constant:_ `default` |
| `chat_model` | `string` | Yes | The name or identifier of the chat completion model deployment used for memory processing. |
| `embedding_model` | `string` | Yes | The name or identifier of the embedding model deployment used for memory processing. |
| `options` | `MemoryStoreDefaultOptions` | No | Default memory store options. |

###### `options` — `MemoryStoreDefaultOptions`

Default memory store options.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `user_profile_enabled` | `boolean` | Yes | Whether to enable user profile extraction and storage. Default is true. _Default:_ `true` |
| `user_profile_details` | `string` | No | Specific categories or types of user profile information to extract and store. |
| `chat_summary_enabled` | `boolean` | Yes | Whether to enable chat summary extraction and storage. Defaults to `true`. _Default:_ `true` |
| `procedural_memory_enabled` | `boolean` | No | Whether to enable procedural memory extraction and storage. The service defaults to `true` if a value is not specified by the caller. _Default:_ `true` |
| `default_ttl_seconds` | `integer` | No | The default time-to-live for memories in seconds. A value of `0` indicates that memories do not expire. Defaults to `0`. _Default:_ `0` _Format:_ `int32` |

### 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 |  |
