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

# Create a brand persona

> Creates a brand persona in a project.



## OpenAPI

````yaml https://api-trial.cognigy.ai/swagger/openapi.json post /agentpersonas
openapi: 3.0.3
info:
  contact:
    email: support@example.com
    name: API Support
  description: API for managing agents and related resources
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  termsOfService: http://swagger.io/terms/
  title: Agents API
  version: '1.0'
servers:
  - url: https://api-trial.cognigy.ai/v1
security:
  - ApiKey: []
tags:
  - name: Agents
  - name: Brand personas
  - name: Tools
  - name: Built-in tools
  - name: Skills
  - name: Built-in skills
  - name: MCP servers
  - description: >-
      Remote agents that speak the A2A (Agent2Agent) protocol. Available only
      while FEATURE_ENABLE_A2A_TOOLS is on; every route answers 404 otherwise.
    name: A2A agents
  - name: Tool references
paths:
  /agentpersonas:
    post:
      tags:
        - Brand personas
      summary: Create a brand persona
      description: Creates a brand persona in a project.
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/internal_agentpersonas.CreateAgentPersonaRequest
        description: The brand persona to create.
        required: true
        x-originalParamName: agentpersona
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/internal_agentpersonas.CreateAgentPersonaResponse
          description: Returns the created brand persona.
        '400':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_cognigy_ai-agents-v2_internal_middleware.ProblemDetailBadRequest
          description: Invalid request body or validation error.
        '403':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_cognigy_ai-agents-v2_internal_middleware.ProblemDetailForbidden
          description: Access denied.
        '409':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_cognigy_ai-agents-v2_internal_middleware.ProblemDetailConflict
          description: A brand persona with this name already exists in this project.
        '500':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_cognigy_ai-agents-v2_internal_middleware.ProblemDetailInternalError
          description: Internal server error.
components:
  schemas:
    internal_agentpersonas.CreateAgentPersonaRequest:
      properties:
        description:
          description: A description of the brand persona. The maximum is 1000 bytes.
          type: string
        image:
          description: The avatar image of the brand persona.
          type: string
        imageOptimizedFormat:
          description: |-
            `true` if the image is stored in the optimized image format; `false`
            otherwise.
          type: boolean
        name:
          description: >-
            The name of the brand persona. It must be unique within the project,

            ignoring case, and up to 200 bytes long. It can't contain the
            characters

            `\ / : * ? " < > | ¥`. Whitespace at the start and end is trimmed.
          type: string
        projectId:
          description: >-
            The unique identifier for the project to create the brand persona
            in.
          type: string
        speakingStyle:
          allOf:
            - $ref: '#/components/schemas/internal_agentpersonas.SpeakingStyle'
          description: >-
            The speaking style of the brand persona. It is either guided, with

            `completeness` and `formality`, or custom, with
            `customInstructions`,

            depending on `useCustomInstructions`.
        voiceConfig:
          allOf:
            - $ref: '#/components/schemas/internal_agentpersonas.VoiceConfig'
          description: >-
            Deprecated. Use the `voice-config-defaults` built-in tool instance
            of the

            agent instead. The API still reads the `ttsLanguage` value as the

            language of the `<channel>` block of the prompt if the agent has no
            such

            instance or the instance leaves `ttsLanguage` empty.

            This field is required when you create a brand persona.
      required:
        - name
        - projectId
        - speakingStyle
        - voiceConfig
      type: object
    internal_agentpersonas.CreateAgentPersonaResponse:
      properties:
        createdAt:
          description: |-
            The time when the brand persona was created, as a Unix timestamp in
            seconds.
          type: integer
        createdBy:
          description: The unique identifier for the user who created the brand persona.
          example: 507f1f77bcf86cd799439011
          type: string
        description:
          description: A description of the brand persona.
          type: string
        id:
          description: The unique identifier for the brand persona.
          example: 507f1f77bcf86cd799439011
          type: string
        image:
          description: The avatar image of the brand persona.
          type: string
        imageOptimizedFormat:
          description: |-
            `true` if the image is stored in the optimized image format; `false`
            otherwise.
          type: boolean
        lastChangedAt:
          description: >-
            The time when the brand persona was last changed, as a Unix
            timestamp in

            seconds.
          type: integer
        lastChangedBy:
          description: >-
            The unique identifier for the user who last changed the brand
            persona.
          example: 507f1f77bcf86cd799439011
          type: string
        name:
          description: The name of the brand persona.
          type: string
        organisationId:
          description: >-
            The unique identifier for the organization that the brand persona
            belongs

            to.
          example: 507f1f77bcf86cd799439011
          type: string
        projectId:
          description: >-
            The unique identifier for the project that the brand persona belongs
            to.
          example: 507f1f77bcf86cd799439011
          type: string
        referenceId:
          description: >-
            The reference ID of the brand persona. The API generates it as a
            UUID when

            the brand persona is created. An agent refers to the brand persona
            by this

            value in `personaReferenceId`.
          type: string
        speakingStyle:
          allOf:
            - $ref: '#/components/schemas/internal_agentpersonas.SpeakingStyle'
          description: >-
            The speaking style of the brand persona. It is either guided, with

            `completeness` and `formality`, or custom, with
            `customInstructions`,

            depending on `useCustomInstructions`.
        voiceConfig:
          allOf:
            - $ref: '#/components/schemas/internal_agentpersonas.VoiceConfig'
          description: >-
            Deprecated. Use the `voice-config-defaults` built-in tool instance
            of the

            agent instead. The API still reads the `ttsLanguage` value as the

            language of the `<channel>` block of the prompt if the agent has no
            such

            instance or the instance leaves `ttsLanguage` empty.
      type: object
    github_com_cognigy_ai-agents-v2_internal_middleware.ProblemDetailBadRequest:
      properties:
        code:
          description: |-
            Code is a stable machine-readable reason, present on some 400s only
            (for example "reserved_tool_name").
          example: reserved_tool_name
          type: string
        detail:
          example: request body validation failed
          type: string
        errors:
          items:
            $ref: >-
              #/components/schemas/github_com_cognigy_ai-agents-v2_internal_middleware.FieldError
          type: array
        instance:
          example: /v1/{resource}
          type: string
        status:
          example: 400
          type: integer
        title:
          example: Bad Request
          type: string
        traceId:
          example: api--a4d2f126-bec4-4544-a049-7c0cf08524ed
          type: string
        type:
          example: about:blank
          type: string
      type: object
    github_com_cognigy_ai-agents-v2_internal_middleware.ProblemDetailForbidden:
      properties:
        detail:
          example: 'access denied: insufficient permissions'
          type: string
        instance:
          example: /v1/{resource}/{id}
          type: string
        status:
          example: 403
          type: integer
        title:
          example: Forbidden
          type: string
        traceId:
          example: api--a4d2f126-bec4-4544-a049-7c0cf08524ed
          type: string
        type:
          example: about:blank
          type: string
      type: object
    github_com_cognigy_ai-agents-v2_internal_middleware.ProblemDetailConflict:
      properties:
        detail:
          example: a resource with this identifier already exists
          type: string
        instance:
          example: /v1/{resource}
          type: string
        status:
          example: 409
          type: integer
        title:
          example: Conflict
          type: string
        traceId:
          example: api--a4d2f126-bec4-4544-a049-7c0cf08524ed
          type: string
        type:
          example: about:blank
          type: string
      type: object
    github_com_cognigy_ai-agents-v2_internal_middleware.ProblemDetailInternalError:
      properties:
        detail:
          example: internal server error
          type: string
        instance:
          example: /v1/{resource}
          type: string
        status:
          example: 500
          type: integer
        title:
          example: Internal Server Error
          type: string
        traceId:
          example: api--a4d2f126-bec4-4544-a049-7c0cf08524ed
          type: string
        type:
          example: about:blank
          type: string
      type: object
    internal_agentpersonas.SpeakingStyle:
      properties:
        completeness:
          description: |-
            The completeness level of the guided speaking style: `concise`,
            `balanced`, `detailed`, or `comprehensive`. Required if
            `useCustomInstructions` is `false`.
          type: string
        customInstructions:
          description: >-
            The custom instructions that describe the speaking style. Required
            if

            `useCustomInstructions` is `true`. The maximum is 1000 characters.
          type: string
        formality:
          description: >-
            The formality level of the guided speaking style: `casual`,
            `friendly`,

            `professional`, or `formal`. Required if `useCustomInstructions` is

            `false`.
          type: string
        useCustomInstructions:
          description: >-
            If set to `true`, the brand persona uses `customInstructions`
            instead of

            `completeness` and `formality`. The default is `false`.
          type: boolean
      type: object
    internal_agentpersonas.VoiceConfig:
      properties:
        ttsDisableCache:
          description: >-
            If set to `true`, the text-to-speech cache is disabled. The default
            is

            `false`.
          type: boolean
        ttsLabel:
          type: string
        ttsLanguage:
          description: The language of the text-to-speech voice.
          type: string
        ttsModel:
          description: The text-to-speech model.
          type: string
        ttsVendor:
          description: The text-to-speech vendor.
          type: string
        ttsVoice:
          description: The text-to-speech voice.
          type: string
      required:
        - ttsLabel
        - ttsModel
        - ttsVendor
        - ttsVoice
      type: object
    github_com_cognigy_ai-agents-v2_internal_middleware.FieldError:
      properties:
        field:
          type: string
        message:
          type: string
      type: object
  securitySchemes:
    ApiKey:
      description: '[Production] API key for production authentication'
      in: header
      name: X-API-Key
      type: apiKey

````