Skip to main content

Monitors API

Learn how to programmatically create and manage monitors using the Bareuptime API.

Prerequisites

Before you start, you'll need to:

  1. Generate an API Key: Visit https://app.bareuptime.co/api-keys
  2. Log in to your Bareuptime account
  3. Click "Generate New Key" and copy the API key
  4. Store securely - you won't be able to see it again

Base URL

https://api.bareuptime.co/v1

Authentication

Include your API key in all requests:

Authorization: Bearer YOUR_API_KEY

Create a Monitor

Endpoint

POST /monitors

Request Body

{
"name": "My Website",
"url": "https://example.com",
"check_interval": "5min",
"type": "get",
"request_body": "",
"request_headers": "",
"monitor_type": "http"
}

Field Descriptions

FieldTypeRequiredDescription
namestringMonitor name
urlstringURL to monitor (must use HTTPS)
check_intervalstringCheck intervals - Free: 10min, 20min, 30min, 1hr | Premium: 1min, 5min + Free | Advanced: 6hr | Email: 24hr
typestringHTTP method: get, post, put, patch, delete (default: get)
request_bodystringRequest body for POST/PUT/PATCH requests
request_headersstringCustom HTTP headers as JSON string
monitor_typestringMonitor type: http, keyword, advanced_page_monitoring, email_domain (default: http)

Monitor Types

TypeDescriptionPlan RequiredCheck IntervalsFeatures
httpBasic HTTP/HTTPS monitoringFree/PremiumFree: 10min-1hr | Premium: 1min-1hrURL availability, response time, status codes, SSL monitoring (daily)
keywordContent monitoringFree/PremiumFree: 10min-1hr | Premium: 1min-1hrHTTP monitoring + keyword/content checking, SSL monitoring (daily)
advanced_page_monitoringComprehensive page analysisPremium1hr only (fixed)Page load time, domain expiry, robot blockage detection, SSL monitoring (daily)
email_domainEmail domain healthPremium1hr only (fixed)MX record validation, spam reputation checking, SSL monitoring (daily)

Notes

  • Timeout: Fixed at 5 seconds for all monitors
  • Retry Count: Fixed at 3 retries for all monitors
  • Premium HTTP Methods: post, put, patch, delete require premium plan
  • Premium Monitor Types: advanced_page_monitoring, email_domain require premium plan
  • Free Plan: Limited to 10min, 20min, 30min, 1hr intervals
  • Premium Plan: Can use 1min, 5min + all free plan intervals
  • SSL Monitoring: Automatic SSL certificate monitoring (daily) on all endpoints
  • Advanced Page Monitoring: Uses 1hr intervals (optimized for comprehensive analysis)
  • Email Domain Monitoring: Uses 1hr intervals (optimized for daily infrastructure checks)

Available Locations

Location CodeRegionFree PlanPremium Plan
iowaIowa, USA
germanyGermany (Falkenstein)
us-westUS West (California)
asiaAsia Pacific (Singapore)

Examples

Basic HTTP Monitor

Basic HTTP Monitor

curl -X POST https://api.bareuptime.co/v1/monitors \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Company Website",
"url": "https://company.com",
"check_interval": "5min",
"type": "get",
"monitor_type": "http"
}'

API Endpoint with Authentication

curl -X POST https://api.bareuptime.co/v1/monitors \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "API Health Check",
"url": "https://api.company.com/health",
"check_interval": "1min",
"type": "get",
"request_headers": "{\"Authorization\": \"Bearer api-token-123\", \"X-API-Version\": \"v1\"}"
}'

POST Request Monitor

curl -X POST https://api.bareuptime.co/v1/monitors \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "User Registration Test",
"url": "https://api.company.com/test/register",
"check_interval": "10min",
"type": "post",
"monitor_type": "http",
"request_headers": "{\"Content-Type\": \"application/json\", \"X-Test-Mode\": \"true\"}",
"request_body": "{\"test\": true, \"email\": \"test@example.com\"}"
}'

Advanced Page Monitoring (Premium)

curl -X POST https://api.bareuptime.co/v1/monitors \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Complete Website Analysis",
"url": "https://mywebsite.com",
"check_interval": "1hr",
"type": "get",
"monitor_type": "advanced_page_monitoring"
}'

Email Domain Monitoring (Premium)

curl -X POST https://api.bareuptime.co/v1/monitors \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Company Email Domain",
"url": "https://company.com",
"check_interval": "1hr",
"type": "get",
"monitor_type": "email_domain"
}'

Response Format

Success Response (201 Created)

{
"id": 12345,
"name": "My Website",
"url": "https://example.com",
"user_id": 67890,
"type": "get",
"timeout": 5,
"retry_count": 3,
"partition_key": "user_67890",
"check_interval": "5min",
"is_active": true,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z",
"request_body": "",
"is_public": false,
"expired_at": null,
"request_headers": "",
"monitor_type": "http"
}

Error Responses

  1. 400 Bad Request - Invalid request data: invalid check interval

  2. 402 Payment Required - Premium feature required: Premium plan required for POST, PATCH, PUT, DELETE methods or Premium plan required for advanced monitor types or UnsupportedPlan

  3. 401 Unauthorized - Invalid or missing API key: Unauthorized

Getting Help