MAILGENT

vault.store

Store or update a credential in the vault

Scope: vault:write

Store or update a credential in the vault. All secret data is encrypted at rest.

Parameters

NameTypeRequiredDescription
namestringYesCredential name (e.g. 'stripe-api')
typestringYesOne of: LOGIN, API_KEY, OAUTH, TOTP, SSH_KEY, DATABASE, SMTP, AWS, CERTIFICATE, CUSTOM
dataobjectYesSecret fields to encrypt
metadataobjectNoNon-secret metadata for display
expiresAtstringNoExpiry date (ISO 8601)

Example

Agent: "Store my Stripe API key"

-> vault.store({
    name: "stripe-api",
    type: "API_KEY",
    data: { key: "sk_live_..." },
    metadata: { service: "stripe" }
  })

Returns

{
  "credentialId": "cred-abc",
  "type": "API_KEY",
  "name": "stripe-api",
  "metadata": { "service": "stripe" },
  "createdAt": "2026-03-01T10:00:00.000Z"
}

REST Equivalent

PUT /v0/vault/:name

On this page