> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.usescout.sh/llms.txt.
> For full documentation content, see https://docs.usescout.sh/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.usescout.sh/_mcp/server.

# Create monitor

POST https://core.usescout.sh/v1/monitors
Content-Type: application/json

Reference: https://docs.usescout.sh/api-reference/scout/monitors/monitor-create-v-1-monitors-post

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Scout
  version: 1.0.0
paths:
  /v1/monitors:
    post:
      operationId: monitor-create-v-1-monitors-post
      summary: Create monitor
      tags:
        - subpackage_monitors
      parameters:
        - name: Authorization
          in: header
          description: Your API key, sent as a Bearer token.
          required: true
          schema:
            type: string
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Monitor'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MonitorCreate'
servers:
  - url: https://core.usescout.sh
components:
  schemas:
    WebhookRetryConfig:
      type: object
      properties:
        max_attempts:
          type: integer
          default: 3
          description: Total HTTP attempts (1-5) before giving up.
        backoff_seconds:
          type: integer
          default: 30
          description: Base seconds for exponential backoff between attempts.
      description: Retry policy for outgoing monitor webhooks.
      title: WebhookRetryConfig
    MonitorCreate:
      type: object
      properties:
        query:
          type: string
          description: What to track.
        webhook:
          type:
            - string
            - 'null'
          description: >-
            Optional URL to POST events to. When set, the URL is verified to
            return 2xx before the monitor is created.
        cadence:
          type:
            - string
            - 'null'
          description: >-
            hourly | daily | weekly. Mutually exclusive with `cron`. Defaults to
            'daily' if neither is set.
        cron:
          type:
            - string
            - 'null'
          description: >-
            Standard 5-field cron expression (e.g. '*/15 * * * *'). Mutually
            exclusive with `cadence`.
        mode:
          type: string
          default: diff
          description: '''diff'' (only emit on content change) or ''snapshot'' (always emit).'
        filter_prompt:
          type:
            - string
            - 'null'
          description: >-
            Natural-language predicate. After each run, Claude judges whether
            results satisfy it; only matches trigger the webhook when notify_on
            includes 'match'.
        webhook_secret:
          type:
            - string
            - 'null'
          description: >-
            Write-only. When set, outgoing webhooks include an
            X-Scout-Signature: sha256=<hex> header (HMAC over the raw body) -
            same pattern as Stripe/GitHub webhooks.
        webhook_retry:
          oneOf:
            - $ref: '#/components/schemas/WebhookRetryConfig'
            - type: 'null'
          description: >-
            Retry policy on non-2xx webhook responses. Default: 3 attempts, 30s
            exponential backoff.
        notify_on:
          type:
            - array
            - 'null'
          items:
            type: string
          description: >-
            Which event types fire the webhook. Composable subset of: 'change'
            (content changed / snapshot), 'match' (filter_prompt returned true),
            'error' (run errored). Default: ['change'].
        country:
          type: string
          default: us
          description: Two-letter country code.
        language:
          type: string
          default: en
          description: UI language code.
        metadata:
          type:
            - object
            - 'null'
          additionalProperties:
            description: Any type
          description: Arbitrary caller metadata.
      required:
        - query
      title: MonitorCreate
    MonitorLastResult:
      type: object
      properties:
        event_id:
          type: string
        results_count:
          type: integer
        ran_at:
          type: string
        status:
          type:
            - string
            - 'null'
      required:
        - event_id
        - results_count
        - ran_at
      title: MonitorLastResult
    Monitor:
      type: object
      properties:
        id:
          type: string
          description: Monitor identifier.
        query:
          type: string
          description: The tracked query.
        cadence:
          type: string
          description: hourly, daily or weekly.
        cron:
          type:
            - string
            - 'null'
          description: Cron expression (overrides cadence when present).
        mode:
          type: string
          default: diff
          description: '''diff'' or ''snapshot''.'
        filter_prompt:
          type:
            - string
            - 'null'
          description: Natural-language predicate evaluated by Claude.
        notify_on:
          type: array
          items:
            type: string
          description: 'Subset of: change | match | error.'
        webhook_max_attempts:
          type: integer
          default: 3
        webhook_backoff_seconds:
          type: integer
          default: 30
        webhook_secret_set:
          type: boolean
          default: false
          description: >-
            True if a webhook_secret is configured (the secret itself is never
            returned).
        webhook:
          type:
            - string
            - 'null'
          description: Where change events are delivered, if set.
        country:
          type: string
        language:
          type: string
        status:
          type: string
          description: active or paused.
        metadata:
          type: object
          additionalProperties:
            description: Any type
          description: Arbitrary caller metadata.
        createdAt:
          type: string
          description: ISO-8601 creation timestamp.
        lastRunAt:
          type:
            - string
            - 'null'
          description: ISO-8601 timestamp of the most recent run.
        nextRunAt:
          type:
            - string
            - 'null'
          description: ISO-8601 timestamp of the next run, or null when paused.
        runs:
          type: integer
          description: How many times the monitor has run.
        last_webhook_status:
          type:
            - integer
            - 'null'
          description: HTTP status of the most recent webhook delivery, or null.
        last_webhook_at:
          type:
            - number
            - 'null'
          format: double
          description: Epoch seconds the last webhook delivery completed.
        last_webhook_error:
          type:
            - string
            - 'null'
          description: >-
            Error message from the last webhook delivery, when it failed; null
            on success or when no webhook is set.
        last_result:
          oneOf:
            - $ref: '#/components/schemas/MonitorLastResult'
            - type: 'null'
          description: Summary of the most recent monitor event, or null.
      required:
        - id
        - query
        - cadence
        - country
        - language
        - status
        - metadata
        - createdAt
        - runs
      title: Monitor
    ValidationErrorLocItems:
      oneOf:
        - type: string
        - type: integer
      title: ValidationErrorLocItems
    ValidationErrorCtx:
      type: object
      properties: {}
      title: ValidationErrorCtx
    ValidationError:
      type: object
      properties:
        loc:
          type: array
          items:
            $ref: '#/components/schemas/ValidationErrorLocItems'
        msg:
          type: string
        type:
          type: string
        input:
          description: Any type
        ctx:
          $ref: '#/components/schemas/ValidationErrorCtx'
      required:
        - loc
        - msg
        - type
      title: ValidationError
    HTTPValidationError:
      type: object
      properties:
        detail:
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
      title: HTTPValidationError
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: Your API key, sent as a Bearer token.

```

## SDK Code Examples

```python Monitors_monitor_create_v1_monitors_post_example
import requests

url = "https://core.usescout.sh/v1/monitors"

payload = {
    "query": "anthropic new model release",
    "webhook": "https://example.com/hooks/scout",
    "cadence": "daily",
    "country": "us",
    "language": "en",
    "metadata": { "team": "research" }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Monitors_monitor_create_v1_monitors_post_example
const url = 'https://core.usescout.sh/v1/monitors';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"query":"anthropic new model release","webhook":"https://example.com/hooks/scout","cadence":"daily","country":"us","language":"en","metadata":{"team":"research"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Monitors_monitor_create_v1_monitors_post_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://core.usescout.sh/v1/monitors"

	payload := strings.NewReader("{\n  \"query\": \"anthropic new model release\",\n  \"webhook\": \"https://example.com/hooks/scout\",\n  \"cadence\": \"daily\",\n  \"country\": \"us\",\n  \"language\": \"en\",\n  \"metadata\": {\n    \"team\": \"research\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Monitors_monitor_create_v1_monitors_post_example
require 'uri'
require 'net/http'

url = URI("https://core.usescout.sh/v1/monitors")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"query\": \"anthropic new model release\",\n  \"webhook\": \"https://example.com/hooks/scout\",\n  \"cadence\": \"daily\",\n  \"country\": \"us\",\n  \"language\": \"en\",\n  \"metadata\": {\n    \"team\": \"research\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java Monitors_monitor_create_v1_monitors_post_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://core.usescout.sh/v1/monitors")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"query\": \"anthropic new model release\",\n  \"webhook\": \"https://example.com/hooks/scout\",\n  \"cadence\": \"daily\",\n  \"country\": \"us\",\n  \"language\": \"en\",\n  \"metadata\": {\n    \"team\": \"research\"\n  }\n}")
  .asString();
```

```php Monitors_monitor_create_v1_monitors_post_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://core.usescout.sh/v1/monitors', [
  'body' => '{
  "query": "anthropic new model release",
  "webhook": "https://example.com/hooks/scout",
  "cadence": "daily",
  "country": "us",
  "language": "en",
  "metadata": {
    "team": "research"
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Monitors_monitor_create_v1_monitors_post_example
using RestSharp;

var client = new RestClient("https://core.usescout.sh/v1/monitors");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"query\": \"anthropic new model release\",\n  \"webhook\": \"https://example.com/hooks/scout\",\n  \"cadence\": \"daily\",\n  \"country\": \"us\",\n  \"language\": \"en\",\n  \"metadata\": {\n    \"team\": \"research\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Monitors_monitor_create_v1_monitors_post_example
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "query": "anthropic new model release",
  "webhook": "https://example.com/hooks/scout",
  "cadence": "daily",
  "country": "us",
  "language": "en",
  "metadata": ["team": "research"]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://core.usescout.sh/v1/monitors")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```