---
search:
  tags:
    - memory
    - POST
seo:
  description: >-
    Create memory. Reference for the POST /workspaces/{organizationId}/memory
    endpoint in the Pile API.
sidebar:
  label: Create memory
  badge: POST
title: Create memory
type: openapi-operation
---
`POST /workspaces/{organizationId}/memory`

**Request body** (`application/json`)

- `entityType` (string, required)
- `entityId` (string, required)
- `kind` (string, required)
- `fact` (string, required)
- `validUntil` (string)
- `sourceAgentSlug` (string)

Request body example:

```json
{
  "entityType": "string",
  "entityId": "string",
  "kind": "string",
  "fact": "string",
  "validUntil": "string",
  "sourceAgentSlug": "string"
}
```

**Responses**

- `200` — Memory written

Response example, 200:

```json
{
  "id": "string"
}
```
