Set Text Content
SetTextContent sets the encrypted content for a text secret. Client encrypts content using age_recipient from CreateResponse.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
This API uses OAuth2 with the Client Credential flow. Client Credentials must be sent in the BODY, not the headers. For an example of how to implement this, refer to the c1TokenSource.Token() function.
Path Parameters
The vaultId field.
Body
The PaperSecretServiceSetTextContentRequest message.
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.
Input format hint for the viewer UI when the secret is decrypted. Does not affect encryption — this is metadata only.
SECRET_INPUT_FORMAT_UNSPECIFIED, SECRET_INPUT_FORMAT_PLAINTEXT, SECRET_INPUT_FORMAT_JSON, SECRET_INPUT_FORMAT_YAML, SECRET_INPUT_FORMAT_KEY_VALUE Response
Successful response
The PaperSecretServiceSetTextContentResponse message.
PaperSecret is the API view of a secret (combines Vault + PaperVault fields). The vault_id is the primary identifier (Vault.id).