> ## 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.

# Create a knowledge hub from websites

> Creates the hub immediately with `status` `processing` and enqueues the build: every website is crawled (subpages too where `includeSubPages` is true), the content is synthesized into knowledge pages, and a company name — and, when `name` was omitted, the hub name — are generated. Poll `GET /business/knowledge-hubs/{hubId}` until `status` is `complete`; `draft` means the build did not finish — it exhausted its retries (hubs saved as drafts in the web app carry the same status without ever having been built). Until the build finishes a hub created without a name carries the placeholder "Processing...", and `websites` lists only what you sent — the crawler's subpages appear later. Building does not debit credits. Inline file attachments are not accepted here: add them per note via `POST /business/knowledge-hubs/{hubId}/attachments` once the hub is `complete`. `isDefault: true` makes this the default hub and clears the flag on the previous one.

Errors:
- `422` `VALIDATION_FAILED` — The body failed validation locally, or a website URL the crawler cannot parse was rejected by the builder.
- `500` `UNEXPECTED_ERROR` — The build workflow could not be enqueued (upstream STATE_MACHINE_ERROR); no hub was created — 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 post /business/knowledge-hubs
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:
    post:
      tags:
        - Knowledge hubs
      summary: Create a knowledge hub from websites
      description: >-
        Creates the hub immediately with `status` `processing` and enqueues the
        build: every website is crawled (subpages too where `includeSubPages` is
        true), the content is synthesized into knowledge pages, and a company
        name — and, when `name` was omitted, the hub name — are generated. Poll
        `GET /business/knowledge-hubs/{hubId}` until `status` is `complete`;
        `draft` means the build did not finish — it exhausted its retries (hubs
        saved as drafts in the web app carry the same status without ever having
        been built). Until the build finishes a hub created without a name
        carries the placeholder "Processing...", and `websites` lists only what
        you sent — the crawler's subpages appear later. Building does not debit
        credits. Inline file attachments are not accepted here: add them per
        note via `POST /business/knowledge-hubs/{hubId}/attachments` once the
        hub is `complete`. `isDefault: true` makes this the default hub and
        clears the flag on the previous one.


        Errors:

        - `422` `VALIDATION_FAILED` — The body failed validation locally, or a
        website URL the crawler cannot parse was rejected by the builder.

        - `500` `UNEXPECTED_ERROR` — The build workflow could not be enqueued
        (upstream STATE_MACHINE_ERROR); no hub was created — 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: createKnowledgeHub
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 100
                  description: >-
                    Hub name (1-100 characters); omit to have one generated from
                    the crawled content once the build finishes.
                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 the hub is built from: at least 1, at most 20.
                    Accepted values for each entry's url: any http(s) web
                    address, with or without the scheme (brightpay.com,
                    https://brightpay.com/pricing). Every entry is crawled and
                    all of the collected text is pooled into ONE set of
                    knowledge pages — entries are not kept apart, and a page
                    reached from two entries is used once. The crawl runs in the
                    background after the 202, so a site that cannot be fetched
                    is never reported as an error: its entry stays on the hub
                    with lastCrawledAt null and contributes nothing. Read the
                    hub back to check.
                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.
                      filename:
                        type: string
                        minLength: 1
                        maxLength: 255
                        description: >-
                          Label the note is cited by in generated pages, and the
                          key a later PATCH merges this note on (1-255
                          characters). Free text; omit it and the note is filed
                          under the literal "Internal Document". Give every note
                          a distinct value: notes that share one (two notes
                          without a filename share the default) are all stored,
                          but only the first is read when the hub's pages are
                          generated — the rest contribute nothing and no error
                          is returned.
                      isCompetitor:
                        type: boolean
                        default: false
                        description: >-
                          Treat the note as competitor material rather than the
                          company's own; default false.
                    required:
                      - text
                    description: >-
                      One free-text note; attach a document to it afterwards via
                      POST /business/knowledge-hubs/{hubId}/attachments.
                  maxItems: 50
                  description: >-
                    Free-text notes to include as sources (up to 50). Inline
                    file uploads are not accepted here.
                isDefault:
                  type: boolean
                  default: false
                  description: >-
                    Make this hub the default one used when a campaign does not
                    name a hub; the previous default is unset. Default false.
              required:
                - websites
      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 name you sent, or the placeholder "Processing..."
                          until the build generates one.
                      companyName:
                        type:
                          - string
                          - 'null'
                        description: Always null on creation; filled in by the build.
                      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: >-
                                Always false on creation — attach documents once
                                the hub exists.
                      createdAt:
                        type:
                          - string
                          - 'null'
                        format: date-time
                      updatedAt:
                        type:
                          - string
                          - 'null'
                        format: date-time
              example:
                knowledgeHub:
                  id: 68a1f8509c41d20014b3ee41
                  name: Brightpay KB
                  companyName: null
                  status: processing
                  isDefault: false
                  websites:
                    - url: https://brightpay.com
                      includeSubPages: true
                      isCompetitor: false
                      parentUrl: null
                      lastCrawledAt: null
                  notes:
                    - id: 68a1f8509c41d20014b3ee55
                      text: We sell payroll software to UK accountants.
                      filename: positioning.md
                      isCompetitor: false
                      hasAttachment: false
                  createdAt: '2026-08-20T09:15:00.000Z'
                  updatedAt: '2026-08-20T09:15:00.000Z'
        '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.

````