v32

latestOpenAPI 3.1.0raw.githubusercontent.com2026-05-224341,4072.0 MB
Secrets

Set Text Content

SetTextContent sets the encrypted content for a text secret. Client encrypts content using age_recipient from CreateResponse.

post/api/v1/secrets/{vault_id}/content

Path parameters

vault_idstring required

The vaultId field.

Request body

encryptedContentstring base64

Age-encrypted content bytes. The plaintext MUST be encrypted using the Age encryption format to the age_recipient returned by CreateInternal/CreateExternal. The resulting bytes begin with "age-encryption.org/v1\n" followed by the encrypted payload. Maximum 64KB after encryption — for larger content, create a FILE secret and use the upload_url instead.

inputFormat'SECRET_INPUT_FORMAT_UNSPECIFIED' | 'SECRET_INPUT_FORMAT_PLAINTEXT' | 'SECRET_INPUT_FORMAT_JSON' | 'SECRET_INPUT_FORMAT_YAML' | 'SECRET_INPUT_FORMAT_KEY_VALUE'

Input format hint for the viewer UI when the secret is decrypted. Does not affect encryption — this is metadata only.

Response

Successful response