---
title: "Create a new memory"
method: POST
path: "/v1/org/{orgId}/ai/agent-memory"
tags: ["ai"]
---

# Create a new memory

`POST /v1/org/{orgId}/ai/agent-memory`

## Path parameters

- `orgId` string, required

## Request body

- CreateAiAgentMemory
  - `agentUserId` string, required — AI agent user id that owns this memory
  - `userId` string — user id this memory is scoped to; null means org-wide
  - `actionId` string — action id this memory is scoped to; null means not action-scoped
  - `content` string, required — text content of the memory
  - `importance` number, double — importance score from 0.0 (low) to 1.0 (high)
  - `expireAt` string — optional expiration timestamp; memory is auto-deleted after this time
  - `sourceAiChatId` string — id of the AI chat that created this memory

## Response `201`

successful operation

## Other responses

- `400` — invalid data
- `401` — not authorized
- `403` — permission denied

---

[API](https://skmtc.dev/charthop/apis/charthop-api.md) · [All operations](https://skmtc.dev/charthop/apis/charthop-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/charthop/charthop-api/revisions/4685d95a20b1/schema)
