---
title: "Get User Profile"
method: GET
path: "/api/v1/users/profile/{user_id}"
tags: ["profile"]
---

# Get User Profile

`GET /api/v1/users/profile/{user_id}`

Get the real-time user profiles for long term memory

## Path parameters

- `user_id` union, required — The ID of the user to get profiles for
  - string, uuid4
  - string, uuid5

## Query parameters

- `topk` integer — Number of profiles to retrieve, default is all
- `max_token_size` integer — Max token size of returned profile content, default is all
- `prefer_topics` string[] — Rank prefer topics at first to try to keep them in filtering, default order is by updated time
- `only_topics` string[] — Only return profiles with these topics, default is all
- `max_subtopic_size` integer — Max subtopic size of the same topic in returned profile, default is all
- `topic_limits_json` string — Set specific subtopic limits for topics in JSON, for example {"topic1": 3, "topic2": 5}. The limits in this param will override `max_subtopic_size`.
- `chats_str` string — List of chats in OpenAI Message format, for example: [{"role": "user", "content": "Hello"}, {"role": "assistant", "content": "Hi"}]

## Response `200`

Successful Response

- UserProfileResponse
  - `data` UserProfilesData
    - `profiles` ProfileData[], required — List of user profiles
      - `id` union, required — The profile's unique identifier
        - string, uuid4
        - string, uuid5
      - `content` string, required — User profile content value
      - `created_at` string, date-time — Timestamp when the profile was created
      - `updated_at` string, date-time — Timestamp when the profile was last updated
      - `attributes` object, nullable — User profile attributes in JSON, containing 'topic', 'sub_topic'
  - `errno` 0 | 400 | 401 | 403 | 404 | 405 | 409 | 422 | 500 | 501 | 502 | 503 | 504 | 520
  - `errmsg` string — Error message, empty when success

## Other responses

- `422` — Validation Error

## Changes

- **2025-09-01** `c5d39efe16d8` — 1 info
  - for the `path` request parameter `user_id`, the type/format was generalized from `string`/`` to ``/``
- **2025-04-23** `7888f6e1f6e7` — 1 info
  - added the new optional `query` request parameter `chats_str`
- **2025-04-17** `ff75f1135b23` — 1 warning
  - added the new `520.00` enum value to the `errno` response property for the response status `200`
- **2025-02-28** `250df09d283a` — 1 info
  - added the new optional `query` request parameter `topic_limits_json`
- **2025-02-28** `b06d49a16207` — 1 info
  - added the new optional `query` request parameter `max_subtopic_size`

[Full history](https://skmtc.dev/memodb-io/apis/memobase-api/changes/api/v1/users/profile/:user_id/get.md)

---

[API](https://skmtc.dev/memodb-io/apis/memobase-api.md) · [All operations](https://skmtc.dev/memodb-io/apis/memobase-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/memodb-io/memobase-api/revisions/4543f130c8e0/schema)
