---
title: "Create a memory"
method: POST
path: "/api/memories"
tags: ["Memories"]
---

# Create a memory

`POST /api/memories`

## Request

- Base URL: `https://api.memcore.global-soft.ro`
- URL: `https://api.memcore.global-soft.ro/api/memories`
- Auth: one of:
  - API key in cookie `authjs.session-token`
  - HTTP bearer

Credentials in `content` and in string values of `metadata` (provider API keys, tokens, private keys, URL passwords, Authorization headers, labelled values such as API_KEY=...) are replaced with `[REDACTED:<type>]` before the memory is stored or embedded. When anything was removed the response includes `redacted: [{ type, count }]`.

## Request body

- CreateMemory
  - `content` string, required: Memory content
  - `kind` 'fact' | 'preference' | 'episode' | 'skill' | 'relationship' | 'custom'
  - `confidence` number
  - `metadata` object
  - `tags` string[]
  - `source` string
  - `scope_id` string, required: Scope identifier

## Response `201`

Memory created

- MemoryResponse
  - `id` string
  - `scope_id` string
  - `content` string
  - `kind` 'fact' | 'preference' | 'episode' | 'skill' | 'relationship' | 'custom'
  - `confidence` number
  - `metadata` object, nullable
  - `tags` string[], nullable
  - `source` string, nullable
  - `created_at` string, date-time
  - `updated_at` string, date-time

## Other responses

- `422`: Validation failed

---

[API](https://skmtc.dev/kognite/apis/memcore-api.md) · [All operations](https://skmtc.dev/kognite/apis/memcore-api/llms.txt) · [OpenAPI document](https://skmtc.dev/kognite/apis/memcore-api/revisions/73e03a22eec8?raw)
