Register or fetch a vault by client_id (idempotent)
const url = 'https://api.engram.page/vaults/register';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"client_id":"obsidian-9f1b2c3d4e5f","name":"My Vault"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.engram.page/vaults/register \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "client_id": "obsidian-9f1b2c3d4e5f", "name": "My Vault" }'Used by the plugin on first sync. Returns 201 with status: created for a new vault, or 200 with status: existing when the client_id already maps to one.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Name + client_id
object
Client-generated stable vault id.
Example
{ "client_id": "obsidian-9f1b2c3d4e5f", "name": "My Vault"}Responses
Section titled “Responses”Existing vault
object
Always true — vaults are encrypted at rest.
True once the vault holds a note other than the seeded welcome note (the moment the vault_populated event fires).
When a soft-deleted vault is hard-purged (deleted_at + 30d).
Example
{ "status": "created"}Newly created vault
object
Always true — vaults are encrypted at rest.
True once the vault holds a note other than the seeded welcome note (the moment the vault_populated event fires).
When a soft-deleted vault is hard-purged (deleted_at + 30d).
Example
{ "status": "created"}Name and client_id are required
object
Example
{ "error": "not found"}Vault cap reached
Vault outside the credential’s scope, or creation by a credential whose new-vaults policy is not write (a vault-restricted, read-level or mcp:read credential)
object
Example
{ "error": "not found"}Validation error