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

# Update Brand

> Partially update a brand. Only fields included in the request body are modified. For competitors and personas, the provided list represents the full desired state: include an `id` to update an existing record, omit `id` to create a new one, and any existing records not in the list are archived.

If you submit a persona without an `id` and its `name` matches a previously archived persona on the same brand, the archived persona is reactivated (its `status` returns to `active` and its `description` is updated) instead of creating a duplicate. This avoids unique-name conflicts when reusing a name that was previously archived.



## OpenAPI

````yaml /api-reference/openapi.json patch /brands/{brand_id}
openapi: 3.1.0
info:
  title: Scrunch Data API
  version: 0.1.0
servers:
  - url: https://api.scrunchai.com/v1
security: []
paths:
  /brands/{brand_id}:
    patch:
      summary: Update Brand
      description: >-
        Partially update a brand. Only fields included in the request body are
        modified. For competitors and personas, the provided list represents the
        full desired state: include an `id` to update an existing record, omit
        `id` to create a new one, and any existing records not in the list are
        archived.


        If you submit a persona without an `id` and its `name` matches a
        previously archived persona on the same brand, the archived persona is
        reactivated (its `status` returns to `active` and its `description` is
        updated) instead of creating a duplicate. This avoids unique-name
        conflicts when reusing a name that was previously archived.
      operationId: patchBrand
      parameters:
        - name: brand_id
          in: path
          required: true
          schema:
            type: integer
            title: Brand Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/APIBrandPatchInput'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIBrandListing'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer:
            - configure
components:
  schemas:
    APIBrandPatchInput:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Brand display name.
        alternative_names:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Alternative Names
          description: Alternative names or aliases for the brand.
        website:
          anyOf:
            - type: string
            - type: 'null'
          title: Website
          description: Primary website URL.
        alternative_websites:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Alternative Websites
          description: Additional website URLs for the brand.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Short description of the brand.
        competitors:
          anyOf:
            - items:
                $ref: '#/components/schemas/APICompetitorPatchInput'
              type: array
            - type: 'null'
          title: Competitors
          description: >-
            Full desired list of competitors. Existing competitors not in this
            list are archived.
        personas:
          anyOf:
            - items:
                $ref: '#/components/schemas/APIPersonaPatchInput'
              type: array
            - type: 'null'
          title: Personas
          description: >-
            Full desired list of personas. Existing personas not in this list
            are archived.
        key_topics:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Key Topics
          description: Key topics associated with the brand.
        status:
          anyOf:
            - type: string
              enum:
                - lead
                - prospect
                - customer
            - type: 'null'
          title: Status
          description: 'Brand status. Allowed values: lead, customer.'
        case_sensitive:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Case Sensitive
          default: null
          description: >-
            When true, the brand name and alternative_names are matched against
            AI responses with exact case. When false, matching is
            case-insensitive.
      additionalProperties: true
      type: object
      title: APIBrandPatchInput
      description: >-
        Partial update payload for a brand.


        Only fields present in the request body are updated. Omitted fields are
        left unchanged.

        For competitors and personas, the provided list replaces the current
        state:

        existing records not included in the list are archived.


        When you submit a persona without an `id` and its `name` matches a
        previously archived persona on the same brand, the archived persona is
        reactivated (its `status` returns to `active` and its `description` is
        updated) rather than creating a duplicate.
    APIBrandListing:
      properties:
        id:
          type: integer
          title: Id
        name:
          type: string
          title: Name
        description:
          type: string
          title: Description
        website:
          type: string
          title: Website
        status:
          type: string
          title: Status
        alternative_names:
          items:
            type: string
          type: array
          title: Alternative Names
          description: Alternative names or aliases for the brand.
          default: []
        alternative_websites:
          items:
            type: string
          type: array
          title: Alternative Websites
          default: []
        competitors:
          items:
            $ref: '#/components/schemas/APICompetitorListing'
          type: array
          title: Competitors
          default: []
        personas:
          items:
            $ref: '#/components/schemas/APIPersonaListing'
          type: array
          title: Personas
          default: []
        key_topics:
          items:
            type: string
          type: array
          title: Key Topics
          default: []
        case_sensitive:
          type: boolean
          title: Case Sensitive
          default: false
      type: object
      required:
        - id
        - name
        - description
        - website
        - status
      title: APIBrandListing
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    APICompetitorPatchInput:
      properties:
        id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Id
          description: >-
            ID of an existing competitor to update. Omit to create a new
            competitor.
        name:
          type: string
          minLength: 1
          title: Name
          description: Display name of the competitor.
        alternative_names:
          items:
            type: string
          type: array
          title: Alternative Names
          description: Alternative names or aliases for the competitor.
          default: []
        websites:
          items:
            type: string
            maxLength: 2083
            minLength: 1
            format: uri
          type: array
          title: Websites
          description: Website URLs associated with the competitor.
          default: []
        case_sensitive:
          type: boolean
          title: Case Sensitive
          default: false
          description: >-
            When true, name and alternative_names are matched against AI
            responses with exact case. Defaults to case-insensitive matching.
      type: object
      required:
        - name
      title: APICompetitorPatchInput
      description: A competitor to create or update within a brand patch request.
    APIPersonaPatchInput:
      properties:
        id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Id
          description: ID of an existing persona to update. Omit to create a new persona.
        name:
          type: string
          title: Name
          description: Display name of the persona.
        description:
          type: string
          title: Description
          description: Description of the persona.
      type: object
      required:
        - name
        - description
      title: APIPersonaPatchInput
      description: A persona to create or update within a brand patch request.
    APICompetitorListing:
      properties:
        id:
          type: integer
          title: Id
        name:
          type: string
          title: Name
        alternative_names:
          items:
            type: string
          type: array
          title: Alternative Names
          default: []
        websites:
          items:
            type: string
          type: array
          title: Websites
          default: []
        case_sensitive:
          type: boolean
          title: Case Sensitive
          default: false
      type: object
      required:
        - id
        - name
      title: APICompetitorListing
    APIPersonaListing:
      properties:
        id:
          type: integer
          title: Id
        name:
          type: string
          title: Name
        description:
          type: string
          title: Description
      type: object
      required:
        - id
        - name
        - description
      title: APIPersonaListing
    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
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````