> ## Documentation Index
> Fetch the complete documentation index at: https://conductorone-docs-mcp-bridge-private-server.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Set Text Content

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



## OpenAPI

````yaml https://spec.speakeasy.com/conductor-one/conductorone/my-source-with-code-samples post /api/v1/secrets/{vault_id}/content
openapi: 3.1.0
info:
  description: The C1 API is a HTTP API for managing C1 resources.
  title: C1 API
  version: 0.1.0-alpha
servers:
  - description: The C1 API server for the current tenant.
    url: https://{tenantDomain}.conductor.one
    variables:
      tenantDomain:
        default: example
        description: The domain of the tenant to use for this request.
security:
  - bearerAuth: []
    oauth: []
paths:
  /api/v1/secrets/{vault_id}/content:
    post:
      tags:
        - Secrets
      summary: Set Text Content
      description: |-
        SetTextContent sets the encrypted content for a text secret.
         Client encrypts content using age_recipient from CreateResponse.
      operationId: c1.api.secrets.v1.PaperSecretService.SetTextContent
      parameters:
        - in: path
          name: vault_id
          required: true
          schema:
            description: The vaultId field.
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/c1.api.secrets.v1.PaperSecretServiceSetTextContentRequestInput
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/c1.api.secrets.v1.PaperSecretServiceSetTextContentResponse
          description: Successful response
      x-codeSamples:
        - lang: go
          label: SetTextContent
          source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/conductorone/conductorone-sdk-go/pkg/models/shared\"\n\tconductoronesdkgo \"github.com/conductorone/conductorone-sdk-go\"\n\t\"github.com/conductorone/conductorone-sdk-go/pkg/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    s := conductoronesdkgo.New(\n        conductoronesdkgo.WithSecurity(shared.Security{\n            BearerAuth: \"<YOUR_BEARER_TOKEN_HERE>\",\n            Oauth: \"<YOUR_OAUTH_HERE>\",\n        }),\n    )\n\n    res, err := s.PaperSecret.SetTextContent(ctx, operations.C1APISecretsV1PaperSecretServiceSetTextContentRequest{\n        VaultID: \"<id>\",\n    })\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.PaperSecretServiceSetTextContentResponse != nil {\n        // handle response\n    }\n}"
        - lang: typescript
          label: Typescript (SDK)
          source: >-
            import { ConductoroneSDKTypescript } from
            "conductorone-sdk-typescript";


            const conductoroneSDKTypescript = new ConductoroneSDKTypescript({
              security: {
                bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
                oauth: "<YOUR_OAUTH_HERE>",
              },
            });


            async function run() {
              const result = await conductoroneSDKTypescript.paperSecret.setTextContent({
                vaultId: "<id>",
              });

              console.log(result);
            }


            run();
components:
  schemas:
    c1.api.secrets.v1.PaperSecretServiceSetTextContentRequestInput:
      description: The PaperSecretServiceSetTextContentRequest message.
      properties:
        encryptedContent:
          description: >-
            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.
          format: base64
          type:
            - string
            - 'null'
        inputFormat:
          description: |-
            Input format hint for the viewer UI when the secret is decrypted.
             Does not affect encryption — this is metadata only.
          enum:
            - SECRET_INPUT_FORMAT_UNSPECIFIED
            - SECRET_INPUT_FORMAT_PLAINTEXT
            - SECRET_INPUT_FORMAT_JSON
            - SECRET_INPUT_FORMAT_YAML
            - SECRET_INPUT_FORMAT_KEY_VALUE
          type:
            - string
            - 'null'
          x-speakeasy-unknown-values: allow
      title: Paper Secret Service Set Text Content Request
      type: object
      x-speakeasy-name-override: PaperSecretServiceSetTextContentRequest
    c1.api.secrets.v1.PaperSecretServiceSetTextContentResponse:
      description: The PaperSecretServiceSetTextContentResponse message.
      properties:
        secret:
          oneOf:
            - $ref: '#/components/schemas/c1.api.secrets.v1.PaperSecret'
            - type: 'null'
      title: Paper Secret Service Set Text Content Response
      type: object
      x-speakeasy-name-override: PaperSecretServiceSetTextContentResponse
    c1.api.secrets.v1.PaperSecret:
      description: >-
        PaperSecret is the API view of a secret (combines Vault + PaperVault
        fields).
         The vault_id is the primary identifier (Vault.id).
      properties:
        allowedEmails:
          description: The allowedEmails field.
          items:
            type: string
          type:
            - array
            - 'null'
        allowedUserIds:
          description: Access control
          items:
            type: string
          type:
            - array
            - 'null'
        contentDeleted:
          description: The contentDeleted field.
          type:
            - boolean
            - 'null'
        contentExpiresAt:
          format: date-time
          type:
            - string
            - 'null'
        contentReady:
          description: Whether content has been set (text uploaded or file uploaded)
          type:
            - boolean
            - 'null'
        contentType:
          description: The contentType field.
          type:
            - string
            - 'null'
        createdAt:
          format: date-time
          readOnly: true
          type:
            - string
            - 'null'
        creatorUserId:
          description: Creator
          type:
            - string
            - 'null'
        currentViews:
          description: The currentViews field.
          format: uint32
          type:
            - integer
            - 'null'
        deletedAt:
          format: date-time
          readOnly: true
          type:
            - string
            - 'null'
        displayName:
          description: From Vault
          type:
            - string
            - 'null'
        fileSize:
          description: File metadata
          format: int64
          type:
            - string
            - 'null'
        filename:
          description: 'For FILE secrets: original filename (sanitized)'
          type:
            - string
            - 'null'
        inputFormat:
          description: The inputFormat field.
          enum:
            - SECRET_INPUT_FORMAT_UNSPECIFIED
            - SECRET_INPUT_FORMAT_PLAINTEXT
            - SECRET_INPUT_FORMAT_JSON
            - SECRET_INPUT_FORMAT_YAML
            - SECRET_INPUT_FORMAT_KEY_VALUE
          type:
            - string
            - 'null'
          x-speakeasy-unknown-values: allow
        maxViews:
          description: View tracking
          format: uint32
          type:
            - integer
            - 'null'
        secretType:
          description: The secretType field.
          enum:
            - SECRET_TYPE_UNSPECIFIED
            - SECRET_TYPE_TEXT
            - SECRET_TYPE_FILE
          type:
            - string
            - 'null'
          x-speakeasy-unknown-values: allow
        shareCode:
          description: Human-friendly share code (XXXX-XXXX-XXXX) for shareable URLs
          type:
            - string
            - 'null'
        shareUrl:
          description: URL to share with recipients (populated when content_ready is true)
          type:
            - string
            - 'null'
        sharingMode:
          description: From PaperVault
          enum:
            - PAPER_VAULT_SHARING_MODE_UNSPECIFIED
            - PAPER_VAULT_SHARING_MODE_INTERNAL
            - PAPER_VAULT_SHARING_MODE_EXTERNAL
          type:
            - string
            - 'null'
          x-speakeasy-unknown-values: allow
        status:
          description: Computed status
          enum:
            - SECRET_STATUS_UNSPECIFIED
            - SECRET_STATUS_ACTIVE
            - SECRET_STATUS_EXPIRED
            - SECRET_STATUS_BURNED
            - SECRET_STATUS_REVOKED
            - SECRET_STATUS_DATA_DELETED
          type:
            - string
            - 'null'
          x-speakeasy-unknown-values: allow
        updatedAt:
          format: date-time
          readOnly: true
          type:
            - string
            - 'null'
        vaultId:
          description: Vault.id - primary identifier for the secret
          type:
            - string
            - 'null'
      title: Paper Secret
      type: object
      x-speakeasy-name-override: PaperSecret
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http
    oauth:
      description: >-
        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()](https://github.com/ConductorOne/conductorone-sdk-go/blob/3375fe7c0126d17e7ec4e711693dee7b791023aa/token_source.go#L101-L187)
        function.
      flows:
        clientCredentials:
          scopes: {}
          tokenUrl: /auth/v1/token
      type: oauth2

````