What is API monitoring?
API monitoring is a specialised type of monitoring that allows you to validate the actual content of your API responses, not just whether the endpoint is reachable. While standard HTTP monitors check if your server responds with a successful status code, API monitors go further by examining the JSON response body and verifying that specific fields contain expected values.
This is particularly useful for:
Monitoring AI API Endpoints - Check response times, validating model outputs, and enforcing usage limits to catch failures before users do
Data integrity checks - Ensure critical data fields are present and have valid values
Third-party API dependencies - Monitor external APIs your application relies on
Microservices health - Validate that each service in your architecture is functioning correctly
Get started
To create an API monitor:
Go to the UptimeRobot dashboard
Click New on Monitors page
Select API Monitoring as the monitor type
Enter the URL of your API endpoint
Expand Request Details to configure your authentication and payload data if necessary
Configure your assertions (details below)
Set up your notification preferences
Click Create Monitor
Note: The API endpoint must return a valid JSON response for assertions to work. If the endpoint returns not valid JSON, you will get an alert with Invalid JSON as the incident root cause.
Configure request details
API monitors support all the same request configuration options as HTTP monitors:
HTTP Method
Choose the HTTP method for your request: GET (default), POST, PUT, PATCH, DELETE, HEAD, or OPTIONS.
Authentication
If your API requires authentication, you can configure:
HTTP Basic - Username and password sent in the Authorization header
Digest - More secure challenge-response authentication
Bearer Token - Token-based authentication (e.g., JWT, OAuth tokens)
Request Body
For POST, PUT, and PATCH requests, you can include a request body:
Key-Value pairs - Simple form data format
Raw JSON - Send a JSON payload directly
Custom Headers
Add custom HTTP headers to your request (e.g., Content-Type: application/json, X-API-Key: your-api-key).
Assertions
Assertions are the core feature of UptimeRobot API monitoring. They allow you to define conditions that must be met for the monitor to be considered "up".
JSONPath syntax
Use JSONPath expressions to specify which field to check in the response:
$.status- Root-level field named "status"$.data.user.name- Nested field access$.items[0].id- First element of an array$.results[*].active- All "active" fields in the results array
Comparison operators
Operator | Description | Example |
Equals | Field value must exactly match the target |
|
Not equals | Field value must not match the target |
|
Contains | Field value must contain the target string |
|
Not contains | Field value must not contain the target string |
|
Greater than | Numeric field must be greater than target |
|
Less than | Numeric field must be less than target |
|
Is null | Field must be null or not exist |
|
Is not null | Field must exist and not be null |
|
Combining assertions
You can add up to 5 assertions per monitor and combine them using:
AND - All assertions must pass for the monitor to be "up"
OR - At least one assertion must pass for the monitor to be "up"
Note: You can combine all these assertion features with other type of monitoring checks we already provide in HTTP monitoring such as response time alerts.
General Usage Examples
Health check endpoint
Monitor a typical health check endpoint that returns:
{
"status": "healthy",
"database": "connected",
"cache": "connected"
}
Assertions (using AND):
$.statusequalshealthy$.databaseequalsconnected$.cacheequalsconnected
AI Conversation Moderator Service
Monitor if your AI moderator behave the way you expect.
{
"allowed": false,
"reason": "disallowed_content",
"categories": ["fraud", "scam"],
"action": "block",
"message": "This request violates content policy"
}Assertions (using AND):
$.allowedequalsfalse$.actionequalsblock$.messageis not null
AI Image Generation Service
Monitor an image generation API (like DALL-E, Stable Diffusion):
{
"service": "image-generation",
"status": "operational",
"gpu_available": true,
"queue_position": 0,
"models": {
"sdxl": "ready",
"dalle-3": "ready"
},
"avg_generation_time_seconds": 8.5
}
Assertions (using AND):
$.statusequalsoperational$.gpu_availableequalstrue$.queue_positionless than100$.avg_generation_time_secondsless than60
AI Content Summary Service
Monitor if your content summary API wrapper for contentn summary AI works as you expect:
{
"request_id": "req_a73c",
"status": "success",
"output": "Here is the summary...",
"usage": {
"prompt_tokens": 1200,
"completion_tokens": 180,
"total_tokens": 1380
},
"cost": {
"currency": "USD",
"amount": 0.00483
},
"provider": "anthropic",
"rate_limit": {
"remaining": 12
},
"timestamp": "2026-02-05T12:42:10Z"
}Assertions (using AND):
$.statusequalssuccess$.outputis not null$.cost.amountgreater than0$.provideris not nullResponse time threshold set to 3000ms
E-commerce product availability
Monitor a product API to ensure items are in stock:
{
"product": {
"inventory": {
"available": 150
}
}
}Assertion: $.product.inventory.available greater than 0
Error monitoring
Monitor an API that reports error counts:
{
"metrics": {
"errorRate": 0.05
}
}Assertion: $.metrics.errorRate less than 1
Third-party API status
Monitor a third-party service status endpoint:
{
"status": {
"indicator": "none"
}
}Assertions (using OR):
$.status.indicatorequalsnone$.status.indicatorequalsminor
AI Service Credits & Usage Check
If you are using an AI model provider, you could monitor account credits and usage via their API:
{
"data": {
"label": "My API Key",
"usage": 15.42,
"limit": 100,
"is_free_tier": false,
"rate_limit": {
"requests": 200,
"interval": "10s"
}
}
}Assertions (using AND):
$.data.usageless than90(alert before hitting limit)$.data.limitgreater than0$.data.rate_limit.requestsgreater than0
AI Service Models Availability
Monitor available models:
{
"data": [
{
"id": "anthropic/claude-3.5-sonnet",
"name": "Claude 3.5 Sonnet",
"pricing": {
"prompt": "0.000003",
"completion": "0.000015"
}
}
]
}
Endpoint: GET https://openrouter.ai/api/v1/models
Assertions (using OR):
$.data[*].idcontainsanthropic$.data[*].idcontainsopenai
AI Completion Response Time Monitoring
Track API response times (monitor the time between request and response):
{
"id": "gen-abc123",
"model": "anthropic/claude-3.5-sonnet",
"created": 1234567890
}Assertions:
Response time less than 5000 milliseconds (alert on slow responses)
$.id is not null (request completed)
AI Model Pricing Change Detection
If you are using a unified model provider like OpenRouter, you can monitor pricing for cost control:
{
"data": [
{
"id": "anthropic/claude-3.5-sonnet",
"pricing": {
"prompt": "0.000003",
"completion": "0.000015"
}
}
]
}Assertions:
$.data[?(@.id == 'anthropic/claude-3.5-sonnet')].pricing.prompt equals 0.000003 (alert on price changes)
$.data[?(@.id == 'anthropic/claude-3.5-sonnet')].pricing.completion equals 0.000015
