---
title: "Create Memory"
method: POST
path: "/memories"
---

# Create Memory

`POST /memories`

## Request

- Base URL: `https://api.traversal.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.traversal.com/memories`
- Auth: none declared

Create a new memory.

Args:
    request: Request containing memory details.
    authorized_user: Authorized user with organization context.

Returns:
    Created memory object.

Raises:
    HTTPException: If category not found or creation fails.

## Request body

- CreateMemoryRequest: Request payload for creating a new memory.
  - `title` string, required: Title of the memory
  - `instructions` string, required: Instructions or content of the memory
  - `use_case` string, nullable: Use case for the memory
  - `type` 'manual' | 'wiki' | 'runbook' | 'postmortem' | 'faq' | 'code_summary' | 'dashboard_summary' | 'log_field_mapping' | 'elastic_index_mapping' | 'service_catalog' | 'metrics-paths' | 'unknown'
  - `category` string, required: UUID of the category
  - `attachments` RequestFile[]: List of file attachments
    - `file_name` string, required
    - `base64_file` string
    - `mime_type` string, nullable
    - `url` string, nullable

## Response `200`

Successful Response

- MemoryResponse: Response model for a single memory.
  - `id` string, nullable: UUID of the memory
  - `title` string, nullable, required: Title of the memory
  - `instructions` string, nullable, required: Instructions or content
  - `category` string, nullable: UUID of the category
  - `use_case` string, nullable: Use case for the memory
  - `type` string, nullable: Type of memory
  - `is_enabled` boolean, nullable: Whether the memory is enabled
  - `last_updated_user_id` string, nullable: User ID who last updated this memory
  - `attachments` RequestFile[]: List of file attachments
    - `file_name` string, required
    - `base64_file` string
    - `mime_type` string, nullable
    - `url` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/traversal/apis/traversal-api.md) - [All operations](https://skmtc.dev/traversal/apis/traversal-api/llms.txt) - [OpenAPI document](https://skmtc.dev/traversal/apis/traversal-api/revisions/31e1a8b7cf89?raw)
