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

# Patch Brand Audience Persona



## OpenAPI

````yaml /openapi.json patch /api/v1/brands/{brand_id}/audience/personas/{persona_id}
openapi: 3.1.0
info:
  title: AITasker
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/brands/{brand_id}/audience/personas/{persona_id}:
    patch:
      tags:
        - Brand Audience
        - Brand Audience
      summary: Patch Brand Audience Persona
      operationId: >-
        patch_brand_audience_persona_api_v1_brands__brand_id__audience_personas__persona_id__patch
      parameters:
        - name: brand_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Brand Id
        - name: persona_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Persona Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PersonaPatch'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AudienceResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    PersonaPatch:
      properties:
        expected_revision:
          type: integer
          minimum: 1
          title: Expected Revision
        avatar_seed:
          anyOf:
            - type: string
              maxLength: 64
              minLength: 8
            - type: 'null'
          title: Avatar Seed
        persona_name:
          anyOf:
            - type: string
              maxLength: 120
              minLength: 1
            - type: 'null'
          title: Persona Name
        summary:
          anyOf:
            - type: string
              maxLength: 3000
              minLength: 1
            - type: 'null'
          title: Summary
        core_motivations:
          anyOf:
            - items:
                type: string
              type: array
              maxItems: 12
            - type: 'null'
          title: Core Motivations
        barriers_and_objections:
          anyOf:
            - items:
                type: string
              type: array
              maxItems: 12
            - type: 'null'
          title: Barriers And Objections
        what_convinces_them:
          anyOf:
            - items:
                type: string
              type: array
              maxItems: 12
            - type: 'null'
          title: What Convinces Them
        preferred_channels:
          anyOf:
            - items:
                type: string
              type: array
              maxItems: 12
            - type: 'null'
          title: Preferred Channels
      additionalProperties: false
      type: object
      required:
        - expected_revision
      title: PersonaPatch
    AudienceResponse:
      properties:
        brand_id:
          type: string
          format: uuid
          title: Brand Id
        subject_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Subject Id
        state:
          type: string
          enum:
            - not_started
            - researching
            - ready
            - partial
            - failed
          title: State
        revision:
          type: integer
          title: Revision
          default: 0
        business_model:
          anyOf:
            - type: string
              enum:
                - b2b
                - b2c
                - both
            - type: 'null'
          title: Business Model
        primary_surface:
          anyOf:
            - type: string
              enum:
                - ecommerce
                - lead_generation
                - mobile_app
                - store
                - awareness
                - marketplace
                - subscription
            - type: 'null'
          title: Primary Surface
        supporting_surfaces:
          items:
            type: string
            enum:
              - ecommerce
              - lead_generation
              - mobile_app
              - store
              - awareness
              - marketplace
              - subscription
          type: array
          title: Supporting Surfaces
        icp:
          anyOf:
            - $ref: '#/components/schemas/ICPDocument'
            - type: 'null'
        personas:
          items:
            $ref: '#/components/schemas/AudiencePersonaResponse'
          type: array
          title: Personas
        scenarios:
          items:
            $ref: '#/components/schemas/ScenarioDocument'
          type: array
          title: Scenarios
        confidence:
          anyOf:
            - type: number
            - type: 'null'
          title: Confidence
        source_count:
          type: integer
          minimum: 0
          title: Source Count
          default: 0
        website_sources:
          items:
            $ref: '#/components/schemas/AudienceWebsiteSourceResponse'
          type: array
          title: Website Sources
        latest_run:
          anyOf:
            - $ref: '#/components/schemas/AudienceRunResponse'
            - type: 'null'
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
      additionalProperties: false
      type: object
      required:
        - brand_id
        - state
      title: AudienceResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ICPDocument:
      properties:
        name:
          type: string
          maxLength: 120
          minLength: 1
          title: Name
        summary:
          type: string
          maxLength: 3000
          minLength: 1
          title: Summary
        ideal_fit_criteria:
          items:
            type: string
          type: array
          maxItems: 12
          title: Ideal Fit Criteria
        needs_and_jobs:
          items:
            type: string
          type: array
          maxItems: 12
          title: Needs And Jobs
        buying_triggers:
          items:
            type: string
          type: array
          maxItems: 12
          title: Buying Triggers
        desired_outcomes:
          items:
            type: string
          type: array
          maxItems: 12
          title: Desired Outcomes
        constraints_and_must_haves:
          items:
            type: string
          type: array
          maxItems: 12
          title: Constraints And Must Haves
        disqualifiers:
          items:
            type: string
          type: array
          maxItems: 12
          title: Disqualifiers
        buying_context:
          items:
            type: string
          type: array
          maxItems: 12
          title: Buying Context
        confidence:
          type: number
          maximum: 1
          minimum: 0
          title: Confidence
        status:
          type: string
          enum:
            - website_hypothesis
            - needs_review
            - user_validated
            - insufficient_evidence
          title: Status
          default: website_hypothesis
      additionalProperties: false
      type: object
      required:
        - name
        - summary
        - confidence
      title: ICPDocument
    AudiencePersonaResponse:
      properties:
        rank:
          type: integer
          maximum: 3
          minimum: 1
          title: Rank
        persona_name:
          type: string
          maxLength: 120
          minLength: 1
          title: Persona Name
        summary:
          type: string
          maxLength: 3000
          minLength: 1
          title: Summary
        core_motivations:
          items:
            type: string
          type: array
          maxItems: 12
          title: Core Motivations
        barriers_and_objections:
          items:
            type: string
          type: array
          maxItems: 12
          title: Barriers And Objections
        what_convinces_them:
          items:
            type: string
          type: array
          maxItems: 12
          title: What Convinces Them
        preferred_channels:
          items:
            type: string
          type: array
          maxItems: 12
          title: Preferred Channels
        confidence:
          type: number
          maximum: 1
          minimum: 0
          title: Confidence
        status:
          type: string
          enum:
            - website_hypothesis
            - needs_review
            - user_validated
            - insufficient_evidence
          title: Status
          default: website_hypothesis
        id:
          type: string
          format: uuid
          title: Id
        avatar_seed:
          type: string
          maxLength: 64
          minLength: 8
          title: Avatar Seed
        user_locked_fields:
          items:
            type: string
          type: array
          maxItems: 16
          title: User Locked Fields
        avatar:
          $ref: '#/components/schemas/AudienceAvatar'
      additionalProperties: false
      type: object
      required:
        - rank
        - persona_name
        - summary
        - confidence
        - id
        - avatar_seed
        - avatar
      title: AudiencePersonaResponse
    ScenarioDocument:
      properties:
        rank:
          type: integer
          maximum: 3
          minimum: 1
          title: Rank
        primary_persona_rank:
          anyOf:
            - type: integer
              maximum: 3
              minimum: 1
            - type: 'null'
          title: Primary Persona Rank
        scenario_name:
          type: string
          maxLength: 160
          minLength: 1
          title: Scenario Name
        scene:
          type: string
          maxLength: 3000
          minLength: 1
          title: Scene
        trigger:
          type: string
          maxLength: 2000
          minLength: 1
          title: Trigger
        pain_points_frustrations:
          items:
            type: string
          type: array
          maxItems: 12
          title: Pain Points Frustrations
        desired_outcome:
          type: string
          maxLength: 2000
          minLength: 1
          title: Desired Outcome
        emotion_state:
          type: string
          maxLength: 1000
          minLength: 1
          title: Emotion State
        current_alternatives:
          items:
            type: string
          type: array
          maxItems: 12
          title: Current Alternatives
        barrier:
          type: string
          maxLength: 2000
          minLength: 1
          title: Barrier
        confidence:
          type: number
          maximum: 1
          minimum: 0
          title: Confidence
        status:
          type: string
          enum:
            - website_hypothesis
            - needs_review
            - user_validated
            - insufficient_evidence
          title: Status
          default: website_hypothesis
        id:
          type: string
          format: uuid
          title: Id
        primary_persona_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Primary Persona Id
        user_locked_fields:
          items:
            type: string
          type: array
          maxItems: 16
          title: User Locked Fields
      additionalProperties: false
      type: object
      required:
        - rank
        - scenario_name
        - scene
        - trigger
        - desired_outcome
        - emotion_state
        - barrier
        - confidence
        - id
      title: ScenarioDocument
    AudienceWebsiteSourceResponse:
      properties:
        url:
          type: string
          maxLength: 2083
          minLength: 8
          pattern: ^https?://
          title: Url
        label:
          type: string
          maxLength: 200
          minLength: 1
          title: Label
        page_kind:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Page Kind
      additionalProperties: false
      type: object
      required:
        - url
        - label
      title: AudienceWebsiteSourceResponse
    AudienceRunResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        status:
          type: string
          enum:
            - queued
            - planning
            - crawling
            - synthesizing
            - completed
            - partial
            - failed
            - cancelled
          title: Status
        stage:
          type: string
          title: Stage
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
        queued_at:
          type: string
          format: date-time
          title: Queued At
        started_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Started At
        completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completed At
      additionalProperties: false
      type: object
      required:
        - id
        - status
        - stage
        - queued_at
      title: AudienceRunResponse
    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
    AudienceAvatar:
      properties:
        kind:
          type: string
          const: gradient_initials
          title: Kind
          default: gradient_initials
        seed:
          type: string
          title: Seed
        initials:
          type: string
          maxLength: 3
          minLength: 1
          title: Initials
      additionalProperties: false
      type: object
      required:
        - seed
        - initials
      title: AudienceAvatar
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````