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

# Create Uptime Monitor

> Create a new HTTP uptime monitor

## Body Parameters

<ParamField body="name" type="string" required>
  Monitor name
</ParamField>

<ParamField body="url" type="string" required>
  URL to monitor (must be HTTPS)
</ParamField>

<ParamField body="interval_seconds" type="integer" default="300">
  Check interval: `60`, `300`, `600`, `1800` seconds
</ParamField>

<ParamField body="service_id" type="string">
  Link to a service for automatic status updates
</ParamField>

<ParamField body="expected_status_code" type="integer" default="200">
  Expected HTTP status code
</ParamField>

<ParamField body="timeout_ms" type="integer" default="30000">
  Request timeout in milliseconds
</ParamField>

<ParamField body="consecutive_failure_threshold" type="integer" default="3">
  Number of consecutive failures required before creating an incident. Higher values reduce false positives.
</ParamField>

<ParamField body="incident_cooldown_seconds" type="integer" default="900">
  Minimum seconds between auto-created incidents for this monitor. Prevents duplicate incidents during intermittent failures.
</ParamField>

<ParamField body="auto_incident_severity" type="string">
  Override severity for auto-created incidents: `minor`, `major`, `critical`. Omit to use the default (Major for uptime, Minor for heartbeat).
</ParamField>

## Response

Returns the created monitor object.

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://kodostatus.com/api/v1/uptime-monitors" \
    -H "X-API-Key: your_api_key" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "API Health Check",
      "url": "https://api.example.com/health",
      "interval_seconds": 300,
      "service_id": "uuid"
    }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://kodostatus.com/api/v1/uptime-monitors', {
    method: 'POST',
    headers: {
      'X-API-Key': process.env.KODO_API_KEY,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      name: 'API Health Check',
      url: 'https://api.example.com/health',
      interval_seconds: 300
    })
  });
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "id": "uuid",
    "name": "API Health Check",
    "url": "https://api.example.com/health",
    "interval_seconds": 300,
    "enabled": true
  }
  ```
</ResponseExample>
