> ## Documentation Index
> Fetch the complete documentation index at: https://www.voiceflow.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create secret

> Creates a secret on the project, optionally with its project-level value, which is written to the vault and never read back. Omit the value to create a placeholder for a teammate to fill in the Voiceflow UI; MCP clients must create it empty.



## OpenAPI

````yaml /specs-prettified/realtime/openapi.stable.json post /v1/stable/secret
openapi: 3.0.0
info:
  title: Realtime
  description: Realtime gateway API service
  version: 1.0.0
  contact: {}
servers:
  - url: https://realtime-api.voiceflow.com
security: []
tags: []
paths:
  /v1/stable/secret:
    post:
      tags:
        - Secret
      summary: Create secret
      description: Creates a secret on the project, optionally with its project-level
        value, which is written to the vault and never read back. Omit the value
        to create a placeholder for a teammate to fill in the Voiceflow UI; MCP
        clients must create it empty.
      operationId: StableSecretController_create
      parameters:
        - name: projectID
          required: true
          in: query
          schema:
            type: string
            description: The ID of the project to operate on.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/StableSecretCreateRequest"
      responses:
        "201":
          description: Returns the new secret with its generated ID, the value to
            reference from a tool input default so the credential is injected at
            runtime, plus its name, visibility and whether a value is stored.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StableSecretResponse"
          x-vf-doc:
            description: Returns the new secret with its generated ID, the value to
              reference from a tool input default so the credential is injected
              at runtime, plus its name, visibility and whether a value is
              stored.
      security:
        - token: []
components:
  schemas:
    StableSecretCreateRequest:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 64
          description: The name of the secret. Must be unique within the project.
        defaultValue:
          description: The project-level value. Omit to create the secret as a placeholder
            with no value — a teammate can fill it in later through the
            Voiceflow UI or CLI.
          type: string
        visibility:
          default: masked
          description: Whether the value can be revealed in the Voiceflow UI. `restricted`
            secrets can never be read back by anyone.
          allOf:
            - $ref: "#/components/schemas/SecretVisibility"
      required:
        - name
      additionalProperties: false
    SecretVisibility:
      type: string
      enum:
        - restricted
        - masked
      x-enumNames:
        - RESTRICTED
        - MASKED
    StableSecretResponse:
      type: object
      properties:
        secret:
          $ref: "#/components/schemas/StableSecret"
      required:
        - secret
    StableSecret:
      type: object
      properties:
        id:
          type: string
          description: "The ID of the secret. This is the value to put in a tool input
            default (`defaultValue: [{ secretID }]`) so the credential is
            injected at runtime."
        name:
          type: string
          description: The name of the secret, unique within the project.
        visibility:
          description: "`masked` secrets can be revealed in the Voiceflow UI by users with
            permission; `restricted` secrets can never be read back by anyone."
          allOf:
            - $ref: "#/components/schemas/SecretVisibility"
          enum:
            - restricted
            - masked
          x-enumNames:
            - RESTRICTED
            - MASKED
        hasValue:
          type: boolean
          description: Whether a project-level default value is currently stored for this
            secret.
        createdAt:
          type: string
          format: date-time
          pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        updatedAt:
          type: string
          format: date-time
          pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
      required:
        - id
        - name
        - visibility
        - hasValue
        - createdAt
        - updatedAt
  securitySchemes:
    token:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Voiceflow bearer token
````
