> ## 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 persona

> Create a new persona.



## OpenAPI

````yaml /specs-prettified/realtime/openapi.stable.json post /v1/stable/persona
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/persona:
    post:
      tags:
        - Persona
      summary: Create persona
      description: Create a new persona.
      operationId: StablePersonaController_create
      parameters:
        - name: projectID
          required: true
          in: query
          schema:
            type: string
            description: The ID of the project to operate on.
        - name: environmentAlias
          required: true
          in: query
          schema:
            type: string
            description: The alias of the environment to operate on (e.g. `main`).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/StablePersonaCreateRequest"
      responses:
        "201":
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StablePersonaResponse"
      security:
        - token: []
components:
  schemas:
    StablePersonaCreateRequest:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 255
          description: The name of the persona. Must not already be used by another
            persona in this environment.
        items:
          default: []
          type: array
          items:
            $ref: "#/components/schemas/StablePersonaItemInput"
          description: "The variable values this persona presets. On update this replaces
            the whole list: send every item the persona should keep. An item
            read back with a null variable cannot be kept: leave it out, or name
            an existing variable in its place."
      required:
        - name
      additionalProperties: false
    StablePersonaItemInput:
      type: object
      properties:
        variable:
          type: string
          description: The exact name of an existing variable in this environment. Each
            variable may appear at most once in a persona.
        value:
          nullable: true
          description: The value the variable is set to when a test runs with this
            persona. Null leaves it unset.
          type: string
      required:
        - variable
        - value
      additionalProperties: false
    StablePersonaResponse:
      type: object
      properties:
        persona:
          $ref: "#/components/schemas/StablePersona"
      required:
        - persona
    StablePersona:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
          description: The name of the persona, unique within the environment.
        items:
          type: array
          items:
            $ref: "#/components/schemas/StablePersonaItem"
          description: The variable values this persona presets, one per variable.
        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
        - items
        - createdAt
        - updatedAt
    StablePersonaItem:
      type: object
      properties:
        variable:
          nullable: true
          description: The name of the variable this item presets. Null when the item
            names no variable, or the variable it named has since been deleted.
          type: string
        value:
          nullable: true
          description: The value the variable is set to when a test runs with this
            persona. Null leaves it unset.
          type: string
      required:
        - variable
        - value
  securitySchemes:
    token:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Voiceflow bearer token
````
