POST
POST /v1/memory_stores/{memory_store_id}/memories?beta=true — Claude API
Beta
Anthropic API key (required); https://api.anthropic.com
Claude APICreate a memory
- Base URL
- https://api.anthropic.com
- Auth
- x-api-key: <ANTHROPIC_API_KEY>
- Last verified
- 2026-10-20 · upstream hash matched
Actions Try in browser→
Agents: curl -H "Accept: text/markdown" this URL
→ 255 tokens · Vary: Accept
→ 255 tokens · Vary: Accept
Critical gotchas
Authentication uses the x-api-key header and requests also require an anthropic-version header.
The official OpenAPI URL is discovered from the SDK repository manifest and must remain under Anthropic's trusted Stainless storage prefix.
cURL
curl -X POST 'https://api.anthropic.com/v1/memory_stores/memory-store-id/memories?beta=true&view=basic' \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H 'anthropic-version: 2023-06-01' \ -H 'Content-Type: application/json' \ -d '{ "path": "example-path", "content": "example-content"}'
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| memory_store_id | path | string | Yes | Path parameter memory_store_id |
| view | query | string | No | Query parameter for view |
| path | body | string | Yes | Hierarchical path for the new memory, e.g. `/projects/foo/notes.md`. Must start with `/`, contain at least one non-empty segment, and be at most 1,024 bytes. Must not contain empty segments, `.` or `..` segments, control or format characters, or the Unicode line and paragraph separators (U+2028, U+2029), and must be NFC-normalized. Paths are case-sensitive. |
| content | body | string | Yes | UTF-8 text content for the new memory. Maximum 100 kB (102,400 bytes). Required; pass `""` explicitly to create an empty memory. |
Response 200 OK
{
"type": "memory",
"id": "string",
"memory_store_id": "string",
"path": "string",
"content": "string",
"content_size_bytes": 0,
"content_sha256": "string",
"memory_version_id": "string",
"created_at": "2026-09-03T00:00:00Z",
"updated_at": "2026-09-03T00:00:00Z"
} Get a free Claude API key → sponsored Affiliate link - we may earn a commission, at no extra cost to you.