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

# Update Brand Fact

> Updates one brand fact's text, source URL, or confidence. Only provided fields change; pass source_url: "" to clear the stored source. Editing text re-embeds the fact for semantic search; a 409 is returned when the new text collides with a sibling fact captured from the same AI response (duplicates across other facts are not rejected here and are left to Knowledge Base dedup). Review status never changes through this endpoint. Requires a website-admin API key. Also available as the MCP tool `update_brand_fact`.



## OpenAPI

````yaml /api-reference/openapi.json patch /api/v1/knowledge-base/facts/{fact_id}
openapi: 3.1.0
info:
  title: AthenaHQ API
  description: >-
    AthenaHQ API provides programmatic access to manage your websites and
    prompts for AI-powered content optimization.
  version: 1.0.0
  contact:
    email: support@athenahq.ai
servers:
  - url: https://api.athenahq.ai
    description: Production server
security:
  - apiKey: []
tags:
  - name: Basics
    description: Core API operations for managing websites and prompts
  - name: Metrics
    description: Metrics and analytics endpoints for tracking AI visibility
  - name: Billing
    description: Billing and credits endpoints for managing usage
  - name: Team Management
    description: Endpoints for managing team members and invitations
  - name: Groups
    description: Endpoints for managing groups of websites
  - name: Content
    description: >-
      Endpoints for accessing Content Hub data — tabs, tracked URLs, and per-URL
      prompt breakdowns.
  - name: Pitch Workspace
    description: >-
      Endpoints for accessing pitch workspace reports — org-scoped pitch runs
      with competitors, prompts, attributes, and aggregate metrics.
  - name: Knowledge Base
    description: >-
      Endpoints for reading the brand Knowledge Base — approved brand facts and
      the pillars that organize them.
paths:
  /api/v1/knowledge-base/facts/{fact_id}:
    patch:
      tags:
        - Knowledge Base
      summary: Update Brand Fact
      description: >-
        Updates one brand fact's text, source URL, or confidence. Only provided
        fields change; pass source_url: "" to clear the stored source. Editing
        text re-embeds the fact for semantic search; a 409 is returned when the
        new text collides with a sibling fact captured from the same AI response
        (duplicates across other facts are not rejected here and are left to
        Knowledge Base dedup). Review status never changes through this
        endpoint. Requires a website-admin API key. Also available as the MCP
        tool `update_brand_fact`.
      operationId: updateBrandFact
      parameters:
        - name: fact_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: The fact to update.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                website_id:
                  type: string
                  format: uuid
                  description: The website the fact belongs to.
                text:
                  type: string
                  minLength: 1
                  maxLength: 10000
                  description: >-
                    New fact statement. Caps at 10000 characters, matching the
                    in-app edit dialog (add_brand_facts caps new facts at 2000).
                source_url:
                  type: string
                  maxLength: 2048
                  description: >-
                    New source URL. An empty string clears the stored source
                    URL.
                confidence:
                  type: string
                  enum:
                    - high
                    - medium
                    - low
                  description: New confidence level.
              required:
                - website_id
      responses:
        '200':
          description: The updated fact plus a pre-update snapshot of the editable fields
          content:
            application/json:
              schema:
                type: object
                properties:
                  fact:
                    $ref: '#/components/schemas/BrandFact'
                  before:
                    type: object
                    description: Values of the editable fields before this update.
                    properties:
                      text:
                        type: string
                      source_url:
                        type:
                          - string
                          - 'null'
                      confidence:
                        type:
                          - string
                          - 'null'
                        enum:
                          - high
                          - medium
                          - low
                          - null
                    required:
                      - text
                      - source_url
                      - confidence
                required:
                  - fact
                  - before
        '400':
          description: Bad request - Invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                missing_website_id:
                  value:
                    error: website_id is required
                blank_text:
                  value:
                    error: text must not be blank
                unsafe_source_url:
                  value:
                    error: source_url is not a valid URL
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            Forbidden - No admin access to this website, or the Knowledge Base
            is not enabled for the organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                unauthorized_website:
                  value:
                    error: Unauthorized access to this website
                kb_not_enabled:
                  value:
                    error: Knowledge Base is not enabled for this organization
        '404':
          description: Not found - No fact with this id on the website
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                fact_not_found:
                  value:
                    error: Fact not found
        '409':
          description: >-
            Conflict - The new text matches a sibling fact captured from the
            same AI response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                identical_fact:
                  value:
                    error: An identical fact already exists
      security:
        - apiKey: []
components:
  schemas:
    BrandFact:
      type: object
      properties:
        id:
          type: string
          format: uuid
        text:
          type: string
          description: The fact statement.
        status:
          type: string
          enum:
            - approved
            - pending
            - rejected
          description: Review status of the fact.
        confidence:
          type:
            - string
            - 'null'
          enum:
            - high
            - medium
            - low
            - null
          description: Confidence level assigned during ingestion, or null when unrated.
        source_url:
          type:
            - string
            - 'null'
          description: URL the fact was extracted from, stored without protocol.
        source_quote:
          type:
            - string
            - 'null'
          description: Verbatim quote from the source backing the fact.
        source_type:
          type: string
          enum:
            - research
            - response
            - upload
            - content_hub
          description: How the fact entered the Knowledge Base.
        pillar:
          $ref: '#/components/schemas/BrandFactPillar'
        created_at:
          type: string
          description: ISO 8601 timestamp of when the fact was added.
      required:
        - id
        - text
        - status
        - confidence
        - source_url
        - source_quote
        - source_type
        - pillar
        - created_at
    Error:
      type: object
      description: Error response object
      required:
        - error
      properties:
        error:
          type: string
          description: Error message describing what went wrong
          example: Unauthorized
    BrandFactPillar:
      type:
        - object
        - 'null'
      description: >-
        The published pillar the fact is filed under, or null when the fact is
        unfiled.
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
      required:
        - id
        - name
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. You can create one
        [here](https://app.athenahq.ai/organization?tab=api).

````