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

# Update managed sitemap

> Changes the import settings of an existing managed sitemap: its include and exclude patterns, its refresh rate, and its smart chunking. A new set of patterns replaces the stored set whole and applies from the sitemap's next sync.



## OpenAPI

````yaml /specs-prettified/realtime/openapi.stable.json patch /v1/stable/document/managed-sitemap/{documentID}
openapi: 3.0.0
info:
  title: Realtime
  description: Realtime gateway API service
  version: 1.0.0
  contact: {}
servers:
  - url: https://realtime-api.voiceflow.com
security: []
tags: []
paths:
  /v1/stable/document/managed-sitemap/{documentID}:
    patch:
      tags:
        - Document
      summary: Update managed sitemap
      description: "Changes the import settings of an existing managed sitemap: its
        include and exclude patterns, its refresh rate, and its smart chunking.
        A new set of patterns replaces the stored set whole and applies from the
        sitemap's next sync."
      operationId: StableDocumentController_updateManagedSitemap
      parameters:
        - name: documentID
          required: true
          in: path
          schema:
            type: string
          x-vf-doc:
            description: The ID of the managed sitemap document to operate on.
          description: The ID of the managed sitemap document to operate on.
        - name: projectID
          required: true
          in: query
          schema:
            type: string
            description: The ID of the project to operate on.
        - name: environmentAlias
          required: true
          in: query
          schema:
            type: string
            description: The alias of the environment to operate on (e.g. `main`).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/StableDocumentUpdateManagedSitemapRequest"
      responses:
        "200":
          description: Returns the updated sitemap document with its ID, status, data,
            smart chunking settings, and folder ID.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StableDocumentResponse"
          x-vf-doc:
            description: Returns the updated sitemap document with its ID, status, data,
              smart chunking settings, and folder ID.
      security:
        - token: []
components:
  schemas:
    StableDocumentUpdateManagedSitemapRequest:
      type: object
      properties:
        patterns:
          description: "Replaces the stored patterns whole, so send both lists even when
            changing one. Matching is case-insensitive and unanchored: a pattern
            with no `*` matches any URL containing it as a substring (`/blog/`),
            while `*` matches any run of characters (`*/tag/*`, `*.pdf`)."
          type: object
          properties:
            include:
              maxItems: 100
              type: array
              items:
                type: string
                minLength: 1
                maxLength: 200
              description: Patterns a page must match at least one of to be kept. Empty keeps
                every page the sitemap lists.
            exclude:
              maxItems: 100
              type: array
              items:
                type: string
                minLength: 1
                maxLength: 200
              description: Patterns that drop a page when any one of them matches, even one an
                `include` pattern kept.
          required:
            - include
            - exclude
          additionalProperties: false
        refreshRate:
          description: How often the sitemap is re-read to add the pages it newly lists
            and remove the ones it no longer does. Its pages are re-crawled on
            the same schedule. Also applied to the pages it has already
            imported.
          type: string
          enum:
            - daily
            - weekly
            - monthly
            - never
          x-enumNames:
            - DAILY
            - WEEKLY
            - MONTHLY
            - NEVER
        markdownConversion:
          description: When enabled, HTML is automatically converted to markdown to
            generate better chunks.
          anyOf:
            - type: boolean
            - type: string
              enum:
                - "true"
                - "false"
              x-enumNames:
                - "TRUE"
                - "FALSE"
        llmBasedChunks:
          description: When enabled, an LLM groups the content into logical sections by
            topic instead of splitting it on a fixed size. Best for complex
            documents covering varied topics.
          anyOf:
            - type: boolean
            - type: string
              enum:
                - "true"
                - "false"
              x-enumNames:
                - "TRUE"
                - "FALSE"
        llmGeneratedQ:
          description: When enabled, an LLM will be used to generate a question based on
            the document context and specific chunk, then prepend it to the
            chunk. This enhances retrieval by aligning chunks with potential
            user queries.
          anyOf:
            - type: boolean
            - type: string
              enum:
                - "true"
                - "false"
              x-enumNames:
                - "TRUE"
                - "FALSE"
        llmContentSummarization:
          description: When enabled, an LLM summarizes and rewrites the content, removing
            unnecessary information and focusing on important parts to optimize
            for retrieval. Limited to 15 rows per table upload.
          anyOf:
            - type: boolean
            - type: string
              enum:
                - "true"
                - "false"
              x-enumNames:
                - "TRUE"
                - "FALSE"
        llmPrependContext:
          description: "When enabled, an LLM generates a context summary based on the
            document and chunk context, and prepends it to each chunk. This
            improves retrieval by providing additional context to each chunk.
            Note: If both llmGeneratedQ and llmPrependContext are set to true,
            llmGeneratedQ takes precedence, and the context summarization will
            not be applied."
          anyOf:
            - type: boolean
            - type: string
              enum:
                - "true"
                - "false"
              x-enumNames:
                - "TRUE"
                - "FALSE"
        singleChunk:
          description: When enabled, the whole document is stored as a single chunk, so
            retrieval returns it in full. Documents above the embedding model
            input limit (about 30,000 characters) are split into chunks as
            usual. Takes precedence over llmBasedChunks.
          anyOf:
            - type: boolean
            - type: string
              enum:
                - "true"
                - "false"
              x-enumNames:
                - "TRUE"
                - "FALSE"
      additionalProperties: false
    StableDocumentResponse:
      type: object
      properties:
        document:
          $ref: "#/components/schemas/StableDocument"
      required:
        - document
    StableDocument:
      type: object
      properties:
        id:
          type: string
        data:
          nullable: true
          allOf:
            - $ref: "#/components/schemas/KBDocumentData"
        status:
          $ref: "#/components/schemas/KBDocumentStatus"
        smartChunking:
          nullable: true
          allOf:
            - $ref: "#/components/schemas/SmartChunking"
        folderID:
          nullable: true
          description: The ID of the Knowledge Base folder the document is filed under, or
            null when it sits at the top level.
          type: string
          minLength: 1
      required:
        - id
        - data
        - status
        - smartChunking
        - folderID
    KBDocumentData:
      oneOf:
        - $ref: "#/components/schemas/KBDocumentUrlData"
        - $ref: "#/components/schemas/KBDocumentDocxData"
        - $ref: "#/components/schemas/KBDocumentPDFData"
        - $ref: "#/components/schemas/KBDocumentTextData"
        - $ref: "#/components/schemas/KBDocumentMarkdownData"
        - $ref: "#/components/schemas/KBDocumentCSVData"
        - $ref: "#/components/schemas/KBDocumentXLSXData"
        - $ref: "#/components/schemas/KBDocumentTableData"
        - $ref: "#/components/schemas/KBDocumentSitemapData"
    KBDocumentUrlData:
      type: object
      properties:
        type:
          type: string
          enum:
            - url
          x-enumNames:
            - URL
        name:
          type: string
        url:
          type: string
        title:
          type: string
        refreshRate:
          allOf:
            - $ref: "#/components/schemas/KnowledgeBaseDocumentRefreshRate"
        lastSuccessUpdate:
          type: string
        accessTokenID:
          type: number
        integrationExternalID:
          type: string
        source:
          allOf:
            - $ref: "#/components/schemas/KnowledgeBaseDocumentIntegrationType"
        sitemapDocumentID:
          nullable: true
          type: string
      required:
        - type
        - name
        - url
    KnowledgeBaseDocumentRefreshRate:
      type: string
      enum:
        - daily
        - weekly
        - monthly
        - never
      x-enumNames:
        - DAILY
        - WEEKLY
        - MONTHLY
        - NEVER
    KnowledgeBaseDocumentIntegrationType:
      type: string
      enum:
        - zendesk
        - shopify
      x-enumNames:
        - ZENDESK
        - SHOPIFY
    KBDocumentDocxData:
      type: object
      properties:
        type:
          type: string
          enum:
            - docx
          x-enumNames:
            - DOCX
        name:
          type: string
        url:
          nullable: true
          type: string
      required:
        - type
        - name
    KBDocumentPDFData:
      type: object
      properties:
        type:
          type: string
          enum:
            - pdf
          x-enumNames:
            - PDF
        name:
          type: string
        url:
          nullable: true
          type: string
      required:
        - type
        - name
    KBDocumentTextData:
      type: object
      properties:
        type:
          type: string
          enum:
            - text
          x-enumNames:
            - TEXT
        name:
          type: string
        canEdit:
          type: boolean
        url:
          nullable: true
          type: string
      required:
        - type
        - name
    KBDocumentMarkdownData:
      type: object
      properties:
        type:
          type: string
          enum:
            - md
          x-enumNames:
            - MD
        name:
          type: string
        url:
          nullable: true
          type: string
      required:
        - type
        - name
    KBDocumentCSVData:
      type: object
      properties:
        type:
          type: string
          enum:
            - csv
          x-enumNames:
            - CSV
        name:
          type: string
        rowsCount:
          type: number
        url:
          nullable: true
          type: string
      required:
        - type
        - name
    KBDocumentXLSXData:
      type: object
      properties:
        type:
          type: string
          enum:
            - xlsx
          x-enumNames:
            - XLSX
        name:
          type: string
        rowsCount:
          type: number
        url:
          nullable: true
          type: string
      required:
        - type
        - name
    KBDocumentTableData:
      type: object
      properties:
        type:
          type: string
          enum:
            - table
          x-enumNames:
            - TABLE
        name:
          type: string
        rowsCount:
          type: number
        url:
          nullable: true
          type: string
      required:
        - type
        - name
        - rowsCount
    KBDocumentSitemapData:
      type: object
      properties:
        type:
          type: string
          enum:
            - sitemap
          x-enumNames:
            - SITEMAP
        name:
          type: string
        url:
          type: string
        refreshRate:
          allOf:
            - $ref: "#/components/schemas/KnowledgeBaseDocumentRefreshRate"
        lastSuccessUpdate:
          type: string
        patterns:
          allOf:
            - $ref: "#/components/schemas/KBDocumentSitemapPatterns"
        sync:
          nullable: true
          allOf:
            - $ref: "#/components/schemas/KBDocumentSitemapSync"
      required:
        - type
        - name
        - url
    KBDocumentSitemapPatterns:
      type: object
      properties:
        include:
          type: array
          items:
            type: string
        exclude:
          type: array
          items:
            type: string
      required:
        - include
        - exclude
    KBDocumentSitemapSync:
      type: object
      properties:
        syncedAt:
          type: string
        startedAt:
          nullable: true
          type: string
          format: date-time
          pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        addedCount:
          type: number
        removedCount:
          type: number
        failure:
          nullable: true
          type: object
          properties:
            message:
              type: string
            at:
              type: string
            code:
              allOf:
                - $ref: "#/components/schemas/KBDocumentSitemapSyncFailureCode"
          required:
            - message
            - at
      required:
        - syncedAt
        - addedCount
        - removedCount
    KBDocumentSitemapSyncFailureCode:
      type: string
      enum:
        - documentLimit
      x-enumNames:
        - DOCUMENT_LIMIT
    KBDocumentStatus:
      type: object
      properties:
        type:
          $ref: "#/components/schemas/KnowledgeBaseDocumentStatus"
        data: {}
      required:
        - type
    KnowledgeBaseDocumentStatus:
      type: string
      enum:
        - ERROR
        - PENDING
        - SUCCESS
        - INITIALIZED
      x-enumNames:
        - ERROR
        - PENDING
        - SUCCESS
        - INITIALIZED
    SmartChunking:
      type: object
      properties:
        markdownConversion:
          description: When enabled, HTML is automatically converted to markdown to
            generate better chunks.
          anyOf:
            - type: boolean
            - type: string
              enum:
                - "true"
                - "false"
              x-enumNames:
                - "TRUE"
                - "FALSE"
        llmBasedChunks:
          anyOf:
            - type: boolean
            - type: string
              enum:
                - "true"
                - "false"
              x-enumNames:
                - "TRUE"
                - "FALSE"
        llmGeneratedQ:
          description: When enabled, an LLM will be used to generate a question based on
            the document context and specific chunk, then prepend it to the
            chunk. This enhances retrieval by aligning chunks with potential
            user queries.
          anyOf:
            - type: boolean
            - type: string
              enum:
                - "true"
                - "false"
              x-enumNames:
                - "TRUE"
                - "FALSE"
        llmContentSummarization:
          description: When enabled, an LLM summarizes and rewrites the content, removing
            unnecessary information and focusing on important parts to optimize
            for retrieval. Limited to 15 rows per table upload.
          anyOf:
            - type: boolean
            - type: string
              enum:
                - "true"
                - "false"
              x-enumNames:
                - "TRUE"
                - "FALSE"
        llmPrependContext:
          description: "When enabled, an LLM generates a context summary based on the
            document and chunk context, and prepends it to each chunk. This
            improves retrieval by providing additional context to each chunk.
            Note: If both llmGeneratedQ and llmPrependContext are set to true,
            llmGeneratedQ takes precedence, and the context summarization will
            not be applied."
          anyOf:
            - type: boolean
            - type: string
              enum:
                - "true"
                - "false"
              x-enumNames:
                - "TRUE"
                - "FALSE"
        singleChunk:
          description: When enabled, the whole document is stored as a single chunk, so
            retrieval returns it in full. Documents above the embedding model
            input limit (about 30,000 characters) are split into chunks as
            usual. Takes precedence over llmBasedChunks.
          anyOf:
            - type: boolean
            - type: string
              enum:
                - "true"
                - "false"
              x-enumNames:
                - "TRUE"
                - "FALSE"
  securitySchemes:
    token:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Voiceflow bearer token
````
