---
title: "Create Secret"
method: POST
path: "/api/v1/vault/secrets"
tags: ["vault"]
---

# Create Secret

`POST /api/v1/vault/secrets`

## Request

- Base URL: `https://core.mnemoverse.com`
- URL: `https://core.mnemoverse.com/api/v1/vault/secrets`
- Auth: one of:
  - API key in header `X-Api-Key`
  - HTTP bearer

Store a secret-atom: the context is embedded and kept with its concepts
(it enters neither the memory concept index nor the association graph) and
is listed by GET /vault/secrets. Export keeps
it as a row marked atom_type "secret". Memory search leaves it out, the
point reads by atom id or external_ref and the atom chain answer 404, and
memory stats and the memory atom limit do not count it; the single-tenant WS
/memory/stream still carries it. The envelope-encrypted value goes to the
use-only column.

## Request body

- CreateSecretRequest
  - `context` string, required: In-clear routing/usage context. Listed by GET /vault/secrets and kept in GET /memory/export as a row with atom_type 'secret'. Not returned by memory search (POST /memory/read, /memory/read-batch, /memory/query, /memory/recent), nor by the point reads by atom id or external_ref or the atom chain, which answer 404 as for an atom that does not exist. The single-tenant WS /memory/stream (off in multi-tenant deployments) still carries it.
  - `sealed_secret_b64` string, required: Base64 of the envelope-encrypted value bytes.
  - `concepts` string[]
  - `domain` string
  - `metadata` object
  - `alias` string, required: Human alias, unique per org. Path-safe chars only (A-Z a-z 0-9 . _ -).

## Response `200`

Successful Response

- CreateSecretResponse
  - `atom_id` string, required
  - `alias` string, required

## Other responses

- `400`: Validation error
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found
- `422`: Validation Error
- `429`: Rate limited
- `500`: Internal server error
- `503`: Subscription state could not be verified (fails CLOSED, unlike SubscriptionGuardMiddleware's fail-OPEN on the same failure class — see docs/OPERATIONS.md "Stopping an organization"). Retry after the given delay.

---

[API](https://skmtc.dev/mnemoverse/apis/mnemoverse-core.md) · [All operations](https://skmtc.dev/mnemoverse/apis/mnemoverse-core/llms.txt) · [OpenAPI document](https://skmtc.dev/mnemoverse/apis/mnemoverse-core/revisions/1f5e0048f017?raw)
