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

# Update Persona

> Update a persona and recompile the system prompt.



## OpenAPI

````yaml /api-reference/openapi.json patch /api/v1/personas/{persona_id}
openapi: 3.1.0
info:
  title: wazzapi Public API
  description: >-
    Public API surface for external API-key clients. Only stable /api/v1
    endpoints are included.


    ## Webhook deliveries

    This reference also includes the webhook requests Wazzapi sends to your
    endpoint for incoming messages, message status updates, and device status
    changes. See the `Incoming webhooks` section in the sidebar for headers,
    payload fields, and concrete examples.
  version: 1.0.0
servers: []
security: []
tags:
  - name: Incoming webhooks
    description: >-
      POST deliveries that Wazzapi sends to your webhook endpoint after you
      subscribe to supported events. Verify the signature against the raw body
      and return a 2xx response quickly.
paths:
  /api/v1/personas/{persona_id}:
    patch:
      tags:
        - personas
      summary: Update Persona
      description: Update a persona and recompile the system prompt.
      operationId: update_persona_api_v1_personas__persona_id__patch
      parameters:
        - name: persona_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Persona Id
        - name: Authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PersonaUpdateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PersonaResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    PersonaUpdateRequest:
      properties:
        name:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Name
        role:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Role
        goals:
          anyOf:
            - type: string
            - type: 'null'
          title: Goals
        tone:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Tone
        language:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Language
        language_secondary:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Language Secondary
        product_context:
          anyOf:
            - type: string
            - type: 'null'
          title: Product Context
        boundaries:
          anyOf:
            - type: string
            - type: 'null'
          title: Boundaries
        faqs:
          anyOf:
            - items:
                $ref: '#/components/schemas/FaqItem'
              type: array
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Faqs
        example_dialogs:
          anyOf:
            - items:
                $ref: '#/components/schemas/DialogTurn'
              type: array
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Example Dialogs
        system_prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: System Prompt
        override_system_prompt:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Override System Prompt
      type: object
      title: PersonaUpdateRequest
      description: Partial update of a persona.
    PersonaResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        organization_id:
          type: string
          format: uuid
          title: Organization Id
        name:
          type: string
          title: Name
        role:
          anyOf:
            - type: string
            - type: 'null'
          title: Role
        goals:
          anyOf:
            - type: string
            - type: 'null'
          title: Goals
        tone:
          anyOf:
            - type: string
            - type: 'null'
          title: Tone
        language:
          anyOf:
            - type: string
            - type: 'null'
          title: Language
        language_secondary:
          anyOf:
            - type: string
            - type: 'null'
          title: Language Secondary
        product_context:
          anyOf:
            - type: string
            - type: 'null'
          title: Product Context
        boundaries:
          anyOf:
            - type: string
            - type: 'null'
          title: Boundaries
        faqs:
          anyOf:
            - items: {}
              type: array
            - type: 'null'
          title: Faqs
        example_dialogs:
          anyOf:
            - items: {}
              type: array
            - type: 'null'
          title: Example Dialogs
        system_prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: System Prompt
        override_system_prompt:
          type: boolean
          title: Override System Prompt
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - organization_id
        - name
        - role
        - goals
        - tone
        - language
        - language_secondary
        - product_context
        - boundaries
        - faqs
        - example_dialogs
        - system_prompt
        - override_system_prompt
        - created_at
        - updated_at
      title: PersonaResponse
      description: Persona detail/list item.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    FaqItem:
      properties:
        question:
          type: string
          maxLength: 2000
          minLength: 1
          title: Question
        answer:
          type: string
          maxLength: 4000
          minLength: 1
          title: Answer
      type: object
      required:
        - question
        - answer
      title: FaqItem
      description: A single FAQ Q/A pair.
    DialogTurn:
      properties:
        role:
          type: string
          maxLength: 32
          minLength: 1
          title: Role
        content:
          type: string
          maxLength: 4000
          minLength: 1
          title: Content
      type: object
      required:
        - role
        - content
      title: DialogTurn
      description: A few-shot dialog turn.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````