---
title: "Save records"
method: POST
path: "/v2/memory/users/set"
tags: ["Memory"]
---

# Save records

`POST /v2/memory/users/set`

Creates or updates a user's memory records, identified by userReferenceId and botId. Accepts a maximum of 20 records per request.

## Headers

- `x-hash-ttl` integer

## Request body

- object
  - `userReferenceId` string, required — External reference identifier of the user.
  - `botId` string, required — Identifier of the bot associated with the memory.
  - `values` object, required — Map of key to record structure. The key is the variable name. Maximum 20 keys per request.

## Response `201`

Records saved successfully.

## Other responses

- `401` — Unauthorized - Invalid authentication credentials
- `403` — Forbidden - The API key lacks the required scope (memory:read / memory:write)
- `422` — Unprocessable entity - Validation error
- `500` — Internal server error

---

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