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

# Atualizar um site

> Altere o intervalo de renderização ou o país de um site.



## OpenAPI

````yaml PATCH /v1/ai-rendering/sites/{id}
openapi: 3.1.0
info:
  title: querying.ai
  description: >-
    One API for every AI answer engine. Every task is asynchronous: submit, then
    collect the result via webhook or polling.
  version: 1.0.0
servers:
  - url: https://api.querying.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/ai-rendering/sites/{id}:
    parameters:
      - name: id
        in: path
        required: true
        description: The site's id.
        schema:
          type: string
    patch:
      tags:
        - AI Rendering
      summary: Update a site
      description: Changes how often the site's pages are rendered and from which country.
      operationId: updateAiRenderingSite
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AiRenderingSiteUpdate'
            example:
              agents:
                - chatgpt-user
                - oai-searchbot
                - claude-searchbot
      responses:
        '200':
          description: The site.
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - site
                properties:
                  success:
                    type: boolean
                  site:
                    $ref: '#/components/schemas/AiRenderingSite'
        '400':
          description: >-
            VALIDATION_ERROR: the body is not a JSON object or has an unknown
            field.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: 'NOT_FOUND: no site of the account with that id.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: 'VALIDATION_ERROR: agents, mode, refreshDays or country is not valid.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    AiRenderingSiteUpdate:
      type: object
      additionalProperties: false
      properties:
        refreshDays:
          type: integer
          minimum: 1
          maximum: 28
          description: >-
            Moves the next render of each page with a copy to its last render
            plus the new interval.
        country:
          type: string
          enum:
            - US
            - KR
          description: Used from the next render.
    AiRenderingSite:
      type: object
      required:
        - id
        - host
        - refreshDays
        - country
        - keyPrefix
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
        host:
          type: string
          description: The site's host name, lower case, without a port.
        refreshDays:
          type: integer
          minimum: 1
          maximum: 28
          description: Days between renders of a published page. Default 28.
        country:
          type: string
          enum:
            - US
            - KR
          description: Where the site's pages are rendered from. Default US.
        keyPrefix:
          type: string
          description: >-
            The first 11 characters of the site key, which reads the site's copy
            list.
        pages:
          type: integer
          description: >-
            Published pages. Absent from a site that was just updated or given a
            new key.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    ErrorResponse:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          const: false
        error:
          $ref: '#/components/schemas/ErrorDetail'
    ErrorDetail:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Stable, safe to branch on. See the Errors guide for the full list.
        message:
          type: string
          description: For humans. May change.
        details:
          description: >-
            Context for the error. An array of `{field, message}` on most
            `VALIDATION_ERROR`s; an object elsewhere (for example `{id}` on
            `RESOURCE_NOT_FOUND`, `retryAfterSec` on 429 and 503 codes). Omitted
            when there is nothing to add.
          oneOf:
            - type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                  message:
                    type: string
            - type: object
              additionalProperties: true
        timestamp:
          type: string
          format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Your API key, sent as `Authorization: Bearer <key>`.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.