vault

Replace Secret

Replace the caller's ACTIVE secret with this alias by a new sealed value and context (step 5): retire the old one (its stored value overwritten, its row kept as history), then store the new one under the SAME alias. 404 when there is nothing to replace — a new name is created with POST /vault/secrets, never by PUT. The body is validated BEFORE anything is retired. The two steps are not one transaction (simplest first, 2026-10-10): if the store fails after the retire, the error says so, the alias is free, and the caller stores again with POST; the agent sees "no such alias" in between, never a stale value. The quota count leaves retired secrets out, so a replace never needs headroom.

put/api/v1/vault/secrets/by-alias/{alias}

Request

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

Path parameters

aliasstring required

Request body

contextstring 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_b64string required

Base64 of the envelope-encrypted value bytes.

conceptsstring[]
domainstring
metadataobject

Response

Successful Response

atom_idstring required
aliasstring required
replaced_atom_idstring required
retired_atstring date-time required

Changes

No recorded changes to this operation across all 1 revision of this API.