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

# Run a monitor now

> Bring the next scheduled run forward to now.



## OpenAPI

````yaml POST /v1/monitors/{id}/run
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/monitors/{id}/run:
    post:
      tags:
        - Monitors
      summary: Run a monitor now
      description: >-
        Bring the next run forward to now; the ordinary sweep picks it up within
        a minute. It spends credits exactly like a scheduled run (prompts x
        points x samples tasks for each engine the run includes), so it is not a
        free preview. A second call while that window is still due is absorbed
        rather than charged twice, which makes retrying the call safe. Only an
        enabled monitor can run.
      operationId: runMonitor
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The run is due; tasks appear as the sweep admits them.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonitorRunResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/KeyScopeDenied'
        '404':
          description: No enabled monitor with that id.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    MonitorRunResponse:
      type: object
      description: >-
        Accepted. The run is due now; its tasks appear as the sweep admits them.
        Poll GET /v1/monitors/{id}/analytics and its health block to watch the
        answers arrive.
      properties:
        success:
          type: boolean
          const: true
        data:
          type: object
          properties:
            queued:
              type: boolean
              const: true
    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
  responses:
    Unauthorized:
      description: Missing or invalid bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            error:
              code: MISSING_API_KEY
              message: Missing or invalid API key
              timestamp: '2026-07-09T04:12:00.000Z'
    KeyScopeDenied:
      description: >-
        The key is restricted to some engines (allowedTaskTypes) and the monitor
        schedules an engine outside that list. The scope that applies to POST
        /v1/async/task also applies to monitors, or a schedule would be a way
        around it.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            error:
              code: KEY_SCOPE_DENIED
              message: This key is not allowed to use engine GEMINI
              timestamp: '2026-09-22T04:12:00.000Z'
  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.