Context.dev Monitors API

Monitor pages, sitemaps, and extracted website data for exact or semantic changes. Webhook payloads are documented by the MonitorsChangeDetectedWebhookPayload and MonitorsRunCompletedWebhookPayload schemas.

OpenAPI Specification

contextdev-monitors-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Context Brand Intelligence Monitors API
  description: API for retrieving context data from any website
  version: 1.0.0
servers:
- url: https://api.context.dev/v1
tags:
- name: Monitors
  description: Monitor pages, sitemaps, and extracted website data for exact or semantic changes. Webhook payloads are documented by the MonitorsChangeDetectedWebhookPayload and MonitorsRunCompletedWebhookPayload schemas.
paths:
  /monitors:
    post:
      x-hidden: true
      summary: Create a monitor
      description: Creates a monitor. The request body is a union of the supported target/change detection combinations. The monitor runs immediately after creation to create its initial baseline.
      operationId: createMonitor
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MonitorsCreateMonitorRequest'
            examples:
              page_exact:
                summary: Exact page monitor
                value:
                  mode: web
                  name: Acme pricing page
                  target:
                    type: page
                    url: https://acme.com/pricing
                  change_detection:
                    type: exact
                  schedule:
                    type: interval
                    frequency: 6
                    unit: hours
                  webhook:
                    url: https://example.com/webhook
              sitemap_exact:
                summary: Exact sitemap monitor
                value:
                  mode: web
                  name: Acme sitemap
                  target:
                    type: sitemap
                    url: https://acme.com/sitemap.xml
                  change_detection:
                    type: exact
                  schedule:
                    type: interval
                    frequency: 1
                    unit: days
                  webhook:
                    url: https://example.com/webhook
              extract_semantic:
                summary: Semantic extract monitor
                value:
                  mode: web
                  name: Acme website positioning
                  target:
                    type: extract
                    url: https://acme.com
                    instructions: Extract the product positioning, pricing, packaging, and headline feature claims.
                    max_pages: 10
                  change_detection:
                    type: semantic
                  schedule:
                    type: interval
                    frequency: 1
                    unit: days
                  webhook:
                    url: https://example.com/webhook
      security:
      - bearerAuth: []
      tags:
      - Monitors
      responses:
        '201':
          description: Monitor created
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonitorsMonitor'
        '400':
          $ref: '#/components/responses/MonitorsBadRequest'
        '401':
          $ref: '#/components/responses/MonitorsUnauthorized'
        '403':
          $ref: '#/components/responses/MonitorsLimitExceeded'
      x-codeSamples:
      - lang: JavaScript
        source: "import ContextDev from 'context.dev';\n\nconst client = new ContextDev({\n  apiKey: process.env['CONTEXT_DEV_API_KEY'], // This is the default and can be omitted\n});\n\nconst monitor = await client.monitors.create({\n  change_detection: { type: 'exact' },\n  name: 'Acme pricing page',\n  schedule: {\n    type: 'interval',\n    frequency: 6,\n    unit: 'hours',\n  },\n  target: { type: 'page', url: 'https://acme.com/pricing' },\n  mode: 'web',\n  webhook: { url: 'https://example.com/webhook' },\n});\n\nconsole.log(monitor.id);"
      - lang: Python
        source: "import os\nfrom context.dev import ContextDev\n\nclient = ContextDev(\n    api_key=os.environ.get(\"CONTEXT_DEV_API_KEY\"),  # This is the default and can be omitted\n)\nmonitor = client.monitors.create(\n    change_detection={\n        \"type\": \"exact\"\n    },\n    name=\"Acme pricing page\",\n    schedule={\n        \"type\": \"interval\",\n        \"frequency\": 6,\n        \"unit\": \"hours\",\n    },\n    target={\n        \"type\": \"page\",\n        \"url\": \"https://acme.com/pricing\",\n    },\n    mode=\"web\",\n    webhook={\n        \"url\": \"https://example.com/webhook\"\n    },\n)\nprint(monitor.id)"
      - lang: Go
        source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/context-dot-dev/context-go-sdk\"\n\t\"github.com/context-dot-dev/context-go-sdk/option\"\n)\n\nfunc main() {\n\tclient := contextdev.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tmonitor, err := client.Monitors.New(context.TODO(), contextdev.MonitorNewParams{\n\t\tChangeDetection: contextdev.MonitorNewParamsChangeDetectionUnion{\n\t\t\tOfExact: &contextdev.MonitorNewParamsChangeDetectionExact{},\n\t\t},\n\t\tName: \"Acme pricing page\",\n\t\tSchedule: contextdev.MonitorNewParamsSchedule{\n\t\t\tType:      \"interval\",\n\t\t\tFrequency: 6,\n\t\t\tUnit:      \"hours\",\n\t\t},\n\t\tTarget: contextdev.MonitorNewParamsTargetUnion{\n\t\t\tOfPage: &contextdev.MonitorNewParamsTargetPage{\n\t\t\t\tURL: \"https://acme.com/pricing\",\n\t\t\t},\n\t\t},\n\t\tMode: contextdev.MonitorNewParamsModeWeb,\n\t\tWebhook: contextdev.MonitorNewParamsWebhook{\n\t\t\tURL: \"https://example.com/webhook\",\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", monitor.ID)\n}\n"
      - lang: Ruby
        source: "require \"context_dev\"\n\ncontext_dev = ContextDev::Client.new(api_key: \"My API Key\")\n\nmonitor = context_dev.monitors.create(\n  change_detection: {type: :exact},\n  name: \"Acme pricing page\",\n  schedule: {frequency: 6, type: :interval, unit: :hours},\n  target: {type: :page, url: \"https://acme.com/pricing\"}\n)\n\nputs(monitor)"
      - lang: PHP
        source: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\nuse ContextDev\\Client;\nuse ContextDev\\Core\\Exceptions\\APIException;\n\n$client = new Client(apiKey: getenv('CONTEXT_DEV_API_KEY') ?: 'My API Key');\n\ntry {\n  $monitor = $client->monitors->create(\n    changeDetection: ['type' => 'exact'],\n    name: 'Acme pricing page',\n    schedule: ['frequency' => 6, 'type' => 'interval', 'unit' => 'hours'],\n    target: [\n      'type' => 'page',\n      'url' => 'https://acme.com/pricing',\n      'normalizeWhitespace' => true,\n    ],\n    mode: 'web',\n    tags: ['pricing', 'competitor'],\n    webhook: [\n      'url' => 'https://example.com/webhook',\n      'events' => ['change.detected', 'run.completed'],\n    ],\n  );\n\n  var_dump($monitor);\n} catch (APIException $e) {\n  echo $e->getMessage();\n}"
      - lang: CLI
        source: "context-dev monitors create \\\n  --api-key 'My API Key' \\\n  --change-detection '{type: exact}' \\\n  --name 'Acme pricing page' \\\n  --schedule '{frequency: 6, type: interval, unit: hours}' \\\n  --target '{type: page, url: https://acme.com/pricing}'"
    get:
      x-hidden: true
      summary: List monitors
      description: Lists monitors for the authenticated organization. Supports free-text search (`q` over `search_by` fields, `prefix` or `exact` via `search_type`) plus status/type/tag filters. Results are paginated via the opaque `cursor`.
      operationId: listMonitors
      security:
      - bearerAuth: []
      tags:
      - Monitors
      parameters:
      - schema:
          type: string
          maxLength: 200
          description: Free-text search term, matched against the fields named in `search_by`.
          example: pricing
        required: false
        description: Free-text search term, matched against the fields named in `search_by`.
        name: q
        in: query
      - schema:
          type:
          - array
          - 'null'
          items:
            type: string
            enum:
            - name
            - url
            - instructions
            - tags
          description: Comma-separated fields to search with `q`. Defaults to all of them. Note `instructions` only exists on extract monitors.
          example: name,url
        required: false
        description: Comma-separated fields to search with `q`. Defaults to all of them. Note `instructions` only exists on extract monitors.
        name: search_by
        in: query
      - schema:
          type: string
          enum:
          - exact
          - prefix
          description: '`prefix` for as-you-type prefix matching (default), `exact` for full-token matching.'
        required: false
        description: '`prefix` for as-you-type prefix matching (default), `exact` for full-token matching.'
        name: search_type
        in: query
      - schema:
          type: string
          enum:
          - active
          - paused
          - failed
          description: Filter monitors by lifecycle status.
        required: false
        description: Filter monitors by lifecycle status.
        name: status
        in: query
      - schema:
          type: string
          enum:
          - page
          - sitemap
          - extract
          description: Filter by target type.
        required: false
        description: Filter by target type.
        name: target_type
        in: query
      - schema:
          type: string
          enum:
          - exact
          - semantic
          description: Filter by change detection type.
        required: false
        description: Filter by change detection type.
        name: change_detection_type
        in: query
      - schema:
          type:
          - array
          - 'null'
          items:
            type: string
            minLength: 1
            maxLength: 50
          maxItems: 20
          description: Comma-separated list of tags to filter by (matches monitors having any of them).
          example: pricing,competitor
        required: false
        description: Comma-separated list of tags to filter by (matches monitors having any of them).
        name: tags
        in: query
      - schema:
          type: string
          description: Filter to items that have this tag.
          example: pricing
        required: false
        description: Filter to items that have this tag.
        name: tag
        in: query
      - schema:
          type: integer
          minimum: 1
          maximum: 100
          description: Maximum number of items to return per page (1-100). Defaults to 25.
        required: false
        description: Maximum number of items to return per page (1-100). Defaults to 25.
        name: limit
        in: query
      - schema:
          type: string
          description: Opaque pagination cursor from a previous response.
        required: false
        description: Opaque pagination cursor from a previous response.
        name: cursor
        in: query
      responses:
        '200':
          description: A paginated list of monitors
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonitorsListMonitorsResponse'
        '401':
          $ref: '#/components/responses/MonitorsUnauthorized'
      x-codeSamples:
      - lang: JavaScript
        source: "import ContextDev from 'context.dev';\n\nconst client = new ContextDev({\n  apiKey: process.env['CONTEXT_DEV_API_KEY'], // This is the default and can be omitted\n});\n\nconst monitors = await client.monitors.list();\n\nconsole.log(monitors.data);"
      - lang: Python
        source: "import os\nfrom context.dev import ContextDev\n\nclient = ContextDev(\n    api_key=os.environ.get(\"CONTEXT_DEV_API_KEY\"),  # This is the default and can be omitted\n)\nmonitors = client.monitors.list()\nprint(monitors.data)"
      - lang: Go
        source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/context-dot-dev/context-go-sdk\"\n\t\"github.com/context-dot-dev/context-go-sdk/option\"\n)\n\nfunc main() {\n\tclient := contextdev.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tmonitors, err := client.Monitors.List(context.TODO(), contextdev.MonitorListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", monitors.Data)\n}\n"
      - lang: Ruby
        source: 'require "context_dev"


          context_dev = ContextDev::Client.new(api_key: "My API Key")


          monitors = context_dev.monitors.list


          puts(monitors)'
      - lang: PHP
        source: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\nuse ContextDev\\Client;\nuse ContextDev\\Core\\Exceptions\\APIException;\n\n$client = new Client(apiKey: getenv('CONTEXT_DEV_API_KEY') ?: 'My API Key');\n\ntry {\n  $monitors = $client->monitors->list(\n    changeDetectionType: 'exact',\n    cursor: 'cursor',\n    limit: 1,\n    q: 'pricing',\n    searchBy: ['name'],\n    searchType: 'exact',\n    status: 'active',\n    tag: 'pricing',\n    tags: ['x'],\n    targetType: 'page',\n  );\n\n  var_dump($monitors);\n} catch (APIException $e) {\n  echo $e->getMessage();\n}"
      - lang: CLI
        source: "context-dev monitors list \\\n  --api-key 'My API Key'"
  /monitors/{monitor_id}:
    get:
      x-hidden: true
      summary: Get a monitor
      operationId: getMonitor
      security:
      - bearerAuth: []
      tags:
      - Monitors
      parameters:
      - schema:
          type: string
          example: mon_123
        required: true
        name: monitor_id
        in: path
      responses:
        '200':
          description: Monitor
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonitorsMonitor'
        '401':
          $ref: '#/components/responses/MonitorsUnauthorized'
        '404':
          $ref: '#/components/responses/MonitorsNotFound'
      x-codeSamples:
      - lang: JavaScript
        source: "import ContextDev from 'context.dev';\n\nconst client = new ContextDev({\n  apiKey: process.env['CONTEXT_DEV_API_KEY'], // This is the default and can be omitted\n});\n\nconst monitor = await client.monitors.retrieve('mon_123');\n\nconsole.log(monitor.id);"
      - lang: Python
        source: "import os\nfrom context.dev import ContextDev\n\nclient = ContextDev(\n    api_key=os.environ.get(\"CONTEXT_DEV_API_KEY\"),  # This is the default and can be omitted\n)\nmonitor = client.monitors.retrieve(\n    \"mon_123\",\n)\nprint(monitor.id)"
      - lang: Go
        source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/context-dot-dev/context-go-sdk\"\n\t\"github.com/context-dot-dev/context-go-sdk/option\"\n)\n\nfunc main() {\n\tclient := contextdev.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tmonitor, err := client.Monitors.Get(context.TODO(), \"mon_123\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", monitor.ID)\n}\n"
      - lang: Ruby
        source: 'require "context_dev"


          context_dev = ContextDev::Client.new(api_key: "My API Key")


          monitor = context_dev.monitors.retrieve("mon_123")


          puts(monitor)'
      - lang: PHP
        source: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\nuse ContextDev\\Client;\nuse ContextDev\\Core\\Exceptions\\APIException;\n\n$client = new Client(apiKey: getenv('CONTEXT_DEV_API_KEY') ?: 'My API Key');\n\ntry {\n  $monitor = $client->monitors->retrieve('mon_123');\n\n  var_dump($monitor);\n} catch (APIException $e) {\n  echo $e->getMessage();\n}"
      - lang: CLI
        source: "context-dev monitors retrieve \\\n  --api-key 'My API Key' \\\n  --monitor-id mon_123"
    patch:
      x-hidden: true
      summary: Update a monitor
      description: Updates a monitor. If `target` or `change_detection` changes, the monitor creates a new baseline. Unsupported target/change detection combinations are rejected.
      operationId: updateMonitor
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MonitorsUpdateMonitorRequest'
            example:
              name: Acme pricing monitor
              status: active
              schedule:
                type: interval
                frequency: 1
                unit: hours
              webhook:
                url: https://example.com/webhook
      security:
      - bearerAuth: []
      tags:
      - Monitors
      parameters:
      - schema:
          type: string
          example: mon_123
        required: true
        name: monitor_id
        in: path
      responses:
        '200':
          description: Updated monitor
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonitorsMonitor'
        '400':
          $ref: '#/components/responses/MonitorsBadRequest'
        '401':
          $ref: '#/components/responses/MonitorsUnauthorized'
        '404':
          $ref: '#/components/responses/MonitorsNotFound'
      x-codeSamples:
      - lang: JavaScript
        source: "import ContextDev from 'context.dev';\n\nconst client = new ContextDev({\n  apiKey: process.env['CONTEXT_DEV_API_KEY'], // This is the default and can be omitted\n});\n\nconst monitor = await client.monitors.update('mon_123', {\n  name: 'Acme pricing monitor',\n  schedule: {\n    type: 'interval',\n    frequency: 1,\n    unit: 'hours',\n  },\n  status: 'active',\n  webhook: { url: 'https://example.com/webhook' },\n});\n\nconsole.log(monitor.id);"
      - lang: Python
        source: "import os\nfrom context.dev import ContextDev\n\nclient = ContextDev(\n    api_key=os.environ.get(\"CONTEXT_DEV_API_KEY\"),  # This is the default and can be omitted\n)\nmonitor = client.monitors.update(\n    monitor_id=\"mon_123\",\n    name=\"Acme pricing monitor\",\n    schedule={\n        \"type\": \"interval\",\n        \"frequency\": 1,\n        \"unit\": \"hours\",\n    },\n    status=\"active\",\n    webhook={\n        \"url\": \"https://example.com/webhook\"\n    },\n)\nprint(monitor.id)"
      - lang: Go
        source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/context-dot-dev/context-go-sdk\"\n\t\"github.com/context-dot-dev/context-go-sdk/option\"\n)\n\nfunc main() {\n\tclient := contextdev.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tmonitor, err := client.Monitors.Update(\n\t\tcontext.TODO(),\n\t\t\"mon_123\",\n\t\tcontextdev.MonitorUpdateParams{\n\t\t\tName: contextdev.String(\"Acme pricing monitor\"),\n\t\t\tSchedule: contextdev.MonitorUpdateParamsSchedule{\n\t\t\t\tType:      \"interval\",\n\t\t\t\tFrequency: 1,\n\t\t\t\tUnit:      \"hours\",\n\t\t\t},\n\t\t\tStatus: contextdev.MonitorUpdateParamsStatusActive,\n\t\t\tWebhook: contextdev.MonitorUpdateParamsWebhook{\n\t\t\t\tURL: \"https://example.com/webhook\",\n\t\t\t},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", monitor.ID)\n}\n"
      - lang: Ruby
        source: 'require "context_dev"


          context_dev = ContextDev::Client.new(api_key: "My API Key")


          monitor = context_dev.monitors.update("mon_123")


          puts(monitor)'
      - lang: PHP
        source: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\nuse ContextDev\\Client;\nuse ContextDev\\Core\\Exceptions\\APIException;\n\n$client = new Client(apiKey: getenv('CONTEXT_DEV_API_KEY') ?: 'My API Key');\n\ntry {\n  $monitor = $client->monitors->update(\n    'mon_123',\n    changeDetection: ['type' => 'exact'],\n    name: 'Acme pricing monitor',\n    schedule: ['frequency' => 1, 'type' => 'interval', 'unit' => 'hours'],\n    status: 'active',\n    tags: ['pricing', 'competitor'],\n    target: [\n      'type' => 'page',\n      'url' => 'https://acme.com/pricing',\n      'normalizeWhitespace' => true,\n    ],\n    webhook: [\n      'url' => 'https://example.com/webhook',\n      'events' => ['change.detected', 'run.completed'],\n    ],\n  );\n\n  var_dump($monitor);\n} catch (APIException $e) {\n  echo $e->getMessage();\n}"
      - lang: CLI
        source: "context-dev monitors update \\\n  --api-key 'My API Key' \\\n  --monitor-id mon_123"
    delete:
      x-hidden: true
      summary: Delete a monitor
      operationId: deleteMonitor
      security:
      - bearerAuth: []
      tags:
      - Monitors
      parameters:
      - schema:
          type: string
          example: mon_123
        required: true
        name: monitor_id
        in: path
      responses:
        '200':
          description: Monitor deleted
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonitorsDeleteMonitorResponse'
        '401':
          $ref: '#/components/responses/MonitorsUnauthorized'
        '404':
          $ref: '#/components/responses/MonitorsNotFound'
      x-codeSamples:
      - lang: JavaScript
        source: "import ContextDev from 'context.dev';\n\nconst client = new ContextDev({\n  apiKey: process.env['CONTEXT_DEV_API_KEY'], // This is the default and can be omitted\n});\n\nconst monitor = await client.monitors.delete('mon_123');\n\nconsole.log(monitor.id);"
      - lang: Python
        source: "import os\nfrom context.dev import ContextDev\n\nclient = ContextDev(\n    api_key=os.environ.get(\"CONTEXT_DEV_API_KEY\"),  # This is the default and can be omitted\n)\nmonitor = client.monitors.delete(\n    \"mon_123\",\n)\nprint(monitor.id)"
      - lang: Go
        source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/context-dot-dev/context-go-sdk\"\n\t\"github.com/context-dot-dev/context-go-sdk/option\"\n)\n\nfunc main() {\n\tclient := contextdev.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tmonitor, err := client.Monitors.Delete(context.TODO(), \"mon_123\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", monitor.ID)\n}\n"
      - lang: Ruby
        source: 'require "context_dev"


          context_dev = ContextDev::Client.new(api_key: "My API Key")


          monitor = context_dev.monitors.delete("mon_123")


          puts(monitor)'
      - lang: PHP
        source: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\nuse ContextDev\\Client;\nuse ContextDev\\Core\\Exceptions\\APIException;\n\n$client = new Client(apiKey: getenv('CONTEXT_DEV_API_KEY') ?: 'My API Key');\n\ntry {\n  $monitor = $client->monitors->delete('mon_123');\n\n  var_dump($monitor);\n} catch (APIException $e) {\n  echo $e->getMessage();\n}"
      - lang: CLI
        source: "context-dev monitors delete \\\n  --api-key 'My API Key' \\\n  --monitor-id mon_123"
  /monitors/{monitor_id}/runs:
    get:
      x-hidden: true
      summary: List monitor runs
      operationId: listMonitorRuns
      security:
      - bearerAuth: []
      tags:
      - Monitors
      parameters:
      - schema:
          type: string
          example: mon_123
        required: true
        name: monitor_id
        in: path
      - schema:
          type: string
          enum:
          - queued
          - running
          - completed
          - failed
          - skipped
          description: Filter runs by lifecycle status.
        required: false
        description: Filter runs by lifecycle status.
        name: status
        in: query
      - schema:
          type: integer
          minimum: 1
          maximum: 100
          description: Maximum number of items to return per page (1-100). Defaults to 25.
        required: false
        description: Maximum number of items to return per page (1-100). Defaults to 25.
        name: limit
        in: query
      - schema:
          type: string
          description: Opaque pagination cursor from a previous response.
        required: false
        description: Opaque pagination cursor from a previous response.
        name: cursor
        in: query
      responses:
        '200':
          description: A paginated list of runs for the monitor
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonitorsListRunsResponse'
        '401':
          $ref: '#/components/responses/MonitorsUnauthorized'
        '404':
          $ref: '#/components/responses/MonitorsNotFound'
      x-codeSamples:
      - lang: JavaScript
        source: "import ContextDev from 'context.dev';\n\nconst client = new ContextDev({\n  apiKey: process.env['CONTEXT_DEV_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.monitors.listRuns('mon_123');\n\nconsole.log(response.data);"
      - lang: Python
        source: "import os\nfrom context.dev import ContextDev\n\nclient = ContextDev(\n    api_key=os.environ.get(\"CONTEXT_DEV_API_KEY\"),  # This is the default and can be omitted\n)\nresponse = client.monitors.list_runs(\n    monitor_id=\"mon_123\",\n)\nprint(response.data)"
      - lang: Go
        source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/context-dot-dev/context-go-sdk\"\n\t\"github.com/context-dot-dev/context-go-sdk/option\"\n)\n\nfunc main() {\n\tclient := contextdev.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.Monitors.ListRuns(\n\t\tcontext.TODO(),\n\t\t\"mon_123\",\n\t\tcontextdev.MonitorListRunsParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Data)\n}\n"
      - lang: Ruby
        source: 'require "context_dev"


          context_dev = ContextDev::Client.new(api_key: "My API Key")


          response = context_dev.monitors.list_runs("mon_123")


          puts(response)'
      - lang: PHP
        source: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\nuse ContextDev\\Client;\nuse ContextDev\\Core\\Exceptions\\APIException;\n\n$client = new Client(apiKey: getenv('CONTEXT_DEV_API_KEY') ?: 'My API Key');\n\ntry {\n  $response = $client->monitors->listRuns(\n    'mon_123', cursor: 'cursor', limit: 1, status: 'queued'\n  );\n\n  var_dump($response);\n} catch (APIException $e) {\n  echo $e->getMessage();\n}"
      - lang: CLI
        source: "context-dev monitors list-runs \\\n  --api-key 'My API Key' \\\n  --monitor-id mon_123"
  /monitors/{monitor_id}/changes:
    get:
      x-hidden: true
      summary: List changes for a monitor
      operationId: listMonitorChanges
      security:
      - bearerAuth: []
      tags:
      - Monitors
      parameters:
      - schema:
          type: string
          example: mon_123
        required: true
        name: monitor_id
        in: path
      - schema:
          type: string
          description: Filter to items that have this tag.
          example: pricing
        required: false
        description: Filter to items that have this tag.
        name: tag
        in: query
      - schema:
          type: string
          format: date-time
          description: Only include items at or after this ISO 8601 timestamp.
          example: '2026-06-01T00:00:00Z'
        required: false
        description: Only include items at or after this ISO 8601 timestamp.
        name: since
        in: query
      - schema:
          type: string
          format: date-time
          description: Only include items before this ISO 8601 timestamp.
          example: '2026-06-28T00:00:00Z'
        required: false
        description: Only include items before this ISO 8601 timestamp.
        name: until
        in: query
      - schema:
          type: integer
          minimum: 1
          maximum: 100
          description: Maximum number of items to return per page (1-100). Defaults to 25.
        required: false
        description: Maximum number of items to return per page (1-100). Defaults to 25.
        name: limit
        in: query
      - schema:
          type: string
          description: Opaque pagination cursor from a previous response.
        required: false
        description: Opaque pagination cursor from a previous response.
        name: cursor
        in: query
      responses:
        '200':
          description: A paginated list of changes for the monitor
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonitorsListChangesResponse'
        '401':
          $ref: '#/components/responses/MonitorsUnauthorized'
        '404':
          $ref: '#/components/responses/MonitorsNotFound'
      x-codeSamples:
      - lang: JavaScript
        source: "import ContextDev from 'context.dev';\n\nconst client = new ContextDev({\n  apiKey: process.env['CONTEXT_DEV_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.monitors.listChanges('mon_123');\n\nconsole.log(response.data);"
      - lang: Python
        source: "import os\nfrom context.dev import ContextDev\n\nclient = ContextDev(\n    api_key=os.environ.get(\"CONTEXT_DEV_API_KEY\"),  # This is the default and can be omitted\n)\nresponse = client.monitors.list_changes(\n    monitor_id=\"mon_123\",\n)\nprint(response.data)"
      - lang: Go
        source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/context-dot-dev/context-go-sdk\"\n\t\"github.com/context-dot-dev/context-go-sdk/option\"\n)\n\nfunc main() {\n\tclient := contextdev.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.Monitors.ListChanges(\n\t\tcontext.TODO(),\n\t\t\"mon_123\",\n\t\tcontextdev.MonitorListChangesParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Data)\n}\n"
      - lang: Ruby
        source: 'require "context_dev"


          context_dev = ContextDev::Client.new(api_key: "My API Key")


          response = context_dev.monitors.list_changes("mon_123")


          puts(response)'
      - lang: PHP
        source: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\nuse ContextDev\\Client;\nuse ContextDev\\Core\\Exceptions\\APIException;\n\n$client = new Client(apiKey: getenv('CONTEXT_DEV_API_KEY') ?: 'My API Key');\n\ntry {\n  $response = $client->monitors->listChanges(\n    'mon_123',\n    cursor: 'cursor',\n    limit: 1,\n    since: new \\DateTimeImmutable('2026-06-01T00:00:00Z'),\n    tag: 'pricing',\n    until: new \\DateTimeImmutable('2026-06-28T00:00:00Z'),\n  );\n\n  var_dump($response);\n} catch (APIException $e) {\n  echo $e->getMessage();\n}"
      - lang: CLI
        source: "context-dev monitors list-changes \\\n  --api-key

# --- truncated at 32 KB (85 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/contextdev/refs/heads/main/openapi/contextdev-monitors-api-openapi.yml