---
title: "Get memories"
method: GET
path: "/v1/{organization}/user/{user_id}/memory"
tags: ["User"]
---

# Get memories

`GET /v1/{organization}/user/{user_id}/memory`

Retrieve memories for the specified users.

#### Permissions
This endpoint may be impacted by the following permissions:
* Only memories with references that the authenticated user has the `Conversation:GetMessage` permission on will be returned.

## Path parameters

- `organization` string, required
- `user_id` string, required — The ID of the user to retrieve memories for.

## Query parameters

- `id` string[] — The IDs of the memories to retrieve.
- `conversation_id` string[] — The IDs of the conversations to retrieve memories from.
- `limit` integer — The maximum number of memories to retrieve.
- `continuation_token` integer — The token from the previous request to return the next page of memories.
- `sort_by` string[] — The fields to sort the sets by. Supported fields are `conversation_id` and `created_at`. Specify a `+` before the field name to indicate ascending sorting and `-` for descending sorting. Multiple fields can be specified to break ties.

## Headers

- `x-mongo-cluster-name` string, nullable — The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
- `Sec-WebSocket-Protocol` string[]

## Response `200`

Succeeded.

- SrcAppEndpointsUserGetMemoriesResponse
  - `memories` MemoryInstance[], required — The memories satisfying the filters.
    - `id` string, required — The identifier of the memory.
    - `created_at` string, date-time, required — The time at which this memory was created.
    - `conversation_id` string, required — The ID of the conversation from where this memory was created.
    - `references` string[], required — The identifiers of the messages that this memory references.
    - `content` string, required — The content of the memory.
    - `context` string, required — The context of the memory.
  - `has_more` boolean, required — Whether there are more memories to retrieve.
  - `continuation_token` integer, nullable, required — A token to supply to the next request to retrieve the next page of memories. Only populated if `has_more` is `True`.

## Other responses

- `401` — Invalid authorization credentials.
- `403` — Missing required permissions.
- `404` — Specified organization or user is not found.
- `422` — Invalid request path parameter or request query parameter failed validation.
- `429` — The user has exceeded the rate limit of 40 requests per minute for this endpoint.
- `503` — The service is going through temporary maintenance.

---

[API](https://skmtc.net/amigo/apis/amigo-api.md) · [All operations](https://skmtc.net/amigo/apis/amigo-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/amigo/amigo-api/revisions/f0f28319e448/schema)
