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

# Create or update a content source

> Send configId to change an existing source, or omit it to create one — a configId that matches no source of this knowledge base is refused, never created under the id you sent. Every field is optional and an omitted one keeps what is stored. maxAgeMs is the exception worth reading: omit it to keep the current freshness window, send null to restore the crawler's default, send a number of milliseconds to apply it — 0 forces a full re-crawl on the next run.



## OpenAPI

````yaml /api-reference/specs/claudia/v1.json patch /v1/knowledge-bases/{kbId}/scraper-config
openapi: 3.0.1
info:
  title: Claudia API
  version: 1.0.0
servers:
  - url: https://api.cloudhumans.com/claudia
    description: Production
  - url: https://api.cloudhumans.com/claudia/staging
    description: Staging
security:
  - bearerAuth: []
tags:
  - name: MCP Servers
    description: >-
      The MCP servers your agents can call tools on. Registering one here is
      what makes its tools selectable in an agent; the credentials it needs are
      stored encrypted and never read back.
  - name: Knowledge Base Content
    description: Read, search and edit the content that answers your customers.
  - name: Content Quality
    description: Rewrites proposed for content that is answering your customers badly.
  - name: Playground
    description: >-
      Talk to one of your agents as if you were a customer, without touching a
      real conversation.
  - name: Project Settings
    description: >-
      Read and change how a ClaudIA project behaves — the settings screens of
      the ClaudIA app, as an API.
  - name: Content Improvements
    description: Answers Claudia proposes for questions your content does not cover yet.
  - name: Knowledge Bases
    description: The knowledge bases your account can manage.
  - name: Content Sources
    description: The sites Claudia crawls to keep a knowledge base in sync.
paths:
  /v1/knowledge-bases/{kbId}/scraper-config:
    patch:
      tags:
        - Content Sources
      summary: Create or update a content source
      description: >-
        Send configId to change an existing source, or omit it to create one — a
        configId that matches no source of this knowledge base is refused, never
        created under the id you sent. Every field is optional and an omitted
        one keeps what is stored. maxAgeMs is the exception worth reading: omit
        it to keep the current freshness window, send null to restore the
        crawler's default, send a number of milliseconds to apply it — 0 forces
        a full re-crawl on the next run.
      operationId: upsertContentSource
      parameters:
        - name: kbId
          in: path
          description: Knowledge base to operate on. Get the ids from listMyKnowledgeBases.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContentSourceUpsert'
        required: true
      responses:
        '200':
          description: Every source of this knowledge base, as stored after the change.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ContentSource'
        '400':
          description: The request could not be answered as written.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing, expired or invalid credentials.
        '403':
          description: The credentials hold no account allowed to manage this content.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >-
            No such resource, or none these credentials can reach — the two are
            deliberately indistinguishable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit applied by the API gateway. Back off and retry.
components:
  schemas:
    ContentSourceUpsert:
      type: object
      properties:
        configId:
          type: string
          description: >-
            Source to change, as returned by listContentSources. Omit to create
            a new one — the id is assigned then and comes back in the response.
          example: 6683f1c2a4b19e0012ab34cd
        enabled:
          type: boolean
          description: >-
            A disabled source stays configured but is not crawled. Defaults to
            true on a new source.
          example: true
        startUrl:
          type: string
          description: Where the crawl starts.
          example: https://ajuda.acme.com
        cron:
          type: string
          description: >-
            When the crawl runs, as a cron expression. Leave empty to run it
            only on demand.
          example: 0 0 3 * * *
        allowedDomains:
          type: string
          description: Hosts the crawl may follow links into. Comma-separated.
          example: ajuda.acme.com
        pathFilter:
          type: string
          description: Only crawl paths matching this. Leave empty for the whole site.
          example: /artigos
        excludePathFilter:
          type: string
          description: Paths to never crawl, even when they match pathFilter.
          example: /artigos/rascunhos
        defaultScraperTag:
          type: string
          description: Tag to apply to every entry this source imports.
          example: ajuda
        defaultScraperTopic:
          type: string
          description: Topic to group every entry this source imports under.
          example: Autoatendimento
        type:
          type: string
          description: >-
            Crawler to run this source on. Defaults to FIRECRAWL on a new
            source.
          enum:
            - SCRAPY
            - FIRECRAWL
            - CLOUDCHAT
        maxAgeMs:
          type: integer
          description: >-
            How old a previously fetched page may be before it is fetched again,
            in milliseconds. Omit to keep the current setting, send null to
            restore the crawler's default, send 0 to force a full re-crawl.
          format: int64
          nullable: true
          example: 86400000
        locales:
          type: array
          description: Languages to keep when the site publishes several.
          example:
            - pt-BR
          items:
            type: string
            description: Languages to keep when the site publishes several.
            example: '["pt-BR"]'
      description: What to change on a content source, or the source to create.
    ContentSource:
      required:
        - allowedDomains
        - createdAt
        - cron
        - defaultScraperTag
        - excludePathFilter
        - pathFilter
        - startUrl
        - type
      type: object
      properties:
        configId:
          type: string
          description: Use this id to update or delete this source.
          example: 6683f1c2a4b19e0012ab34cd
        enabled:
          type: boolean
          description: A disabled source stays configured but is not crawled.
          example: true
        startUrl:
          type: string
          description: Where the crawl starts.
          example: https://ajuda.acme.com
        cron:
          type: string
          description: >-
            When the crawl runs, as a cron expression. Empty means it only runs
            on demand.
          example: 0 0 3 * * *
        allowedDomains:
          type: string
          description: Hosts the crawl may follow links into. Comma-separated.
          example: ajuda.acme.com
        pathFilter:
          type: string
          description: Only paths matching this are crawled. Empty means the whole site.
          example: /artigos
        excludePathFilter:
          type: string
          description: Paths never crawled, even when they match pathFilter.
          example: /artigos/rascunhos
        defaultScraperTag:
          type: string
          description: Tag applied to every entry this source imports.
          example: ajuda
        defaultScraperTopic:
          type: string
          description: Topic every entry this source imports is grouped under.
          example: Autoatendimento
        type:
          type: string
          description: Crawler this source runs on.
          enum:
            - SCRAPY
            - FIRECRAWL
            - CLOUDCHAT
        maxAgeMs:
          type: integer
          description: >-
            How old a previously fetched page may be before it is fetched again,
            in milliseconds. Absent means the crawler's own default.
          format: int64
          example: 86400000
        locales:
          type: array
          description: Languages to keep when the site publishes several.
          example:
            - pt-BR
          items:
            type: string
            description: Languages to keep when the site publishes several.
            example: '["pt-BR"]'
        createdAt:
          type: string
          description: When the source was configured (ISO-8601).
          example: '2026-08-10T14:32:05'
        updatedAt:
          type: string
          description: When it last changed (ISO-8601). Absent until the first change.
          example: '2026-08-10T18:20:41'
      description: A site Claudia crawls to keep this knowledge base in sync.
    Error:
      required:
        - error
      type: object
      properties:
        error:
          type: string
          description: What went wrong.
          example: 'Forbidden: token holds no claim for the requested account'
      description: Something the caller needs to fix.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````