Media Luna API
The Media Luna REST API gives you programmatic access to monitors, incidents, metrics, notification rules, status pages, and more. All API access is over HTTPS and all data is sent and received as JSON.
https://api.media-luna.co/api/v1
🔐 Authentication
The Developer API uses API key authentication. Include your API key in the Authorization header as a Bearer token.
Authorization: Bearer sk_live_abc123def456...
API keys can be created from the dashboard under Settings → API Keys. Keys are prefixed with sk_ and are scoped to specific permissions:
read:monitorswrite:monitorsdelete:monitorsread:incidentsread:metricsread:accountwrite:accountread:maintenancewrite:maintenance⏱️ Rate Limiting
API requests are rate-limited to ensure fair usage. Rate limit information is included in response headers.
X-RateLimit-LimitX-RateLimit-RemainingX-RateLimit-Reset⚠️ Errors
Media Luna uses conventional HTTP response codes. Codes in the 2xx range indicate success, 4xx indicate client errors, and 5xx indicate server errors.
📄 Pagination
List endpoints support offset-based pagination using skip and limit query parameters. Responses are plain JSON arrays — there is no envelope or metadata wrapper.
📡 Monitors
Monitors represent the endpoints you want to check. Each monitor has a type (HTTP, TCP, DNS, SMTP, SSH, PING, or PUSH), a target URL or host, check interval, and assigned probe regions. Monitors generate incidents when they detect failures.
List all monitors
🔑 API Key — read:monitorsReturns a paginated list of monitors for your account. Supports filtering by status, type, tags, and search queries.
updownpausedpendingHTTPTCPDNSSMTPSSHPINGPUSHCreate a monitor
🔑 API Key — write:monitorsCreates a new monitor with the given parameters. If no region_ids are specified, the first active region is auto-assigned.
HTTPHEADTCPDNSSMTPSSHPINGPUSHhttps://example.com)GETPOSTPUTPATCHDELETEHEADAAAAACNAMEMXNSTXTRetrieve a monitor
🔑 API Key — read:monitorsReturns a single monitor by ID, including current status, assigned regions, and tags.
Update a monitor
🔑 API Key — write:monitorsUpdates a monitor's configuration. Only include the fields you want to change.
Delete a monitor
🔑 API Key — delete:monitorsPermanently deletes a monitor and all associated metrics, incidents, and check history.
Pause a monitor
🔒 JWT — Editor+Pauses monitoring and auto-resolves any active incidents for this monitor.
Resume a monitor
🔒 JWT — Editor+Resumes monitoring for a previously paused monitor.
Get check history
🔒 JWTReturns historical check results for a monitor, including response times, status codes, and regional data.
Bulk operations
🔒 JWT — Editor+Perform bulk operations on multiple monitors at once: delete, pause, resume, add or remove tags.
deletepauseresumeadd_tagsremove_tags💓 Push Monitors
Push monitors (also called heartbeat monitors) work in reverse: your service calls Media Luna on a schedule to confirm it's alive. If a ping isn't received within the expected interval plus grace period, an incident is created. Identify your monitor with its unique push_token, visible in the dashboard.
Submit a heartbeat ping
🔓 Public — push token authSignals that your service is alive. Marks the monitor as UP and records a metric. No body required. Authentication is via the unique push_token embedded in the URL — do not share it publicly.
Get heartbeat monitor status
🔓 Public — push token authReturns the current status of a push monitor. Useful for debugging your heartbeat integration.
🔥 Incidents
Incidents are automatically created when a monitor detects a failure. Each incident has a lifecycle: TRIGGERED → ACKNOWLEDGED → RESOLVED. Incidents include a timeline of events for post-mortem analysis.
List all incidents
🔑 API Key — read:incidentsReturns a list of incidents, optionally filtered by monitor, incident type, or time range.
DOWNSSL_EXPIRYPERFORMANCERetrieve an incident
🔑 API Key — read:incidentsReturns full incident details including the complete event timeline for post-mortem analysis.
Get incident counts
🔒 JWTReturns efficient counts of incidents by type and status. Optimized for dashboard rendering.
Acknowledge an incident
🔒 JWT — Editor+Marks an incident as acknowledged. This records an ACKNOWLEDGED event in the timeline and suppresses further notifications.
Snooze an incident
🔒 JWT — Editor+Temporarily snoozes notifications for an incident for a specified duration.
Add timeline comment
🔒 JWT — Editor+Adds a COMMENT event to the incident timeline. Useful for post-mortem notes and investigation tracking.
📋 Notification Rules
Notification rules control when and how you get alerted. Rules define conditions (status changes, response time thresholds, consecutive failures) and route notifications to specific channels.
List notification rules
🔒 JWTReturns all notification rules for your account.
Create a notification rule
🔒 JWT — Editor+Creates a new notification rule with specified conditions and channels.
STATUSRESPONSE_TIMEeqgtltgtelteGet a notification rule
🔒 JWTReturns a single notification rule by ID with all conditions and channels.
Update a notification rule
🔒 JWT — Editor+Partially updates a notification rule. Only include fields you want to change.
Delete a notification rule
🔒 JWT — Editor+Permanently deletes a notification rule.
🔔 Notification Channels
Notification channels define how alerts are delivered — via email, Slack, PagerDuty, webhooks, SMS, or Telegram. Channels are referenced by notification rules.
List notification channels
🔒 JWTReturns all configured notification channels for your account.
Create a notification channel
🔒 JWT — Editor+Creates a new notification channel.
EMAILSMSSLACKPAGERDUTYWEBHOOKTELEGRAMTest a notification channel
🔒 JWT — Editor+Sends a test notification through the channel to verify it's configured correctly.
📊 Metrics
Access detailed performance metrics for your monitors including response times, uptime percentages, and time-series data broken down by probe region.
Get monitor metrics
🔑 API Key — read:metricsReturns aggregated metrics for a specific monitor over a given time range.
Get metrics summary
🔒 JWTReturns aggregated metrics summary including average response time, uptime %, and p95 latency.
Get time-series data
🔒 JWTReturns time-bucketed metrics data for charting. Specify bucket size for the desired granularity.
Account metrics overview
🔒 JWTReturns a high-level overview of all monitors' health across your entire account.
🌍 Regions
Probe regions represent geographic locations where health checks are executed. Monitors are assigned to one or more regions. Regions are dynamic — new probes register on deployment.
List probe regions
🔓 PublicReturns all active probe regions. No authentication required.
Get per-region latency
🔒 JWTReturns latency breakdown by region for a specific monitor. Useful for geographic performance analysis.
📃 Status Pages
Public-facing status pages let your users see the health of your services. Each page gets a unique subdomain and can display selected monitors.
List status pages
🔒 JWTReturns all status pages for your account.
Create a status page
🔒 JWT — Editor+Creates a new public status page.
🔧 Maintenance Windows
Schedule maintenance windows to suppress incident creation and notifications during planned maintenance periods.
List maintenance windows
🔒 JWT 🔑 API Key —read:maintenance
Returns all maintenance windows for your account. Use ?active_only=true to filter to enabled windows only.
falseGet active maintenance windows
🔒 JWT 🔑 API Key —read:maintenance
Returns maintenance windows that are currently in effect — enabled and the current time is between start_time and end_time.
Get a maintenance window
🔒 JWT 🔑 API Key —read:maintenance
Returns detailed information about a specific maintenance window.
Create a maintenance window
🔒 JWT — Editor+ 🔑 API Key —write:maintenance
Creates a scheduled maintenance window. During active windows, incident creation and notifications are suppressed for affected monitors.
falseapplies_to_all_monitors is true)falsedailyweeklymonthlytrueUpdate a maintenance window
🔒 JWT — Editor+ 🔑 API Key —write:maintenance
Update a maintenance window. Partial update — only include fields to change.
Delete a maintenance window
🔒 JWT — Editor+ 🔑 API Key —write:maintenance
Permanently delete a maintenance window.
Toggle maintenance window
🔒 JWT — Editor+ 🔑 API Key —write:maintenance
Toggle a maintenance window between enabled and disabled without a full update.
Maintenance Window Response Object
daily, weekly, or monthly👥 Account & Users
Manage your account settings, team members, and API keys. Users have roles: Admin (full access), Editor (manage monitors & incidents), and Viewer (read-only).
Get account info
🔑 API Key — read:accountReturns account details including plan, usage, and settings.
List team members
🔒 JWTReturns all users in your account with their roles.
Invite a team member
🔒 JWT — AdminSends an invitation email to a new team member.
ADMINEDITORVIEWERCreate an API key
🔒 JWTCreates a new API key. The unhashed key is returned only once in the response — store it securely.
read:monitorswrite:monitorsdelete:monitorsread:incidentsread:metricsread:accountwrite:accountread:maintenancewrite:maintenance💳 Billing & Plans
Manage subscriptions, view plan details, and check usage limits. Billing is powered by Stripe.
List available plans
🔓 PublicReturns all available subscription plans with features and limits.
Get current subscription
🔒 JWTReturns current subscription status, plan, and billing cycle details.
Get usage & limits
🔒 JWTReturns current resource usage compared to plan limits (monitors, users, regions, etc.).
🔗 Webhooks
Outbound webhooks let Media Luna push real-time events to your own systems. Configure a webhook channel (see Notification Channels) and it will receive HTTP POST requests whenever a notification rule fires.
Event Types
Each webhook payload includes an event field identifying the type of event:
incident.triggeredincident.acknowledgedincident.resolvedmonitor.recoveredPayload Format
Webhook payloads are sent as HTTP POST with Content-Type: application/json. Your endpoint must respond with a 2xx status within 10 seconds.
id, name, url, typeid, incident_type, message, status, sent_atVerification
To verify that a webhook request originated from Media Luna, compare the incoming payload against a known-good test notification sent from the dashboard (Notification Channels → Test). In a future release, webhook signatures will be added via an X-Media-Luna-Signature header.