Skip to content

Create a vault

POST
/vaults
curl --request POST \
--url https://api.engram.page/vaults \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "description": "Papers and reading notes.", "is_default": false, "name": "Research" }'

Creates a new vault for the user and returns it with zeroed content counts. Returns 402 when the plan’s vault cap is reached and 422 on validation errors.

Vault attributes

Media typeapplication/json
CreateVaultRequest
object
description
string
nullable
is_default
boolean
name
required
string
Example
{
"description": "Papers and reading notes.",
"is_default": false,
"name": "Research"
}

Created

Media typeapplication/json
VaultResponse
object
vault
required
Vault
object
attachment_count
integer
created_at
string format: date-time
nullable
deleted_at
string format: date-time
nullable
description
string
nullable
encrypted

Always true — vaults are encrypted at rest.

boolean
id
required
string format: uuid
is_default
boolean
name
required
string
note_count
integer
purge_at

When a soft-deleted vault is hard-purged (deleted_at + 30d).

string format: date-time
nullable
slug
string
nullable
Examplegenerated
{
"vault": {
"attachment_count": 1,
"created_at": "2026-04-15T12:00:00Z",
"deleted_at": "2026-04-15T12:00:00Z",
"description": "example",
"encrypted": true,
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"is_default": true,
"name": "example",
"note_count": 1,
"purge_at": "2026-04-15T12:00:00Z",
"slug": "example"
}
}

Vault cap reached

Media typeapplication/json
LimitError
object
current
integer
nullable
error
required
string
limit
One of:
integer
limit_key
string
nullable
reason
required
string
tier
string
nullable
upgrade_url
string
nullable
Example
{
"error": "limit_exceeded",
"limit_key": "vaults_cap",
"reason": "vaults_cap_exceeded",
"tier": "free"
}

Validation error

Media typeapplication/json
Error
object
errors
One of:
string
Examplegenerated
{
"errors": {}
}