Create a monitor Beta
POST /api/v1/monitors
The body is a settings object. Only url is required; anything you leave out gets its default.
Needs an X-API-Key header whose owner has permission to manage uptime monitors in the app. The call counts once against your daily quota. See Monitoring API: getting started for authentication, rate limits and errors.
- A first check runs straight away, so the response already shows a status.
- If you leave out
recipients, the key's owner gets the alerts. Send[]for no email alerts. - A URL without a scheme gets
https://added. - Leave
typeout for a website check. For a port, ping, DNS or mail check, settypeand send a bare host asurl. - Send
contactsandteamsto alert contacts and teams as well as workspace members.
Request
Response
201 Created with the full monitor, in the same shape as Get a monitor.
201 · application/json
- {
- "monitor": {
- "id": "mon_79ce3cf9c4fa56e98af4",
- "name": "Checkout",
- "url": "https://shop.example.com/checkout",
- "status": "up",
- "statusCode": 200,
- "responseMs": 231,
- "intervalMinutes": 15,
- "regions": ["default", "eu"],
- "tags": ["production", "shop"],
- "recipients": [{ "id": 42, "name": "Sam Taylor", "email": "[email protected]" }],
- …
- },
- "usage": { "used": 13, "dailyLimit": 100, "tier": "free" }
- }
Errors
| Status | When |
|---|---|
400 | A setting isn't valid (the message says which), or the URL is a private, local or blocked address, or its domain can't be reached. |
403 | The key's owner doesn't have permission to manage uptime monitors. |
409 | The same target is already monitored in your workspace (the type, host and port all match), or your plan's monitor limit is reached. |
Related
- Monitor settings: every setting and its allowed values
- Setting options: the allowed values, from the API
- Update a monitor: change it later