# List memory items

`POST /memory_stores/{name}/items:list`

Returns memory items from the specified memory store.

## Parameters

### Path parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `name` | `string` | Yes | The name of the memory store. |

### Query parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `kind` | `enum` | No | The kind of the memory item. _Enum:_ `user_profile`, `chat_summary`, `procedural` |
| `limit` | `integer` | No | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. _Default:_ `20` |
| `order` | `PageOrder` | No | Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc` for descending order. _Enum:_ `asc`, `desc` |
| `after` | `string` | No | A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. |
| `before` | `string` | No | A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. |
| `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 |
|----------|------|----------|-------------|
| `scope` | `string` | Yes | The namespace that logically groups and isolates memories, such as a user ID. |

## Responses

### 200 — The request has succeeded.

Content-Type: `application/json`

The response data for a requested list of items.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `data` | `(UserProfileMemoryItem \| ChatSummaryMemoryItem \| ProceduralMemoryItem)[]` | Yes | The requested list of items. |
| `first_id` | `string` | No | The first ID represented in this list. |
| `last_id` | `string` | No | The last ID represented in this list. |
| `has_more` | `boolean` | Yes | A value indicating whether there are additional values available not captured in this list. |

#### `data` — `(UserProfileMemoryItem | ChatSummaryMemoryItem | ProceduralMemoryItem)[]`

The requested list of items.

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