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

# DELETE /monitor/{id}

> Delete a monitor, its check history and its pending webhooks. Stops all future charges. Free.

## Overview

Deletes the monitor together with its checks, page snapshots and any webhook deliveries still pending. Nothing more is fetched or billed.

To stop a monitor for a while instead, pause it with [`PATCH /monitor/{id}`](/api-reference/endpoint/monitor-update) — a paused monitor costs nothing and keeps its history.

## Example request

<CodeGroup>
  ```bash cURL theme={"theme":"css-variables"}
  curl -X DELETE "https://api.prefetch.io/monitor/mon_3f9a1c2b7d4e4f6a8b0c1d2e3f4a5b6c" \
    -H "X-API-Key: $PREFETCH_API_KEY"
  ```

  ```javascript Node.js theme={"theme":"css-variables"}
  await fetch(`https://api.prefetch.io/monitor/${monitorId}`, {
    method: "DELETE",
    headers: { "X-API-Key": process.env.PREFETCH_API_KEY },
  });
  ```

  ```python Python theme={"theme":"css-variables"}
  import os, requests

  requests.delete(
      f"https://api.prefetch.io/monitor/{monitor_id}",
      headers={"X-API-Key": os.environ["PREFETCH_API_KEY"]},
  )
  ```
</CodeGroup>

## Example response

```json theme={"theme":"css-variables"}
{
  "success": true,
  "data": { "id": "mon_3f9a1c2b7d4e4f6a8b0c1d2e3f4a5b6c", "deleted": true },
  "meta": {
    "requestId": "f2d5b6c7-8e9f-4a01-82b3-4d5e6f708192",
    "durationMs": 33
  }
}
```

A check that is running when you delete the monitor stops at its next step and is not billed. Deletion cannot be undone.

## Related

<CardGroup cols={2}>
  <Card title="PATCH /monitor/{id}" icon="pause" href="/api-reference/endpoint/monitor-update">
    Pause instead, and keep the history.
  </Card>

  <Card title="GET /monitor" icon="list" href="/api-reference/endpoint/monitor-list">
    Your remaining monitors.
  </Card>
</CardGroup>


## OpenAPI

````yaml DELETE /monitor/{id}
openapi: 3.1.0
info:
  title: Prefetch API
  description: >-
    Extract brand identity, company data, screenshots, IAB classifications, and
    clean page content from any URL.
  version: 1.0.0
  contact:
    email: support@prefetch.io
servers:
  - url: https://api.prefetch.io
    description: Production
security:
  - apiKey: []
tags:
  - name: Endpoints
    description: Data extraction endpoints. All require authentication and consume credits.
  - name: Health
    description: Health and readiness probes. No authentication required.
paths:
  /monitor/{id}:
    delete:
      tags:
        - Endpoints
      summary: Delete a monitor
      description: >-
        Deletes the monitor with its checks, snapshots and pending webhooks, and
        stops all future charges. To stop it for a while, pause it instead.
        Free.
      operationId: deleteMonitor
      parameters:
        - $ref: '#/components/parameters/monitorId'
      responses:
        '200':
          description: Monitor deleted.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    $ref: '#/components/schemas/MonitorDeleteData'
                  meta:
                    $ref: '#/components/schemas/Meta'
                required:
                  - success
                  - data
                  - meta
              example:
                success: true
                data:
                  id: mon_3f9a1c2b7d4e4f6a8b0c1d2e3f4a5b6c
                  deleted: true
                meta:
                  requestId: f2d5b6c7-8e9f-4a01-82b3-4d5e6f708192
                  durationMs: 33
        '400':
          description: Invalid or missing parameters. The message names the field.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: >-
            Revoked key, expired key, credit limit, blocklisted URL, monitor
            limit reached, or a RapidAPI subscription — monitors need a direct
            Prefetch API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: >-
            Monitor not found — or not yours. Monitor ids are unguessable, so
            another key's monitor is reported as not found rather than
            forbidden.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Monitoring is temporarily unavailable. Retry shortly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  parameters:
    monitorId:
      name: id
      in: path
      required: true
      description: The monitor id returned by `POST /monitor`.
      schema:
        type: string
        example: mon_3f9a1c2b7d4e4f6a8b0c1d2e3f4a5b6c
  schemas:
    MonitorDeleteData:
      type: object
      properties:
        id:
          type: string
        deleted:
          type: boolean
          enum:
            - true
    Meta:
      type: object
      properties:
        requestId:
          type: string
          format: uuid
          description: Unique identifier for this request.
          example: a3f2c1d4-7b6e-4f2a-9c1d-8e3f2a1b4c5d
        durationMs:
          type: integer
          nullable: true
          description: Time taken to process the request in milliseconds.
          example: 1842
      required:
        - requestId
        - durationMs
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - false
          description: >-
            Always false. Absent, like `meta`, on authentication and rate-limit
            errors, which are answered before a request is processed.
        error:
          type: string
          description: >-
            Human-readable error message. The wording can change: branch on
            `error_code`.
          example: Credit limit exceeded
        error_code:
          type: string
          enum:
            - INVALID_REQUEST
            - PAYLOAD_TOO_LARGE
            - NOT_FOUND
            - CONFLICT
            - UNAUTHORIZED
            - FORBIDDEN
            - CREDITS_EXHAUSTED
            - RATE_LIMITED
            - CONCURRENCY_LIMITED
            - URL_BLOCKED
            - URL_NOT_PERMITTED
            - DNS_RESOLUTION_FAILED
            - TARGET_BLOCKED
            - TARGET_CONNECTION_FAILED
            - TARGET_TIMEOUT
            - TARGET_SSL_ERROR
            - TARGET_SERVER_ERROR
            - TARGET_CLIENT_ERROR
            - TARGET_NOT_A_PAGE
            - TARGET_UNLOADABLE
            - RESEARCH_INCONCLUSIVE
            - TIMEOUT
            - SERVICE_BUSY
            - SERVICE_UNAVAILABLE
            - INTERNAL_ERROR
          description: >-
            What went wrong, for machines. Stable: a code keeps its meaning once
            published. See [Error handling](/concepts/errors).
          example: CREDITS_EXHAUSTED
        retryable:
          type: boolean
          description: >-
            Whether the same request can succeed if sent again after a short
            wait (honour `Retry-After` when present). False for problems with
            the request or the target.
          example: false
        retryAfterSeconds:
          type: integer
          description: 'On `RATE_LIMITED`: seconds until a request will be accepted.'
        limit:
          type: integer
          description: >-
            On `CONCURRENCY_LIMITED`: how many requests this key may have in
            flight.
        meta:
          $ref: '#/components/schemas/Meta'
      required:
        - error
        - error_code
        - retryable
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your Prefetch API key. Obtain one from the dashboard.

````

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