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

# Sync Sitemap Feed

> Re-crawl one sitemap XML feed and ingest new page URLs. Use this after turning allowCrossSubdomainSync on; PATCH /sitemap/settings does not crawl.



## OpenAPI

````yaml /v2/openapi.json post /sitemaps/{id}/sync
openapi: 3.0.0
info:
  title: Promptwatch API v2
  description: >-
    API v2 for customer integrations with Promptwatch monitoring platform. This
    version provides improved structure, additional endpoints, and enhanced
    functionality.
  version: 2.0.0
  contact:
    name: Promptwatch Support
    email: team@promptwatch.com
    url: https://promptwatch.com
  license:
    name: Commercial
    url: https://promptwatch.com/terms-and-conditions
servers:
  - url: https://server.promptwatch.com/api/v2
    description: Promptwatch API v2
security: []
tags:
  - name: Authentication
    description: API key validation and authentication
  - name: Content
    description: >-
      AI content generation and optimization. Create content asynchronously and
      poll for results.
  - name: Content Agent
    description: >-
      Content Agent (automated content) lifecycle: project settings, scheduled
      slots, review (accept/decline), and publish.
  - name: Content Gap
    description: Content gap analysis and recommendations
  - name: Publishing
    description: >-
      Publish content to a connected CMS, or record a live URL, and track the
      published page
  - name: Models
    description: Available LLM models
  - name: Monitors
    description: Monitor management and CRUD operations
  - name: Page Tracker
    description: Track URLs and inspect citation stats, responses, and prompts
  - name: Prompts
    description: Prompt management and operations
  - name: Query Fanouts
    description: ChatGPT query fanout keywords
  - name: Responses
    description: LLM response data and analytics
  - name: Tags
    description: Tag management for prompts
  - name: Topics
    description: Topic management for prompts
  - name: Actions
    description: Action items (GEO suggestions and tasks)
  - name: Personas
    description: Persona configuration for monitors
  - name: Brands
    description: Brand management for competitive analysis
  - name: Visibility
    description: Brand visibility time series and competitor heatmaps
  - name: Events
    description: >-
      Dated project events such as prompts added and actions completed, for
      annotating time series
  - name: Citations
    description: Citation analytics from AI responses
  - name: Analytics
    description: Visitor analytics, AI crawler logs, sentiment, and brand visibility trends
  - name: Projects
    description: Project management (organization-level keys only)
  - name: Usage
    description: Plan usage and limits (organization-level keys only)
  - name: Sitemap
    description: Sitemap feeds, crawler settings, crawl progress, and discovered URLs
  - name: Site Health
    description: >-
      Crawled pages with SEO issues (titles, meta descriptions, H1, thin
      content)
  - name: Socials
    description: >-
      Social media citations (Reddit posts and YouTube videos) found in LLM
      responses
  - name: Ads Radar
    description: Sponsored ads captured in AI answers
  - name: Shopping
    description: Product appearances in AI shopping answers and tracked products
paths:
  /sitemaps/{id}/sync:
    post:
      tags:
        - Sitemap
      summary: Sync Sitemap Feed
      description: >-
        Re-crawl one sitemap XML feed and ingest new page URLs. Use this after
        turning allowCrossSubdomainSync on; PATCH /sitemap/settings does not
        crawl.
      operationId: syncSitemap
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
          description: Sitemap feed identifier
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 550e8400-e29b-41d4-a716-446655440000
                  url: https://example.com/sitemap.xml
                  lastSyncedAt: '2026-09-15T08:00:00.000Z'
                  urlsDiscovered: 412
                  createdAt: '2026-04-01T08:00:00.000Z'
                  updatedAt: '2026-09-15T08:00:00.000Z'
                  crawlStats:
                    totalUrls: 500
                    addedUrls: 412
                    filteredUrls: 88
                properties:
                  id:
                    type: string
                    format: uuid
                    description: Sitemap feed identifier
                  url:
                    type: string
                    format: uri
                    description: Sitemap XML URL
                  lastSyncedAt:
                    type: string
                    format: date-time
                    nullable: true
                    description: When this feed was last crawled
                  urlsDiscovered:
                    type: integer
                    description: Page URLs kept after host filtering on the last crawl
                  createdAt:
                    type: string
                    format: date-time
                  updatedAt:
                    type: string
                    format: date-time
                  crawlStats:
                    type: object
                    properties:
                      totalUrls:
                        type: integer
                        description: URLs found in the sitemap XML before host filtering
                      addedUrls:
                        type: integer
                        description: New page URLs inserted on this crawl
                      filteredUrls:
                        type: integer
                        description: >-
                          URLs dropped because their host was outside the
                          allowed scope. Enable allowCrossSubdomainSync and POST
                          /sitemaps/:id/sync to ingest other subdomains.
                    required:
                      - totalUrls
                      - addedUrls
                      - filteredUrls
                    additionalProperties: false
                required:
                  - id
                  - url
                  - lastSyncedAt
                  - urlsDiscovered
                  - createdAt
                  - updatedAt
                  - crawlStats
                additionalProperties: false
        '400':
          description: Invalid authentication context or sitemap request.
          content:
            application/json:
              schema:
                description: Invalid authentication context or sitemap request.
                anyOf:
                  - type: object
                    example:
                      error: Bad Request
                      code: DATE_RANGE_TOO_LARGE
                      message: Date range cannot exceed 90 days
                    properties:
                      error:
                        type: string
                        description: Error label
                      code:
                        type: string
                        description: >-
                          Optional machine-readable code (e.g.
                          DATE_RANGE_TOO_LARGE)
                      message:
                        type: string
                        description: Reason the request was rejected
                    required:
                      - error
                      - message
                  - type: object
                    example:
                      code: SITEMAP_DOMAIN_MISMATCH
                      message: Sitemap URL domain does not match project website domain
                    properties:
                      code:
                        type: string
                        description: Error code indicating the type of error
                        enum:
                          - SITEMAP_PROJECT_WEBSITE_NOT_FOUND
                          - SITEMAP_URL_NOT_FOUND
                          - SITEMAP_DOMAIN_MISMATCH
                          - SITEMAP_NOT_FOUND
                          - SITEMAP_CRAWLER_ERROR
                          - SITEMAP_CRAWLER_FORBIDDEN
                          - SITEMAP_CRAWLER_NOT_FOUND
                          - SITEMAP_CRAWLER_SERVER_ERROR
                          - INTERNAL_ERROR
                        example: SITEMAP_PROJECT_WEBSITE_NOT_FOUND
                      message:
                        type: string
                        description: Human-readable error message
                    required:
                      - code
                      - message
                    additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthorized
                  message: Missing or invalid X-API-Key header.
                properties:
                  error:
                    type: string
                    description: Error category (often aligned with HTTP semantics)
                  code:
                    type: string
                    description: Optional machine-readable code
                  message:
                    type: string
                    description: Human-readable explanation
                  details:
                    type: object
                    description: Optional structured detail (e.g. validation)
                    additionalProperties: true
                required:
                  - error
                  - message
                additionalProperties: false
        '403':
          description: API key access denied or sitemap server refused the crawl.
          content:
            application/json:
              schema:
                description: API key access denied or sitemap server refused the crawl.
                anyOf:
                  - type: object
                    example:
                      error: Unauthorized
                      message: Missing or invalid X-API-Key header.
                    properties:
                      error:
                        type: string
                        description: Error category (often aligned with HTTP semantics)
                      code:
                        type: string
                        description: Optional machine-readable code
                      message:
                        type: string
                        description: Human-readable explanation
                      details:
                        type: object
                        description: Optional structured detail (e.g. validation)
                        additionalProperties: true
                    required:
                      - error
                      - message
                    additionalProperties: false
                  - type: object
                    example:
                      code: SITEMAP_DOMAIN_MISMATCH
                      message: Sitemap URL domain does not match project website domain
                    properties:
                      code:
                        type: string
                        description: Error code indicating the type of error
                        enum:
                          - SITEMAP_PROJECT_WEBSITE_NOT_FOUND
                          - SITEMAP_URL_NOT_FOUND
                          - SITEMAP_DOMAIN_MISMATCH
                          - SITEMAP_NOT_FOUND
                          - SITEMAP_CRAWLER_ERROR
                          - SITEMAP_CRAWLER_FORBIDDEN
                          - SITEMAP_CRAWLER_NOT_FOUND
                          - SITEMAP_CRAWLER_SERVER_ERROR
                          - INTERNAL_ERROR
                        example: SITEMAP_PROJECT_WEBSITE_NOT_FOUND
                      message:
                        type: string
                        description: Human-readable error message
                    required:
                      - code
                      - message
                    additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                example:
                  code: SITEMAP_DOMAIN_MISMATCH
                  message: Sitemap URL domain does not match project website domain
                properties:
                  code:
                    type: string
                    description: Error code indicating the type of error
                    enum:
                      - SITEMAP_PROJECT_WEBSITE_NOT_FOUND
                      - SITEMAP_URL_NOT_FOUND
                      - SITEMAP_DOMAIN_MISMATCH
                      - SITEMAP_NOT_FOUND
                      - SITEMAP_CRAWLER_ERROR
                      - SITEMAP_CRAWLER_FORBIDDEN
                      - SITEMAP_CRAWLER_NOT_FOUND
                      - SITEMAP_CRAWLER_SERVER_ERROR
                      - INTERNAL_ERROR
                    example: SITEMAP_PROJECT_WEBSITE_NOT_FOUND
                  message:
                    type: string
                    description: Human-readable error message
                required:
                  - code
                  - message
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                example:
                  code: SITEMAP_DOMAIN_MISMATCH
                  message: Sitemap URL domain does not match project website domain
                properties:
                  code:
                    type: string
                    description: Error code indicating the type of error
                    enum:
                      - SITEMAP_PROJECT_WEBSITE_NOT_FOUND
                      - SITEMAP_URL_NOT_FOUND
                      - SITEMAP_DOMAIN_MISMATCH
                      - SITEMAP_NOT_FOUND
                      - SITEMAP_CRAWLER_ERROR
                      - SITEMAP_CRAWLER_FORBIDDEN
                      - SITEMAP_CRAWLER_NOT_FOUND
                      - SITEMAP_CRAWLER_SERVER_ERROR
                      - INTERNAL_ERROR
                    example: SITEMAP_PROJECT_WEBSITE_NOT_FOUND
                  message:
                    type: string
                    description: Human-readable error message
                required:
                  - code
                  - message
                additionalProperties: false
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        API key for authentication. Get yours from the Promptwatch dashboard
        under Settings > API Keys.

````