Add Uptime Monitoring to Your API in 5 Minutes
Your API is down. You find out from a customer on Twitter.
Traditional uptime monitoring gives you dashboards, charts, incident timelines. What you actually need is a webhook that fires when something breaks and the ability to create monitors from code.
Pulse is headless uptime monitoring. No dashboard. No UI. Just an API.
The 5-Minute Version
Create a monitor, configure alerts, done.
Step 1: Create a monitor
curl -X POST https://api.solenoid.systems/v1/pulse \
-H "Authorization: Bearer sm_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"url": "https://api.example.com/health",
"interval": 60000,
"webhook_url": "https://your-app.com/webhooks/uptime"
}'
Response:
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"url": "https://api.example.com/health",
"interval": 60000,
"status": "unknown",
"active": true
}
Your endpoint is now checked every 60 seconds.
Step 2: Get alerted when it goes down
When your endpoint fails, Pulse POSTs to your webhook:
{
"monitor_id": "550e8400-e29b-41d4-a716-446655440000",
"url": "https://api.example.com/health",
"status": "down",
"consecutive_failures": 3,
"latency_ms": 10042,
"error": "Request timeout after 10000ms",
"timestamp": 1706123456789
}
Handle it however you want. Send a Slack message. Page on-call. Fire a Relay webhook to escalate after 5 minutes.
Step 3: Check status programmatically
curl https://api.solenoid.systems/v1/pulse/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer sm_your_api_key"
{
"monitor_id": "550e8400-e29b-41d4-a716-446655440000",
"url": "https://api.example.com/health",
"status": "up",
"latency_ms": 142,
"last_checked_at": 1706123456,
"consecutive_failures": 0
}
No dashboard needed. Query status in your own admin panel or CI/CD pipeline.
Handling the Edge Cases
POST requests: Monitor endpoints that require POST:
curl -X POST https://api.solenoid.systems/v1/pulse \
-H "Authorization: Bearer sm_your_api_key" \
-d '{
"url": "https://api.example.com/health",
"method": "POST",
"body": "{\"check\": \"health\"}",
"interval": 60000
}'
Custom headers: Include authentication (Pro/Scale tiers):
curl -X POST https://api.solenoid.systems/v1/pulse \
-H "Authorization: Bearer sm_your_api_key" \
-d '{
"url": "https://api.example.com/admin/health",
"headers": {"X-Admin-Token": "your_secret"},
"interval": 60000
}'
Reduce alert noise: Only alert after 3 consecutive failures:
curl -X POST https://api.solenoid.systems/v1/pulse \
-H "Authorization: Bearer sm_your_api_key" \
-d '{
"url": "https://api.example.com/health",
"interval": 60000,
"consecutive_threshold": 3,
"cooldown_ms": 600000,
"webhook_url": "https://your-app.com/webhooks/uptime"
}'
This requires 3 failures before alerting and waits 10 minutes before alerting again.
Get recovery notifications: Know when your service comes back up:
curl -X POST https://api.solenoid.systems/v1/pulse \
-H "Authorization: Bearer sm_your_api_key" \
-d '{
"url": "https://api.example.com/health",
"interval": 60000,
"webhook_url": "https://your-app.com/webhooks/uptime",
"notify_recovery": true
}'
You’ll receive webhooks for both DOWN and UP transitions.
Alert Integration
Slack notifications:
// Your webhook handler
app.post('/webhooks/uptime', async (req, res) => {
const { url, status, consecutive_failures, error } = req.body
if (status === 'down') {
await fetch(process.env.SLACK_WEBHOOK_URL, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
text: `🔴 ${url} is DOWN`,
blocks: [
{
type: 'section',
text: {
type: 'mrkdwn',
text: `*${url}* has failed ${consecutive_failures} times\n\nError: ${error}`
}
}
]
})
})
}
res.json({ received: true })
})
PagerDuty escalation:
app.post('/webhooks/uptime', async (req, res) => {
const { url, status, consecutive_failures } = req.body
if (status === 'down' && consecutive_failures >= 5) {
await fetch('https://events.pagerduty.com/v2/enqueue', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
routing_key: process.env.PAGERDUTY_KEY,
event_action: 'trigger',
payload: {
summary: `${url} is down`,
severity: 'critical',
source: 'pulse'
}
})
})
}
res.json({ received: true })
})
Infrastructure-as-Code Monitoring
Create monitors from your deployment scripts:
// After deploying a new service
async function addMonitoring(serviceUrl: string) {
const response = await fetch('https://api.solenoid.systems/v1/pulse', {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.SOLENOID_API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: `${serviceUrl}/health`,
interval: 60000,
webhook_url: process.env.WEBHOOK_URL
})
})
const monitor = await response.json()
console.log(`Monitor created: ${monitor.id}`)
return monitor.id
}
// After destroying a service
async function removeMonitoring(monitorId: string) {
await fetch(`https://api.solenoid.systems/v1/pulse/${monitorId}`, {
method: 'DELETE',
headers: { 'Authorization': `Bearer ${process.env.SOLENOID_API_KEY}` }
})
}
Monitors exist and die with the services they monitor. No orphaned monitors cluttering a dashboard.
AI Agent Integration
Pulse is designed for Claude, ChatGPT, and other AI assistants:
Create an uptime monitor for https://api.myapp.com/health that checks every minute and alerts to my webhook
The AI calls the Pulse API directly. No dashboard navigation. No screenshot instructions.
Why Not Build This Yourself?
Uptime monitoring is straightforward code. Cron job pings URLs. Records failures. Sends alerts.
Until it fails. Your monitoring system goes down. Now you need monitoring for your monitoring.
Or your monitoring saturates network egress. Costs spike. You optimize by reducing check frequency. Now you detect outages slower.
Pulse runs on Cloudflare’s edge. Distributed health checks from multiple regions. If one data center fails, monitors continue from others.
You define what to monitor. Cloudflare ensures the checks run.
Try It Now
Free tier: 10,000 calls to prototype. Pro tier ($49.99/mo) and above: unlimited Pulse usage.
# Create a monitor
curl -X POST https://api.solenoid.systems/v1/pulse \
-H "Authorization: Bearer sm_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"url": "https://httpstat.us/200",
"interval": 60000,
"webhook_url": "https://webhook.site/your-unique-id"
}'
# Check status immediately
curl -X POST https://api.solenoid.systems/v1/pulse/{monitor_id}/check \
-H "Authorization: Bearer sm_your_api_key"
Watch webhook.site for the UP notification. Change the URL to https://httpstat.us/500 and watch the DOWN alert arrive.
Your uptime monitoring, in three curl commands.