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

# Update a hub's name, websites, or notes

> Renames the hub and/or merges websites and notes into it, then rebuilds it in the background (202). Websites merge by URL — a URL the hub already has is re-crawled, a new one is added — and notes merge by `filename`, so sending a known filename edits that note in place and keeps its attachment. Nothing is ever removed: there is no public way to drop a website or a note. The hub flips to `status` `processing` immediately; the `websites` and `notes` in this response are still the PRE-merge values, so poll `GET /business/knowledge-hubs/{hubId}` until `status` is `complete` to see the merged hub. A hub that is already processing a build, update or refresh answers 409 `KNOWLEDGE_HUB_NOT_READY`.

Errors:
- `404` `KNOWLEDGE_HUB_NOT_FOUND` — No hub with that id, it was deleted, or it belongs to another team.
- `409` `KNOWLEDGE_HUB_NOT_READY` — The hub is already processing a build, update or refresh — wait for status complete.
- `422` `VALIDATION_FAILED` — Nothing to update, a value outside its limits, or a website URL the crawler cannot parse.
- `500` `UNEXPECTED_ERROR` — The update workflow could not be enqueued; the hub may be left processing — retry.
- `429` `RATE_LIMITED` — More than 30 knowledge-hub/campaign requests in a minute (or 1000 in a day). Knowledge hubs share the campaigns bucket.

Requires one of the following token scopes: campaigns.



## OpenAPI

````yaml /openapi.json patch /business/knowledge-hubs/{hubId}
openapi: 3.1.0
info:
  title: Fuse Business API
  version: 1.0.0
  description: >-
    External API for lists, campaigns, prospect search and contacts.
    Authenticate with your API token as HTTP Basic. All paths are under /api/v1.
servers:
  - url: https://api.tryfuse.ai/api/v1
    description: Production
security:
  - basicAuth: []
tags:
  - name: Lists
  - name: Custom columns
  - name: Smart columns
  - name: Exports
  - name: Campaigns
  - name: Knowledge hubs
  - name: Analytics
  - name: Website intent
  - name: Account
  - name: Prospect search
  - name: Campaign steps
  - name: Scheduled sends
  - name: Campaign templates
  - name: Agents
  - name: Research
  - name: Company search
  - name: Saved searches
  - name: Folders
  - name: Contacts
paths:
  /business/knowledge-hubs/{hubId}:
    patch:
      tags:
        - Knowledge hubs
      summary: Update a hub's name, websites, or notes
      description: >-
        Renames the hub and/or merges websites and notes into it, then rebuilds
        it in the background (202). Websites merge by URL — a URL the hub
        already has is re-crawled, a new one is added — and notes merge by
        `filename`, so sending a known filename edits that note in place and
        keeps its attachment. Nothing is ever removed: there is no public way to
        drop a website or a note. The hub flips to `status` `processing`
        immediately; the `websites` and `notes` in this response are still the
        PRE-merge values, so poll `GET /business/knowledge-hubs/{hubId}` until
        `status` is `complete` to see the merged hub. A hub that is already
        processing a build, update or refresh answers 409
        `KNOWLEDGE_HUB_NOT_READY`.


        Errors:

        - `404` `KNOWLEDGE_HUB_NOT_FOUND` — No hub with that id, it was deleted,
        or it belongs to another team.

        - `409` `KNOWLEDGE_HUB_NOT_READY` — The hub is already processing a
        build, update or refresh — wait for status complete.

        - `422` `VALIDATION_FAILED` — Nothing to update, a value outside its
        limits, or a website URL the crawler cannot parse.

        - `500` `UNEXPECTED_ERROR` — The update workflow could not be enqueued;
        the hub may be left processing — retry.

        - `429` `RATE_LIMITED` — More than 30 knowledge-hub/campaign requests in
        a minute (or 1000 in a day). Knowledge hubs share the campaigns bucket.


        Requires one of the following token scopes: campaigns.
      operationId: updateKnowledgeHub
      parameters:
        - name: hubId
          in: path
          required: true
          description: >-
            24-character hex id of the knowledge hub (from GET
            /business/knowledge-hubs).
          schema:
            type: string
            description: >-
              24-character hex id of the knowledge hub (from GET
              /business/knowledge-hubs).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 100
                  description: New hub name (1-100 characters).
                websites:
                  type: array
                  items:
                    type: object
                    properties:
                      url:
                        type: string
                        minLength: 4
                        maxLength: 2048
                        description: >-
                          Website to crawl (4-2048 characters), with or without
                          the scheme, e.g. brightpay.com or
                          https://brightpay.com/pricing; an unparseable URL
                          answers 422 VALIDATION_FAILED.
                      includeSubPages:
                        type: boolean
                        default: false
                        description: >-
                          Also crawl the site's subpages (up to 100 per crawl; a
                          re-crawl skips subpages the hub already stores and
                          keeps only the newly found ones); default false.
                      isCompetitor:
                        type: boolean
                        default: false
                        description: >-
                          Treat the site as a competitor: its content feeds
                          competitor pages instead of the company's own profile;
                          default false.
                    required:
                      - url
                    description: One website the hub is built from.
                  minItems: 1
                  maxItems: 20
                  description: >-
                    Websites to add or re-crawl: at least 1, at most 20 per
                    call, and the 20 caps the call, not the hub. Accepted values
                    for each entry's url: any http(s) web address, with or
                    without the scheme. Merged into the hub's existing websites
                    — on a hub built through this API a known URL is matched
                    ignoring scheme, www., a trailing slash and case — and a
                    match is re-crawled while an unknown URL is added; nothing
                    is ever removed. A matched entry is REPLACED by what you
                    send, so omitting includeSubPages or isCompetitor resets
                    that flag to false. Re-crawling runs in the background after
                    the 202, so a site that cannot be fetched is not reported as
                    an error: its entry simply keeps the lastCrawledAt it
                    already had.
                notes:
                  type: array
                  items:
                    type: object
                    properties:
                      text:
                        type: string
                        minLength: 1
                        maxLength: 60000
                        description: >-
                          Free-text knowledge to include (1-60,000 characters),
                          e.g. positioning, objection handling, internal docs.
                      isCompetitor:
                        type: boolean
                        default: false
                        description: >-
                          Treat the note as competitor material rather than the
                          company's own; default false.
                      filename:
                        type: string
                        minLength: 1
                        maxLength: 255
                        description: >-
                          Label the note is cited by, and the key it is merged
                          on (1-255 characters). Required here because notes are
                          merged by filename: a matching note is updated in
                          place (its attachment is kept), an unknown filename
                          adds a note. Free text, but to update an existing note
                          it must equal one of the values from GET
                          /business/knowledge-hubs/{hubId} (notes[].filename)
                          exactly — the match is case-sensitive and literal, so
                          a near-miss silently adds a second note instead of
                          updating the one you meant. It is a label only: no
                          file extension is needed, and it is unrelated to an
                          attachment's own filename.
                    required:
                      - text
                      - filename
                    description: >-
                      One free-text note; attach a document to it afterwards via
                      POST /business/knowledge-hubs/{hubId}/attachments.
                  minItems: 1
                  maxItems: 50
                  description: >-
                    Notes to add or update: at least 1, at most 50 per call.
                    Each note's text carries the free-text knowledge itself;
                    filename is only its label. Merged into the hub's existing
                    notes by exact filename: a match keeps its id and its
                    attachment but has its text and isCompetitor overwritten by
                    exactly what you send, so omitting isCompetitor resets that
                    flag to false and a competitor note silently becomes company
                    material; an unknown filename adds a note, and nothing is
                    removed. Two entries with the same filename in one call
                    collapse into one — the last wins, with no error.
              description: At least one of name, websites or notes is required.
      responses:
        '202':
          description: Success
          headers:
            RateLimit-Limit:
              schema:
                type: integer
              description: Requests permitted in the current window.
            RateLimit-Remaining:
              schema:
                type: integer
              description: Requests remaining in the current window.
            RateLimit-Reset:
              schema:
                type: integer
              description: Seconds until the current window resets.
          content:
            application/json:
              schema:
                type: object
                required:
                  - knowledgeHub
                properties:
                  knowledgeHub:
                    type: object
                    required:
                      - id
                      - name
                      - companyName
                      - status
                      - isDefault
                      - websites
                      - notes
                      - createdAt
                      - updatedAt
                    properties:
                      id:
                        type:
                          - string
                          - 'null'
                      name:
                        type:
                          - string
                          - 'null'
                        description: >-
                          The new name if one was sent, otherwise the hub's
                          current name.
                      companyName:
                        type:
                          - string
                          - 'null'
                        description: >-
                          Company name from the last completed build; null until
                          a build has finished.
                      status:
                        type:
                          - string
                          - 'null'
                        enum:
                          - processing
                          - complete
                          - draft
                          - null
                        description: >-
                          processing = the crawl and page synthesis are running,
                          complete = the hub is usable, draft = the hub is not
                          built — either it was saved as a draft in the web app
                          and never built, or its last build exhausted its
                          retries.
                      isDefault:
                        type: boolean
                      websites:
                        type: array
                        items:
                          type: object
                          required:
                            - url
                            - includeSubPages
                            - isCompetitor
                            - parentUrl
                            - lastCrawledAt
                          properties:
                            url:
                              type:
                                - string
                                - 'null'
                            includeSubPages:
                              type: boolean
                              description: >-
                                Whether the site's subpages were expanded when
                                it was added.
                            isCompetitor:
                              type: boolean
                            parentUrl:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Set on subpages the crawler discovered: the
                                website they were collected from. null on a
                                website you added yourself.
                            lastCrawledAt:
                              type:
                                - string
                                - 'null'
                              format: date-time
                              description: >-
                                When this URL was last successfully crawled;
                                null if it has never been crawled.
                        description: >-
                          The websites you added plus the subpages the crawler
                          discovered from them (subpages carry parentUrl).
                      notes:
                        type: array
                        items:
                          type: object
                          required:
                            - id
                            - text
                            - filename
                            - isCompetitor
                            - hasAttachment
                          properties:
                            id:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Note id; the attachment endpoints address notes
                                by it.
                            text:
                              type:
                                - string
                                - 'null'
                            filename:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Label the note is cited by, and the key notes
                                are merged on when the hub is updated.
                            isCompetitor:
                              type: boolean
                            hasAttachment:
                              type: boolean
                              description: >-
                                Whether the note carries a downloadable
                                document.
                      createdAt:
                        type:
                          - string
                          - 'null'
                        format: date-time
                      updatedAt:
                        type:
                          - string
                          - 'null'
                        format: date-time
              example:
                knowledgeHub:
                  id: 68a1f8509c41d20014b3ee41
                  name: Brightpay KB
                  companyName: Brightpay
                  status: processing
                  isDefault: true
                  websites:
                    - url: https://brightpay.com
                      includeSubPages: true
                      isCompetitor: false
                      parentUrl: null
                      lastCrawledAt: '2026-08-09T04:01:13.461Z'
                  notes:
                    - id: 68a1f8509c41d20014b3ee55
                      text: We sell payroll software to UK accountants.
                      filename: positioning.md
                      isCompetitor: false
                      hasAttachment: true
                  createdAt: '2026-06-01T12:00:00.000Z'
                  updatedAt: '2026-08-25T12:04:11.221Z'
        '400':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - basicAuth: []
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            param:
              type:
                - string
                - 'null'
            doc_url:
              type:
                - string
                - 'null'
            request_id:
              type:
                - string
                - 'null'
          required:
            - code
            - message
      required:
        - error
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >-
        Your API token (`af_…`) as the Basic-auth username, with an empty
        password.

````