Endpoints
    PATCH/desearch/monitors/{monitor_id}

    Update a monitor

    Change any setting. `status: paused` stops scheduled runs (a manual trigger still works); `status: active` resumes them, also after a pause for credits or a failing webhook. `webhook: null` removes the webhook; a new webhook URL gets a new secret, returned once as `webhook_secret`. Free.

    Base URL

    https://api.desearch.ai

    Implementation guidance

    Use Update a monitor when your application needs search-grounded AI results without maintaining its own crawler, social-data pipeline, or retrieval infrastructure. The endpoint returns structured data that can be consumed by agents, research tools, dashboards, and retrieval-augmented generation workflows. Keep the request focused on the minimum fields your workflow needs so responses remain fast and easy to validate.

    Send requests to PATCH /desearch/monitors/{monitor_id} with your Desearch API key in the authorization header. Treat the key as a server-side secret, validate all required parameters before sending the request, and handle non-2xx responses explicitly. Production integrations should use sensible timeouts, retry only transient failures with backoff, and record the response status and request identifier for troubleshooting.

    Test the example request below before integrating it into a larger workflow. Confirm that the returned fields, links, and timestamps meet your freshness requirements, then add schema validation at the application boundary. For agentic systems, preserve source URLs with the generated answer so users can inspect evidence and your application can avoid presenting unsupported claims.

    Path Parameters

    monitor_idstringrequired

    The `monitor_id` returned when the monitor was created.

    Body Parameters

    querystring
    namestring
    criteriaarray of strings

    One item per line, or a JSON array. Sent as an array.

    sourcesarray
    intervalstring
    optionsobject (JSON)

    A JSON object, sent as JSON. Leave it empty to omit the field. Keys: web, x, reddit, youtube, threads, tiktok, instagram, facebook, meta_ads. Allowed values: web.count: 10, 15, 20; tiktok.count: 10, 20, 30; meta_ads.count: 10, 20, 30.

    min_scoreinteger
    summaryboolean
    statusstring
    webhookobject (JSON)

    A JSON object, sent as JSON. Leave it empty to omit the field. Keys: url, events.

    metadataobject (JSON)

    A JSON object, sent as JSON. Leave it empty to omit the field.

    Responses

    200Successful Response
    400Invalid webhook URL
    401Unauthorized
    404Monitor not found
    422Validation Error
    500Internal Server Error
    Authorization

    Your API key is sent in the Authorization header.

    Request
    curl -X PATCH "https://api.desearch.ai/desearch/monitors/YOUR_MONITOR_ID" \
      -H "Authorization: YOUR_API_KEY" \
      -H "Content-Type: application/json"
    ResponseSchema
    {
      "monitor_id": "Monitor Id",
      "name": "string",
      "query": "Query",
      "criteria": [
        "string"
      ],
      "sources": [
        "string"
      ],
      "interval": "Interval",
      "options": {},
      "min_score": 0,
      "summary": true,
      "status": "active",
      "paused_reason": "user",
      "webhook": {
        "url": "Url",
        "events": [
          "string"
        ],
        "consecutive_failures": 0,
        "last_delivery": {
          "event": "Event",
          "status": "pending",
          "attempts": 0,
          "status_code": 0,
          "error": "string",
          "created_at": "string",
          "next_attempt_at": "string",
          "delivered_at": "string"
        }
      },
      "metadata": {},
      "max_run_cost_usd": 0,
      "next_run_at": "string",
      "last_run": {
        "run_id": "Run Id",
        "status": "Status",
        "item_count": 0,
        "cost_usd": 0,
        "fail_reason": "string",
        "created_at": "string",
        "finished_at": "string"
      },
      "stats": {
        "runs": 0,
        "items": 0,
        "spent_usd": 0
      },
      "created_at": "Created At",
      "updated_at": "Updated At",
      "webhook_secret": "string"
    }

    Possible status codes:

    200401422429500