CINXE.COM
API Documentation | UptimeRobot
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta http-equiv="X-UA-Compatible" content="IE=edge"><title>API Documentation | UptimeRobot</title><meta name="description" content="UptimeRobot has an easy-to-use REST API. Responses are provided as XML, JSON or JSON-P. Integrate UptimeRobot with your app easily!"><meta name="keywords" content="uptime, uptime monitor, uptime robot"><meta name="robots" content="index, follow"><base href="https://uptimerobot.com/"><meta name="theme-color" content="#131a26"><meta name="theme_color" content="#131a26"><meta name="msapplication-navbutton-color" content="#131a26"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="#131a26"><link rel="canonical" href="https://uptimerobot.com/api/"><link rel="shortcut icon" type="image/x-icon" href="/favicon.ico"><meta property="og:image" content="https://uptimerobot.com/assets/images/ogimage.png"><meta name="twitter:card" content="summary_large_image"><meta name="twitter:site" content="@uptimerobot"><meta name="twitter:creator" content="@uptimerobot"><meta name="twitter:title" content="API Documentation | UptimeRobot"><meta name="twitter:description" content="UptimeRobot has an easy-to-use REST API. Responses are provided as XML, JSON or JSON-P. Integrate UptimeRobot with your app easily!"><meta name="twitter:image" content="https://uptimerobot.com/assets/images/ogimage.png"><style type="text/css">html{font-family:Roboto,Arial,sans-serif;font-size:18px;font-weight:400;line-height:1.33;-webkit-text-size-adjust:100%;background:#fff;color:#131a26}body{margin:0}a{color:#3bd671;text-decoration:underline}img{max-width:100%;height:auto;-webkit-box-sizing:border-box;box-sizing:border-box}@supports (display:block){svg{max-width:100%;height:auto;-webkit-box-sizing:border-box;box-sizing:border-box}}svg:not(:root){overflow:hidden}p,ul{margin:0 0 45px}*+p,*+ul{margin-top:45px}h1{margin:0 0 45px;font-weight:700;color:inherit;text-transform:none;font-size:2.4565rem;line-height:1.096;letter-spacing:-.02em}@media (min-width:960px){h1{font-size:2.89rem}}.hi{max-width:550px;width:100%;opacity:0}.price-section{background:#fff}.uk-section-title{color:#131a26!important}.pricing-container{display:flex;justify-content:space-between}.card{background:#fff;padding:1.5rem 1.25rem .75rem 1.25rem;box-shadow:0 20px 60px rgba(#000,.1);border-radius:.75rem;color:#131a26}.uk-button{margin:0;border:none;color:inherit;border-radius:0;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 30px;vertical-align:middle;font-size:18px;line-height:46px;text-align:center;text-decoration:none}.uk-button-primary{background-color:#3bd671;color:#fff}.uk-button-large{padding:0 45px;line-height:56px;font-size:18px}.uk-text-primary{color:#3bd671!important}.uk-text-center{text-align:center!important}.uk-display-inline-block{display:inline-block!important}.uk-flex{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.uk-button-default{background-color:#8b99ac;color:#fff}.uk-emoji{padding-right:5px}.uk-section{padding-top:45px;padding-bottom:45px}.uk-position-fixed{position:fixed}@media (min-width:960px){.uk-section{padding-top:70px;padding-bottom:70px}}.uk-section:after,.uk-section:before{content:"";display:table}.uk-section:after{clear:both}.uk-section>:last-child{margin-bottom:0}.uk-section-secondary{background:#131a26;color:#fff}.uk-container{-webkit-box-sizing:content-box;box-sizing:content-box;max-width:1200px;margin-left:auto;margin-right:auto;padding-left:15px;padding-right:15px}@media (min-width:640px){.uk-container{padding-left:30px;padding-right:30px}}@media (min-width:960px){.uk-container{padding-left:45px;padding-right:45px}}.uk-container:after,.uk-container:before{content:"";display:table}.uk-container:after{clear:both}.uk-container>:last-child{margin-bottom:0}[class*=uk-child-width]>*{-webkit-box-sizing:border-box;box-sizing:border-box;width:100%}@media (min-width:960px){.uk-child-width-1-5\@m>*{width:20%}}[class*=uk-width]{-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;max-width:100%}.uk-text-muted{color:#738199!important}.uk-starts{font-size:.8rem;line-height:1.25rem}.uk-start-value{font-weight:700;font-size:2rem;line-height:2rem}.price-display{font-weight:700;font-size:2rem;line-height:2rem}.uk-price-period{font-size:12px;line-height:1rem;font-weight:500}.uk-currency-sign{font-size:1rem;font-weight:500}.uk-button{border-radius:23px;box-shadow:0 10px 20px 0 rgba(#000,.15);font-weight:700;transition:box-shadow .1s ease-in,background-color .1s ease-in}.uk-flex:after,.uk-flex:before{display:none}.uk-flex-between{-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}.uk-flex-around{-webkit-justify-content:space-around;-ms-flex-pack:distribute;justify-content:space-around}.uk-flex-middle{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.uk-flex-wrap{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.uk-margin-top{margin-top:45px!important}.uk-margin-small-top{margin-top:15px!important}.uk-margin-small-bottom{margin-bottom:15px!important}.uk-margin-small-left{margin-left:15px!important}.uk-hidden,[hidden]{display:none!important}@media (min-width:640px){.uk-hidden\@s{display:none!important}}@media (min-width:1200px){.uk-hidden\@l{display:none!important}}@media (max-width:639px){.uk-visible\@s{display:none!important}}@media (max-width:1199px){.uk-visible\@l{display:none!important}}@media (max-width:640px){html{font-size:16px}}*{-webkit-box-sizing:border-box;box-sizing:border-box}.page-header{background:#131a26;color:#738199;padding:60px 0;z-index:3}.page-header>div{width:100%}@media (min-width:768px){.md\:col-span-3{grid-column:span 3/span 3}}@media (max-width:640px){.page-header{padding:30px 0}}.page-logo{width:100%;width:168px;max-width:168px;margin-right:30px}@media (max-width:640px){.page-logo{max-width:180px}}.nav{margin:0;padding:0}.nav>li{list-style:none;float:left}@media (max-width:640px){.nav>li{float:none;width:100%}}.nav>li>a{color:#fff!important;text-decoration:none!important;padding:0 17px}.nav>li>a.active-menu{font-weight:700;color:#3bd671!important}@media (max-width:640px){.nav>li>a{font-size:36px;padding:15px 0;display:block}}.register-btn{margin-left:25px}.page-body:before{content:"";display:block;height:166px;width:100%;background:#131a26}@media (max-width:640px){.page-body:before{height:104px}}.color-white{color:#fff}.font-24{font-size:24px}[class^=icon-]{display:inline-block;width:1em;height:1em;stroke-width:0;stroke:currentColor;fill:currentColor}.uk-button{border-radius:23px;font-weight:700}.uk-button-large{border-radius:28px}@media (max-width:640px){.uk-button-large{padding:0 30px}}@media (max-width:359px){.uk-button-large{padding:0 20px}}.uk-section.hero{padding-top:30px}.uk-section.hero.home{padding:30px 0}.monitoring-submenu{display:none}.page-top .uk-flex{display:flex}.page-top .uk-flex>div{width:50%}@media (max-width:1199px){.page-top .uk-flex>div{width:100%}}.icon-chevron-small-down{width:18px}#hiring-badge{position:absolute;top:25px;transform:scale(.65);right:5px;text-decoration:none!important;transition:transform .1s ease-in}@media (max-width:359px){#hiring-badge{top:-4px;right:-85px;transform:scale(.7)}}.hero-image{width:550px}@media (max-width:1199px){.hero-image{width:auto}.page-menu .btn-icon{width:44px;height:44px}}[uk-dropdown]{display:none}</style><noscript><link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet"></noscript><script>!function(e,t,n,r,c,a,i){e[n]=e[n]||function(){(e[n].q=e[n].q||[]).push(arguments)},(a=t.createElement(r)).async=1,a.src="https://www.clarity.ms/tag/ifjwerwru2",(i=t.getElementsByTagName(r)[0]).parentNode.insertBefore(a,i)}(window,document,"clarity","script")</script></head><body><noscript><iframe src="https://users.uptimerobot.com/ns.html?id=GTM-TMWSCG3" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript><header class="page-header uk-position-fixed uk-flex uk-flex-middle uk-width-1-1" role="banner"><div class="uk-container uk-container-center"><nav class="boundary-align uk-panel uk-flex uk-flex-middle uk-flex-between"><div class="page-menu uk-flex uk-flex-middle"><div class="uk-position-relative"><a title="UptimeRobot Homepage" href="/"><img alt="UptimeRobot logo" class="page-logo" src="/assets/images/uptimerobot-logo.svg" width="160" height="23"> </a><a class="uk-label uk-label-warning" id="hiring-badge" href="https://itrinitycom.notion.site/Careers-work-with-us-d3796aa492764653af60f7028a87b206" target="_blank" rel="noopener nofollow">We are hiring!</a></div><nav uk-dropnav><ul class="nav uk-visible@l"><li><a href="#">Monitoring <svg class="icon-chevron-small-down"><use xlink:href="/assets/images/symbol-defs.svg#icon-chevron-small-down"></use></svg></a><div uk-dropdown="pos: bottom-justify; boundary: .boundary-align; boundary-align: true; animation: uk-animation-slide-top-small; duration: 200; offset: 25;" class="uk-background-default uk-padding-remove uk-width-1-1 uk-border-circle uk-position-absolute card"><div uk-grid class="uk-flex uk-flex-top uk-drop-grid uk-flex-left uk-child-width-1-4@m uk-margin-remove monitoring-submenu"><div class="uk-padding-small"><strong class="font-24">Reliable uptime monitoring<guptimespan class="uk-text-primary">.</guptimespan></strong></div><a href="/website-monitoring/" class="uk-flex uk-flex-top uk-padding-small monitor uk-margin-remove"><div class="uk-flex uk-flex-middle uk-flex-left monitor-icon"><img alt="website monitoring icon" src="/assets/images/monitor-icons/website-monitoring.svg" width="50px" uk-img></div><div class="uk-flex uk-flex-top uk-flex-column uk-margin-small-left text"><span class="font-18 uk-text-secondary uk-text-bold uk-margin-remove">Website monitoring</span> <span class="font-16 uk-text-muted uk-margin-remove">Be the first to know that your website is down!</span></div></a><a href="/cron-job-monitoring/" class="uk-flex uk-flex-top uk-padding-small monitor uk-margin-remove"><div class="uk-flex uk-flex-middle uk-flex-left monitor-icon"><img alt="cron job monitoring icon" src="/assets/images/monitor-icons/cron-job-monitoring.svg" width="50px" uk-img></div><div class="uk-flex uk-flex-top uk-flex-column uk-margin-small-left text"><span class="font-18 uk-text-secondary uk-text-bold uk-margin-remove">Cron job monitoring</span> <span class="font-16 uk-text-muted uk-margin-remove">Monitor background jobs or intranet devices.</span></div></a><a href="/port-monitoring/" class="uk-flex uk-flex-top uk-padding-small monitor uk-margin-remove"><div class="uk-flex uk-flex-middle uk-flex-left monitor-icon"><img alt="port monitoring icon" src="/assets/images/monitor-icons/port-monitoring.svg" width="50px" uk-img></div><div class="uk-flex uk-flex-top uk-flex-column uk-margin-small-left text"><span class="font-18 uk-text-secondary uk-text-bold uk-margin-remove">Port monitoring</span> <span class="font-16 uk-text-muted uk-margin-remove">Monitor IMAP, POP3 or any other specific ports.</span></div></a><a href="/keyword-monitoring/" class="uk-flex uk-flex-top uk-padding-small monitor uk-margin-remove"><div class="uk-flex uk-flex-middle uk-flex-left monitor-icon"><img alt="keyword monitoring icon" src="/assets/images/monitor-icons/keyword-monitoring.svg" width="50px" uk-img></div><div class="uk-flex uk-flex-top uk-flex-column uk-margin-small-left text"><span class="font-18 uk-text-secondary uk-text-bold uk-margin-remove">Keyword monitoring</span> <span class="font-16 uk-text-muted uk-margin-remove">Check presence of any text on the page.</span></div></a><a href="/ping-monitoring/" class="uk-flex uk-flex-top uk-padding-small monitor uk-margin-remove"><div class="uk-flex uk-flex-middle uk-flex-left monitor-icon"><img alt="ping monitoring icon" src="/assets/images/monitor-icons/ping-monitoring.svg" width="50px" uk-img></div><div class="uk-flex uk-flex-top uk-flex-column uk-margin-small-left text"><span class="font-18 uk-text-secondary uk-text-bold uk-margin-remove">Ping monitoring</span> <span class="font-16 uk-text-muted uk-margin-remove">Leverage one of the most used network admin tools.</span></div></a><a href="/ssl-monitoring/" class="uk-flex uk-flex-top uk-padding-small monitor uk-margin-remove"><div class="uk-flex uk-flex-middle uk-flex-left monitor-icon"><img alt="ssl certificate monitoring icon" src="/assets/images/monitor-icons/ssl-monitoring.svg" width="50px" uk-img></div><div class="uk-flex uk-flex-top uk-flex-column uk-margin-small-left text"><span class="font-18 uk-text-secondary uk-text-bold uk-margin-remove">SSL monitoring</span> <span class="font-16 uk-text-muted uk-margin-remove">Don't lose visitors because of expired SSL certificates.</span></div></a><a href="/domain-expiration-monitoring/" class="uk-flex uk-flex-top uk-padding-small monitor uk-margin-remove"><div class="uk-flex uk-flex-middle uk-flex-left monitor-icon"><img alt="domain expiration monitoring icon" src="/assets/images/monitor-icons/domain-monitoring.svg" width="50px" uk-img></div><div class="uk-flex uk-flex-top uk-flex-column uk-margin-small-left text"><span class="font-18 uk-text-secondary uk-text-bold uk-margin-remove">Domain monitoring</span> <span class="font-16 uk-text-muted uk-margin-remove">Don't let your unique domain name expire.</span></div></a></div><hr class="uk-margin-remove"><div class="uk-flex uk-flex-middle uk-drop-grid uk-flex-left uk-margin-remove monitoring-submenu monitoring-submenu-teams"><div class="uk-padding-small uk-margin-right"><strong class="font-24">For every team<span class="uk-text-primary">.</span></strong></div><div class="uk-flex uk-flex-between uk-flex-auto uk-child-width-1-5@m"><div><a href="/monitoring-for-devops">Devops</a></div><div><a href="/monitoring-for-developers">Developers</a></div><div><a href="/monitoring-for-marketers">Marketers</a></div><div><a href="/monitoring-for-support">Support</a></div><div><a href="/monitoring-for-business-owners">Business owners</a></div></div></div></div></li><li><a href="/integrations/">Integrations</a></li><li><a href="/status-page/">Status Page</a></li><li><a href="/pricing/">Pricing</a></li><li><a href="#">Resources <svg class="icon-chevron-small-down"><use xlink:href="/assets/images/symbol-defs.svg#icon-chevron-small-down"></use></svg></a><div class="uk-dropdown card uk-padding-remove" uk-dropdown="top-right"><ul class="uk-nav uk-dropdown-nav"><li><a href="/knowledge-hub/">Knowledge hub</a></li><li><a href="/case-studies/">Case studies</a></li><li><a href="/blog/">Blog</a></li><li><a href="/help/">Help</a></li><li><a href="/api/">API docs</a></li><li><a href="/faq/">FAQs</a></li><li><a href="/help/locations/">Locations</a></li></ul></div></li></ul></nav></div><div class="page-menu uk-flex uk-flex-middle"><ul class="nav uk-visible@l"><li class="hide-for-logged"><a href="https://dashboard.uptimerobot.com/login?ref=website-header">Log In</a></li><li class="show-for-logged uk-hidden"><a href="https://dashboard.uptimerobot.com?ref=website-header">Go to Dashboard <svg class="icon-login"><use xlink:href="/assets/images/symbol-defs.svg#icon-login"></use></svg></a></li></ul><a class="register-btn uk-button uk-button-primary uk-visible@s hide-for-logged" href="https://dashboard.uptimerobot.com/sign-up?ref=website-header">Register for FREE </a><button aria-label="Open menu" type="button" class="btn-icon uk-hidden@l uk-margin-small-left" uk-toggle="target: #mobile-menu" type="button"><svg class="icon-menu font-24"><use xlink:href="/assets/images/symbol-defs.svg#icon-menu"></use></svg></button></div></nav></div></header><main class="page-body" uk-scrollspy="target: .page-header; cls: scrolled; offset-top: 200"><section class="uk-section uk-section-medium uk-section-secondary hero"><div class="uk-container uk-text-center"><h1>UptimeRobot <span class="uk-text-primary">REST API</span>.</h1><p class="uk-width-3-4@l uk-container">UptimeRobot has an easy-to-use API. Responses are provided as <strong>XML, JSON or JSON-P</strong>. It lets you get the details of your monitors, logs, create / edit / delete monitors, alert contacts and maintenance windows. That's all.</p><a title="Click to subscribe" href="https://uptimerobot.com/dashboard?open=mySettings#mySettings" class="uk-button uk-button-primary subscribeToNewsletter">Subscribe to get API updates</a></div></section><section class="uk-section uk-section-medium"><div class="uk-container text-page api-page"><div uk-grid><div class="uk-width-1-4@l uk-visible@l"><div uk-sticky="offset: 100" class="uk-overflow-auto" style="bottom:0"><div><small class="uk-text-muted">API version: 2.0</small></div><div class="uk-divider-small uk-margin-small"></div><ul class="uk-nav uk-nav-default" uk-scrollspy-nav="closest: li; scroll: true; offset: 180" id="apimenuscrollspy"><li><a href="api/#auth">Authentication</a></li><li><a href="api/#formats">Formats</a></li><li><a href="api/#methods">Methods</a><ul class="uk-nav-sub" id="apimethodsmenu"><li><a href="api/#getAccountDetailsWrap">POST getAccountDetails</a></li><li><a href="api/#getMonitorsWrap">POST getMonitors</a></li><li><a href="api/#newMonitorWrap">POST newMonitor</a></li><li><a href="api/#editMonitorWrap">POST editMonitor</a></li><li><a href="api/#deleteMonitorWrap">POST deleteMonitor</a></li><li><a href="api/#resetMonitorWrap">POST resetMonitor</a></li><li><a href="api/#getAlertContactsWrap">POST getAlertContacts</a></li><li><a href="api/#newAlertContactWrap">POST newAlertContact</a></li><li><a href="api/#editAlertContactWrap">POST editAlertContact</a></li><li><a href="api/#deleteAlertContactWrap">POST deleteAlertContact</a></li><li><a href="api/#getMWindowsWrap">POST getMWindows</a></li><li><a href="api/#newMWindowWrap">POST newMWindow</a></li><li><a href="api/#editMWindowWrap">POST editMWindow</a></li><li><a href="api/#deleteMWindowWrap">POST deleteMWindow</a></li><li><a href="api/#getPSPsWrap">POST getPSPs</a></li><li><a href="api/#newPSPWrap">POST newPSP</a></li><li><a href="api/#editPSPWrap">POST editPSP</a></li><li><a href="api/#deletePSPWrap">POST deletePSP</a></li></ul></li><li><a href="api/#parameters">Parameters</a></li></ul></div></div><div class="uk-width-3-4@l"><h2 id="auth">Authentication</h2><p>HTTP Basic Access Authentication is used for verifying accounts.</p>There are 3 types of api_keys for reaching the data:<ul><li><strong>account-specific api_key</strong> which allows using all the API methods on all the monitors of an account</li><li><strong>monitor-specific api_keys</strong> which allows using only the <code><a href="api/#getMonitorsWrap">getMonitors</a></code> method for the given monitor</li><li><strong>read-only api_key</strong> which allows fetching data with all the <strong>get*</strong> API endpoints</li></ul><h3>Which api_key type to use?</h3><p><strong>account-specific api_key</strong> is good for pulling data for more than 1 monitors (like listing the stats of all monitors) and/or adding-editing-deleting monitors.</p><p><strong>monitor-specific api_key</strong>s are good for pulling data for a single monitor without revealing your main api_key (account-specific api_key). For ex: you can use monitor-specific api_keys in client websites (so you'll still be able to pull data and the client will only be able to see the monitor-specific api_key).</p><p><strong>read-only api_key</strong> is good for pulling data for listing. If you are not going to use create, update or delete methods, you can use read-only api-key.</p><h3>Where to find the api_keys?</h3><p>They are <strong>found under "My Settings" page</strong>.</p><p>While making a request, you must send the api_key in your request's body. API key as a query parameter is only allowed for <code>getMonitors</code> endpoint:</p><p><code class="hljs plaintext">https://api.uptimerobot.com/v2/getMonitors?<em>api_key=YOUR_API_KEY_HERE</em></code></p><p></p><h3>Rate Limits</h3><p>We are trying to prevent abusive use of our API. We have rate limits based on user plan.</p><code class="hljs plaintext">FREE plan : <em>10 req/min</em><br>PRO plan : <em>monitor limit</em> * <em>2 req/min</em> ( with maximum value <em>5000 req/min</em> )</code><p>We will return 429 HTTP status code in the response from API, when you hit the rate limits. Also we will return common rate limit response headers in the response :</p><code class="hljs plaintext"><em>X-RateLimit-Limit</em> - your current rate limit<br><em>X-RateLimit-Remaining</em> - number of calls left in current duration<br><em>X-RateLimit-Reset</em> - time since epoch in seconds at which<br>the rate limiting period will end (or already ended)<br><em>Retry-After</em> - Number of second after you should retry the call<br></code><h3>CORS</h3>CORS headers are sent only for <strong>get*</strong> API endpoints with monitor-specific and read-only API keys.<h2 id="formats">Formats</h2><p>Responses can either be <strong>XML or JSON</strong>. Just mention the preferred format as:</p><p><code class="hljs plaintext">https://api.uptimerobot.com/v2/methodName?<em>format=xml</em></code><br>or<br><br><code class="hljs plaintext">https://api.uptimerobot.com/v2/methodName?<em>format=json</em></code></p><p>In order to get a JSON-P response, the requests need to be sent with a parameter named <code>callback</code> like <code>callback=jsonpUptimeRobot</code> and the response will return as:</p><p><code class="hljs plaintext">jsonpUptimeRobot({...});</code></p><h2 id="methods">Methods</h2><ul uk-accordion="multiple: false, animation: false" id="methodsacc"><li id="getAccountDetailsWrap"><a class="uk-accordion-title" href="#"><span class="uk-label uk-label-primary">POST</span> getAccountDetails</a><div class="uk-accordion-content"><p>Account details (max number of monitors that can be added and number of up/down/paused monitors) can be grabbed using this method.</p><h4 class="uk-margin-small-bottom">Parameters</h4><table class="api-params uk-table uk-table-divider uk-table-hover uk-margin-small-top"><thead><tr><td>Parameter</td><td>Description</td></tr></thead><tr><td><strong>api_key</strong></td><td><em>required </em>- Your API key.</td></tr></table><p>The URL for the request would be:</p><p><code>https://api.uptimerobot.com/v2/getAccountDetails</code></p><h4 class="uk-margin-small-bottom">Example</h4><div uk-switcher="toggle:>button; connect: .api-example"><button type="button" class="uk-button uk-button-small uk-active uk-button-primary" data-value="1">cURL</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="2">PHP cURL</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="3">PHP httpRequest</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="4">Python http.client</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="4">Python Requests</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="6">Node.js Native</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="7">Node.js Requests</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="8">Go</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="9">C#</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="10">Ruby</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="11">Java</button></div><div class="api-example uk-switcher uk-margin-small-top"><div role="tabpanel" class="tab-pane" id="getAccountDetailsCurl"><pre><code class="language-plaintext"> curl -X POST -H "Cache-Control: no-cache" -H "Content-Type: application/x-www-form-urlencoded" -d 'api_key=enterYourAPIKeyHere&format=json' "https://api.uptimerobot.com/v2/getAccountDetails" </code></pre></div><div role="tabpanel" class="tab-pane" id="getAccountDetailsPHPCurl"><pre><code class="language-php"> $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.uptimerobot.com/v2/getAccountDetails", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "api_key=enterYourAPIKeyHere&format=json", CURLOPT_HTTPHEADER => array( "cache-control: no-cache", "content-type: application/x-www-form-urlencoded" ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } </code></pre></div><div role="tabpanel" class="tab-pane" id="getAccountDetailsPHPHttpRequest"><pre><code class="language-php"> $request = new HttpRequest(); $request->setUrl('https://api.uptimerobot.com/v2/getAccountDetails'); $request->setMethod(HTTP_METH_POST); $request->setHeaders(array( 'content-type' => 'application/x-www-form-urlencoded', 'cache-control' => 'no-cache' )); $request->setContentType('application/x-www-form-urlencoded'); $request->setPostFields(array( 'api_key' => 'enterYourAPIKeyHere', 'format' => 'json' )); try { $response = $request->send(); echo $response->getBody(); } catch (HttpException $ex) { echo $ex; } </code></pre></div><div role="tabpanel" class="tab-pane" id="getAccountDetailsPythonHttpClient"><pre><code class="language-python"> import http.client conn = http.client.HTTPSConnection("api.uptimerobot.com") payload = "api_key=enterYourAPIKeyHere&format=json" headers = { 'cache-control': "no-cache", 'content-type': "application/x-www-form-urlencoded" } conn.request("POST", "/v2/getAccountDetails", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) </code></pre></div><div role="tabpanel" class="tab-pane" id="getAccountDetailsPythonRequests"><pre><code class="language-python"> import requests url = "https://api.uptimerobot.com/v2/getAccountDetails" payload = "api_key=enterYourAPIKeyHere&format=json" headers = { 'cache-control': "no-cache", 'content-type': "application/x-www-form-urlencoded" } response = requests.request("POST", url, data=payload, headers=headers) print(response.text) </code></pre></div><div role="tabpanel" class="tab-pane" id="getAccountDetailsNodejsNative"><pre><code class="language-js"> var qs = require("querystring"); var http = require("https"); var options = { "method": "POST", "hostname": "api.uptimerobot.com", "port": null, "path": "/v2/getAccountDetails", "headers": { "cache-control": "no-cache", "content-type": "application/x-www-form-urlencoded" } }; var req = http.request(options, function (res) { var chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { var body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(qs.stringify({ api_key: 'enterYourAPIKeyHere', format: 'json' })); req.end(); </code></pre></div><div role="tabpanel" class="tab-pane" id="getAccountDetailsNodejsRequest"><pre><code class="language-js"> var request = require("request"); var options = { method: 'POST', url: 'https://api.uptimerobot.com/v2/getAccountDetails', headers: { 'content-type': 'application/x-www-form-urlencoded', 'cache-control': 'no-cache' }, form: { api_key: 'enterYourAPIKeyHere', format: 'json' } }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); </code></pre></div><div role="tabpanel" class="tab-pane" id="getAccountDetailsGo"><pre><code class="language-go"> package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://api.uptimerobot.com/v2/getAccountDetails" payload := strings.NewReader("api_key=enterYourAPIKeyHere&format=json") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("cache-control", "no-cache") req.Header.Add("content-type", "application/x-www-form-urlencoded") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } </code></pre></div><div role="tabpanel" class="tab-pane" id="getAccountDetailsCSharp"><pre><code class="language-csharp"> var client = new RestClient("https://api.uptimerobot.com/v2/getAccountDetails"); var request = new RestRequest(Method.POST); request.AddHeader("content-type", "application/x-www-form-urlencoded"); request.AddHeader("cache-control", "no-cache"); request.AddParameter("application/x-www-form-urlencoded", "api_key=enterYourAPIKeyHere&format=json", ParameterType.RequestBody); IRestResponse response = client.Execute(request); </code></pre></div><div role="tabpanel" class="tab-pane" id="getAccountDetailsRuby"><pre><code class="language-ruby"> require 'uri' require 'net/http' url = URI("https://api.uptimerobot.com/v2/getAccountDetails") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Post.new(url) request["cache-control"] = 'no-cache' request["content-type"] = 'application/x-www-form-urlencoded' request.body = "api_key=enterYourAPIKeyHere&format=json" response = http.request(request) puts response.read_body </code></pre></div><div role="tabpanel" class="tab-pane" id="getAccountDetailsJava"><pre><code class="language-java"> OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded"); RequestBody body = RequestBody.create(mediaType, "api_key=enterYourAPIKeyHere&format=json"); Request request = new Request.Builder() .url("https://api.uptimerobot.com/v2/getAccountDetails") .post(body) .addHeader("cache-control", "no-cache") .addHeader("content-type", "application/x-www-form-urlencoded") .build(); Response response = client.newCall(request).execute(); </code></pre></div></div><h4 class="uk-margin-small-bottom">Response</h4><ul uk-tab="connect: .api-response-example"><li><a href="#">JSON</a></li><li><a href="#">XML</a></li></ul><div class="uk-switcher api-response-example"><div><pre><code class="language-json"> { "stat": "ok", "account": { "email": "test@domain.com", "monitor_limit": 50, "monitor_interval": 1, "up_monitors": 1, "down_monitors": 0, "paused_monitors": 2 } } </code></pre></div><div><pre><code class="language-xml"> <?xml version="1.0" encoding="UTF-8"?> <account id="1" email="test@domain.com" monitor_limit="50" monitor_interval="1" up_monitors="1" down_monitors="0" paused_monitors="2"/> </code></pre></div></div></div></li><li id="getMonitorsWrap"><a class="uk-accordion-title" href="#"><span class="uk-label uk-label-primary">POST</span> getMonitors</a><div class="uk-accordion-content"><p>This is a Swiss-Army knife type of a method for <strong>getting any information on monitors</strong>.</p><p>By default, it lists all the monitors in a user's account, their friendly names, types (http, keyword, port, etc.), statuses (up, down, etc.) and uptime ratios.</p><p>There are optional parameters which lets the <code>getMonitors</code> method to output information on any given monitors rather than all of them.</p><p>And also, parameters exist for getting the notification logs (alerts) for each monitor and even which alert contacts were alerted on each notification.</p><h4 class="uk-margin-small-bottom">Parameters</h4><table class="api-params uk-table uk-table-divider uk-table-hover uk-margin-small-top"><thead><tr><td>Parameter</td><td>Description</td></tr></thead><tr><td><strong>api_key</strong></td><td>required</td></tr><tr><td><strong>monitors</strong></td><td><em>optional</em> (if not used, will return all monitors in an account. Else, it is possible to define any number of monitors with their IDs like: <code>monitors=15830-32696-83920</code>)</td></tr><tr><td><strong>types</strong></td><td><em>optional</em> (if not used, will return all monitors types (HTTP, keyword, ping..) in an account. Else, it is possible to define any number of monitor types like: <code>types=1-3-4</code>)</td></tr><tr><td><strong>statuses</strong></td><td><em>optional</em> (if not used, will return all monitors statuses (up, down, paused) in an account. Else, it is possible to define any number of monitor statuses like: <code>statuses=2-9</code>)</td></tr><tr><td><strong>custom_uptime_ratios</strong></td><td><em>optional</em> (defines the number of days to calculate the uptime ratio(s) for. Ex: <code>custom_uptime_ratios=7-30-45</code> to get the uptime ratios for those periods)</td></tr><tr><td><strong>custom_down_durations</strong></td><td><em>optional</em> (returns the "custom down durations" for given periods in "custom_uptime_ratios")</td></tr><tr><td><strong>custom_uptime_ranges</strong></td><td><em>optional</em> (defines the ranges to calculate the uptime ratio(s) for. Ex: <code>custom_uptime_ranges=1465440758_1466304758</code> to get the uptime ratios for those periods. It is possible to send multiple ranges like <code>1465440758_1466304758-1434682358_1434855158</code>)</td></tr><tr><td><strong>all_time_uptime_ratio</strong></td><td><em>optional</em> (returns the "all time uptime ratio". It will slow down the response a bit and, if not really necessary, suggest not using it. Default is <code>0</code>)</td></tr><tr><td><strong>all_time_uptime_durations</strong></td><td><em>optional</em> (returns the "all time durations of up-down-paused events". It will slow down the response a bit and, if not really necessary, suggest not using it. Default is <code>0</code>)</td></tr><tr><td><strong>logs</strong></td><td><em>optional</em> (defines if the logs of each monitor will be returned. Should be set to <code>1</code> for getting the logs. Default is <code>0</code>)</td></tr><tr><td><strong>logs_start_date</strong></td><td><em>optional</em> (works only for the Pro Plan as 24 hour+ logs are kept only in the Pro Plan, formatted as <code>Unix time</code> and must be used with <code>logs_end_date</code>)</td></tr><tr><td><strong>logs_end_date</strong></td><td><em>optional</em> (works only for the Pro Plan as 24 hour+ logs are kept only in the Pro Plan, formatted as <code>Unix time</code> and must be used with <code>logs_start_date</code>)</td></tr><tr><td><strong>log_types</strong></td><td><em>optional</em> (the types of logs to be returned with a usage like: <code>log_types=1-2-98</code>). If empty, all log types are returned.</td></tr><tr><td><strong>logs_limit</strong></td><td><em>optional</em> (the number of logs to be returned in descending order). If empty, all logs are returned.</td></tr><tr><td><strong>response_times</strong></td><td><em>optional</em> (defines if the response time data of each monitor will be returned. Should be set to <code>1</code> for getting them. Default is <code>0</code>)</td></tr><tr><td><strong>response_times_limit</strong></td><td><em>optional</em> (the number of response time logs to be returned (descending order). If empty, last 24 hours of logs are returned (if <code>response_times_start_date</code> and <code>response_times_end_date</code> are not used).</td></tr><tr><td><strong>response_times_average</strong></td><td><em>optional</em> (by default, response time value of each check is returned. The API can return average values in given minutes. Default is <code>0</code>. For ex: the UptimeRobot dashboard displays the data averaged/grouped in 30 minutes)</td></tr><tr><td><strong>response_times_start_date</strong></td><td><em>optional</em> (formatted as <code>Unix time</code> and must be used with <code>response_times_end_date</code>) (<code>response_times_end_date - response_times_start_date</code> can't be more than 7 days)</td></tr><tr><td><strong>response_times_end_date</strong></td><td><em>optional</em> (formatted as <code>Unix time</code> and must be used with <code>response_times_start_date</code>) (<code>response_times_end_date - response_times_start_date</code> can't be more than 7 days)</td></tr><tr><td><strong>alert_contacts</strong></td><td><em>optional</em> (defines if the alert contacts set for the monitor to be returned. Default is <code>0</code>.)</td></tr><tr><td><strong>mwindows</strong></td><td><em>optional</em> (defines if the maintenance windows for the monitors will be returned. Default is <code>0</code>.)</td></tr><tr><td><strong>ssl</strong></td><td><em>optional</em> (defines if SSL certificate info for each monitor will be returned)</td></tr><tr><td><strong>custom_http_headers</strong></td><td><em>optional</em> (defines if the custom HTTP headers of each monitor will be returned. Should be set to <code>1</code> for getting them. Default is <code>0</code>)</td></tr><tr><td><strong>custom_http_statuses</strong></td><td><em>optional</em> (defines if the custom HTTP statuses of each monitor will be returned. Should be set to <code>1</code> for getting them. Default is <code>0</code>)</td></tr><tr><td><strong>http_request_details</strong></td><td><em>optional</em> (defines if the request method type of each monitor will be returned. Should be set to <code>true</code> for getting them. Default is <code>false</code>)</td></tr><tr><td><strong>auth_type</strong></td><td><em>optional</em> (defines if the auth type of each monitor will be returned. Should be set to <code>true</code> for getting them. Default is <code>false</code>)</td></tr><tr><td><strong>timezone</strong></td><td><em>optional</em> (defines if the user's timezone should be returned. Should be set to <code>1</code> for getting it. Default is <code>0</code>)</td></tr><tr><td><strong>offset</strong></td><td><em>optional</em> (used for pagination. Defines the record to start paginating. Default is <code>0</code>)</td></tr><tr><td><strong>limit</strong></td><td><em>optional</em> (used for pagination. Defines the max number of records to return for the response. Default and max. is <code>50</code>)</td></tr><tr><td><strong>search</strong></td><td><em>optional</em> (a keyword of your choice to search within <code>url</code> and <code>friendly_name</code> and get filtered results)</td></tr></table><h4 class="uk-margin-small-bottom">Example</h4><div uk-switcher="toggle:>button; connect: .api-example"><button type="button" class="uk-button uk-button-small uk-active uk-button-primary" data-value="1">cURL</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="2">PHP cURL</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="3">PHP httpRequest</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="4">Python http.client</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="4">Python Requests</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="6">Node.js Native</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="7">Node.js Requests</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="8">Go</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="9">C#</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="10">Ruby</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="11">Java</button></div><div class="api-example uk-switcher uk-margin-small-top"><div role="tabpanel" class="tab-pane" id="getMonitorsCurl"><pre><code class="language-plaintext"> curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -H "Cache-Control: no-cache" -d 'api_key=enterYourAPIKeyHere&format=json&logs=1' "https://api.uptimerobot.com/v2/getMonitors" </code></pre></div><div role="tabpanel" class="tab-pane" id="getMonitorsPHPCurl"><pre><code class="language-php"> $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.uptimerobot.com/v2/getMonitors", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "api_key=enterYourAPIKeyHere&format=json&logs=1", CURLOPT_HTTPHEADER => array( "cache-control: no-cache", "content-type: application/x-www-form-urlencoded" ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } </code></pre></div><div role="tabpanel" class="tab-pane" id="getMonitorsPHPHttpRequest"><pre><code class="language-php"> $request = new HttpRequest(); $request->setUrl('https://api.uptimerobot.com/v2/getMonitors'); $request->setMethod(HTTP_METH_POST); $request->setHeaders(array( 'cache-control' => 'no-cache', 'content-type' => 'application/x-www-form-urlencoded' )); $request->setContentType('application/x-www-form-urlencoded'); $request->setPostFields(array( 'api_key' => 'enterYourAPIKeyHere', 'format' => 'json', 'logs' => '1' )); try { $response = $request->send(); echo $response->getBody(); } catch (HttpException $ex) { echo $ex; } </code></pre></div><div role="tabpanel" class="tab-pane" id="getMonitorsPythonHttpClient"><pre><code class="language-python"> import http.client conn = http.client.HTTPSConnection("api.uptimerobot.com") payload = "api_key=enterYourAPIKeyHere&format=json&logs=1" headers = { 'content-type': "application/x-www-form-urlencoded", 'cache-control': "no-cache" } conn.request("POST", "/v2/getMonitors", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) </code></pre></div><div role="tabpanel" class="tab-pane" id="getMonitorsPythonRequests"><pre><code class="language-python"> import requests url = "https://api.uptimerobot.com/v2/getMonitors" payload = "api_key=enterYourAPIKeyHere&format=json&logs=1" headers = { 'content-type': "application/x-www-form-urlencoded", 'cache-control': "no-cache" } response = requests.request("POST", url, data=payload, headers=headers) print(response.text) </code></pre></div><div role="tabpanel" class="tab-pane" id="getMonitorsNodejsNative"><pre><code class="language-js"> var qs = require("querystring"); var http = require("https"); var options = { "method": "POST", "hostname": "api.uptimerobot.com", "port": null, "path": "/v2/getMonitors", "headers": { "content-type": "application/x-www-form-urlencoded", "cache-control": "no-cache" } }; var req = http.request(options, function (res) { var chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { var body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(qs.stringify({ api_key: 'enterYourAPIKeyHere', format: 'json', logs: '1' })); req.end(); </code></pre></div><div role="tabpanel" class="tab-pane" id="getMonitorsNodejsRequest"><pre><code class="language-js"> var request = require("request"); var options = { method: 'POST', url: 'https://api.uptimerobot.com/v2/getMonitors', headers: { 'cache-control': 'no-cache', 'content-type': 'application/x-www-form-urlencoded' }, form: { api_key: 'enterYourAPIKeyHere', format: 'json', logs: '1' } }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); </code></pre></div><div role="tabpanel" class="tab-pane" id="getMonitorsGo"><pre><code class="language-go"> package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://api.uptimerobot.com/v2/getMonitors" payload := strings.NewReader("api_key=enterYourAPIKeyHere&format=json&logs=1") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("content-type", "application/x-www-form-urlencoded") req.Header.Add("cache-control", "no-cache") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } </code></pre></div><div role="tabpanel" class="tab-pane" id="getMonitorsCSharp"><pre><code class="language-csharp"> var client = new RestClient("https://api.uptimerobot.com/v2/getMonitors"); var request = new RestRequest(Method.POST); request.AddHeader("cache-control", "no-cache"); request.AddHeader("content-type", "application/x-www-form-urlencoded"); request.AddParameter("application/x-www-form-urlencoded", "api_key=enterYourAPIKeyHere&format=json&logs=1", ParameterType.RequestBody); IRestResponse response = client.Execute(request); </code></pre></div><div role="tabpanel" class="tab-pane" id="getMonitorsRuby"><pre><code class="language-ruby"> require 'uri' require 'net/http' url = URI("https://api.uptimerobot.com/v2/getMonitors") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Post.new(url) request["content-type"] = 'application/x-www-form-urlencoded' request["cache-control"] = 'no-cache' request.body = "api_key=enterYourAPIKeyHere&format=json&logs=1" response = http.request(request) puts response.read_body </code></pre></div><div role="tabpanel" class="tab-pane" id="getMonitorsJava"><pre><code class="language-java"> OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded"); RequestBody body = RequestBody.create(mediaType, "api_key=enterYourAPIKeyHere&format=json&logs=1"); Request request = new Request.Builder() .url("https://api.uptimerobot.com/v2/getMonitors") .post(body) .addHeader("content-type", "application/x-www-form-urlencoded") .addHeader("cache-control", "no-cache") .build(); Response response = client.newCall(request).execute(); </code></pre></div></div><h4 class="uk-margin-small-bottom">Response</h4><ul uk-tab="toggle:>li; connect: .api-response-example"><li><a href="#">JSON</a></li><li><a href="#">XML</a></li></ul><div class="uk-switcher api-response-example"><div><pre><code class="language-json"> { "stat": "ok", "pagination": { "offset": 0, "limit": 50, "total": 2 }, "monitors": [ { "id": 777749809, "friendly_name": "Google", "url": "http://www.google.com", "type": 1, "sub_type": "", "keyword_type": "", "keyword_case_type": "", "keyword_value": "", "http_username": "", "http_password": "", "port": "", "interval": 900, "status": 1, "create_datetime": 1462565497, "monitor_group": 0, "is_group_main": 0, "logs": [ { "type": 98, "datetime": 1463540297, "duration": 1054134 } ] }, { "id": 777712827, "friendly_name": "My Web Page", "url": "http://mywebpage.com/", "type": 1, "sub_type": "", "keyword_type": "", "keyword_case_type": "", "keyword_value": "", "http_username": "", "http_password": "", "port": "", "interval": 60, "status": 2, "create_datetime": 1462465496, "monitor_group": 0, "is_group_main": 0, "logs": [ { "type": 98, "datetime": 1462465202, "duration": 32 }, { "type": 1, "datetime": 1462465234, "duration": 490140 }, { "type": 2, "datetime": 1462955374, "duration": 85 }, { "type": 99, "datetime": 1462955588, "duration": 12 }, { "type": 98, "datetime": 1462955600, "duration": 22 } ] } ] } </code></pre></div><div><pre><code class="language-xml"> <?xml version="1.0" encoding="UTF-8"?> <monitors stat="ok"> <pagination offset="0" limit="50" total="2"/> <monitor id="777749809" friendly_name="Google" url="http://www.google.com" type="1" sub_type="" keyword_type="" keyword_case_type=""keyword_value="" http_username="" http_password="" port="" interval="900" status="1" create_datetime="1462565497" monitor_group="0" is_group_main="0"> <logs> <log type="98" datetime="1463540297" duration="1053736" alert_contacts=""/> </logs> </monitor> <monitor id="777712827" friendly_name="My Web Page" url="http://mywebpage.com/" type="1" sub_type="" keyword_type="" keyword_case_type=""keyword_value="" http_username="" http_password="" port="" interval="60" status="2" create_datetime="1462465496" monitor_group="0" is_group_main="0"> <logs> <log type="98" datetime="1462465202" duration="32" alert_contacts=""/> <log type="2" datetime="1462955374" duration="85" alert_contacts=""/> <log type="1" datetime="1462955459" duration="34" alert_contacts=""/> <log type="99" datetime="1462955588" duration="12" alert_contacts=""/> <log type="98" datetime="1462955600" duration="22" alert_contacts=""/> </logs> </monitor> </monitors> </code></pre></div></div></div></li><li id="newMonitorWrap"><a class="uk-accordion-title" href="#"><span class="uk-label uk-label-primary">POST</span> newMonitor</a><div class="uk-accordion-content"><p>New monitors of any type can be created using this method.</p><h4 class="uk-margin-small-bottom">Parameters</h4><table class="api-params uk-table uk-table-divider uk-table-hover uk-margin-small-top"><tr><td><strong>api_key</strong></td><td><em>required</em></td></tr><tr><td><strong>friendly_name</strong></td><td><em>required</em></td></tr><tr><td><strong>url</strong></td><td><em>required</em></td></tr><tr><td><strong>type</strong></td><td><em>required</em></td></tr><tr><td><strong>sub_type</strong></td><td><em>optional</em> (<em>required</em> for port monitoring)</td></tr><tr><td><strong>port</strong></td><td><em>optional</em> (<em>required</em> for port monitoring)</td></tr><tr><td><strong>keyword_type</strong></td><td><em>optional</em> (<em>required</em> for keyword monitoring)</td></tr><tr><td><strong>keyword_case_type</strong></td><td><em>optional</em> (for keyword monitoring)</td></tr><tr><td><strong>keyword_value</strong></td><td><em>optional</em> (<em>required</em> for keyword monitoring)</td></tr><tr><td><strong>interval</strong></td><td><em>optional</em> (in seconds)</td></tr><tr><td><strong>timeout</strong></td><td><em>optional</em> (in seconds, between 1 to 60) (for only HTTP, keyword, port monitor types)</td></tr><tr><td><strong>http_username</strong></td><td><em>optional</em></td></tr><tr><td><strong>http_password</strong></td><td><em>optional</em></td></tr><tr><td><strong>http_auth_type</strong></td><td><em>optional</em> (1 for HTTP Basic, 2 for Digest)</td></tr><tr><td><strong>post_type</strong></td><td><em>optional</em> (key-value or raw data)</td></tr><tr><td><strong>post_value</strong></td><td><em>optional</em></td></tr>(must be sent as a JSON object)<tr><td><strong>http_method</strong></td><td><em>optional</em></td></tr><tr><td><strong>post_content_type</strong></td><td><em>optional</em></td></tr><tr><td><strong>alert_contacts</strong></td><td><em>optional</em> (the alert contacts to be notified when the monitor goes up/down.Multiple <code>alert_contact>id</code>s can be sent like <code>alert_contacts=457_0_0-373_5_0-8956_2_3</code> where <code>alert_contact>ids</code> are seperated with - and <code>threshold</code> + <code>recurrence</code> are seperated with _. For ex: <code>alert_contacts=457_5_0</code> refers to 457 being the <code>alert_contact>id</code>, 5 being the <code>threshold</code> and 0 being the <code>recurrence</code>. As the threshold and recurrence is only available in the paid plans, they are always 0 in the Free Plan)</td></tr><tr><td><strong>mwindows</strong></td><td><em>optional</em> (the maintenance windows for the monitor which can be mentioned with their IDs like 345-2986-71)</td></tr><tr><td><strong>custom_http_headers</strong></td><td><em>optional</em> (must be sent as a JSON object)</td></tr><tr><td><strong>custom_http_statuses</strong></td><td><em>optional</em> (must be sent as 404:0_200:1 to accept 404 as down and 200 as up)</td></tr><tr><td><strong>ignore_ssl_errors</strong></td><td><em>optional</em> (for ignoring SSL certificate related errors)</td></tr><tr><td><strong>disable_domain_expire_notifications</strong></td><td><em>optional</em> (0 for enable, 1 for disable, available only on http and keyword monitors)</td></tr></table><h4 class="uk-margin-small-bottom">Example</h4><div uk-switcher="toggle:>button; connect: .api-example"><button type="button" class="uk-button uk-button-small uk-active uk-button-primary" data-value="1">cURL</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="2">PHP cURL</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="3">PHP httpRequest</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="4">Python http.client</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="4">Python Requests</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="6">Node.js Native</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="7">Node.js Requests</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="8">Go</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="9">C#</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="10">Ruby</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="11">Java</button></div><div class="api-example uk-switcher uk-margin-small-top"><div role="tabpanel" class="tab-pane" id="newMonitorCurl"><pre><code class="language-text"> curl -X POST -H "Cache-Control: no-cache" -H "Content-Type: application/x-www-form-urlencoded" -d 'api_key=enterYourAPIKeyHere&format=json&type=1&url=http://myMonitorURL.com&friendly_name=My Monitor' "https://api.uptimerobot.com/v2/newMonitor" </code></pre></div><div role="tabpanel" class="tab-pane" id="newMonitorPHPCurl"><pre><code class="language-php"> $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.uptimerobot.com/v2/newMonitor", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "api_key=enterYourAPIKeyHere&format=json&type=1&url=http%3A%2F%2FmyMonitorURL.com&friendly_name=My%20Monitor", CURLOPT_HTTPHEADER => array( "cache-control: no-cache", "content-type: application/x-www-form-urlencoded" ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } </code></pre></div><div role="tabpanel" class="tab-pane" id="newMonitorPHPHttpRequest"><pre><code class="language-php"> $request = new HttpRequest(); $request->setUrl('https://api.uptimerobot.com/v2/newMonitor'); $request->setMethod(HTTP_METH_POST); $request->setHeaders(array( 'content-type' => 'application/x-www-form-urlencoded', 'cache-control' => 'no-cache' )); $request->setContentType('application/x-www-form-urlencoded'); $request->setPostFields(array( 'api_key' => 'enterYourAPIKeyHere', 'format' => 'json', 'type' => '1', 'url' => 'http://myMonitorURL.com', 'friendly_name' => 'My Monitor' )); try { $response = $request->send(); echo $response->getBody(); } catch (HttpException $ex) { echo $ex; } </code></pre></div><div role="tabpanel" class="tab-pane" id="newMonitorPythonHttpClient"><pre><code class="language-python"> import http.client conn = http.client.HTTPSConnection("api.uptimerobot.com") payload = "api_key=enterYourAPIKeyHere&format=json&type=1&url=http%3A%2F%2FmyMonitorURL.com&friendly_name=My%20Monitor" headers = { 'cache-control': "no-cache", 'content-type': "application/x-www-form-urlencoded" } conn.request("POST", "/v2/newMonitor", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) </code></pre></div><div role="tabpanel" class="tab-pane" id="newMonitorPythonRequests"><pre><code class="language-python"> import requests url = "https://api.uptimerobot.com/v2/newMonitor" payload = "api_key=enterYourAPIKeyHere&format=json&type=1&url=http%3A%2F%2FmyMonitorURL.com&friendly_name=My%20Monitor" headers = { 'cache-control': "no-cache", 'content-type': "application/x-www-form-urlencoded" } response = requests.request("POST", url, data=payload, headers=headers) print(response.text) </code></pre></div><div role="tabpanel" class="tab-pane" id="newMonitorNodejsNative"><pre><code class="language-js"> var qs = require("querystring"); var http = require("https"); var options = { "method": "POST", "hostname": "api.uptimerobot.com", "port": null, "path": "/v2/newMonitor", "headers": { "cache-control": "no-cache", "content-type": "application/x-www-form-urlencoded" } }; var req = http.request(options, function (res) { var chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { var body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(qs.stringify({ api_key: 'enterYourAPIKeyHere', format: 'json', type: '1', url: 'http://myMonitorURL.com', friendly_name: 'My Monitor' })); req.end(); </code></pre></div><div role="tabpanel" class="tab-pane" id="newMonitorNodejsRequest"><pre><code class="language-js"> var request = require("request"); var options = { method: 'POST', url: 'https://api.uptimerobot.com/v2/newMonitor', headers: { 'content-type': 'application/x-www-form-urlencoded', 'cache-control': 'no-cache' }, form: { api_key: 'enterYourAPIKeyHere', format: 'json', type: '1', url: 'http://myMonitorURL.com', friendly_name: 'My Monitor' } }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); </code></pre></div><div role="tabpanel" class="tab-pane" id="newMonitorGo"><pre><code class="language-go"> package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://api.uptimerobot.com/v2/newMonitor" payload := strings.NewReader("api_key=enterYourAPIKeyHere&format=json&type=1&url=http%3A%2F%2FmyMonitorURL.com&friendly_name=My%20Monitor") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("cache-control", "no-cache") req.Header.Add("content-type", "application/x-www-form-urlencoded") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } </code></pre></div><div role="tabpanel" class="tab-pane" id="newMonitorCSharp"><pre><code class="language-csharp"> var client = new RestClient("https://api.uptimerobot.com/v2/newMonitor"); var request = new RestRequest(Method.POST); request.AddHeader("content-type", "application/x-www-form-urlencoded"); request.AddHeader("cache-control", "no-cache"); request.AddParameter("application/x-www-form-urlencoded", "api_key=enterYourAPIKeyHere&format=json&type=1&url=http%3A%2F%2FmyMonitorURL.com&friendly_name=My%20Monitor", ParameterType.RequestBody); IRestResponse response = client.Execute(request); </code></pre></div><div role="tabpanel" class="tab-pane" id="newMonitorRuby"><pre><code class="language-ruby"> require 'uri' require 'net/http' url = URI("https://api.uptimerobot.com/v2/newMonitor") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Post.new(url) request["cache-control"] = 'no-cache' request["content-type"] = 'application/x-www-form-urlencoded' request.body = "api_key=enterYourAPIKeyHere&format=json&type=1&url=http%3A%2F%2FmyMonitorURL.com&friendly_name=My%20Monitor" response = http.request(request) puts response.read_body </code></pre></div><div role="tabpanel" class="tab-pane" id="newMonitorJava"><pre><code class="language-java"> OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded"); RequestBody body = RequestBody.create(mediaType, "api_key=enterYourAPIKeyHere&format=json&type=1&url=http%3A%2F%2FmyMonitorURL.com&friendly_name=My%20Monitor"); Request request = new Request.Builder() .url("https://api.uptimerobot.com/v2/newMonitor") .post(body) .addHeader("cache-control", "no-cache") .addHeader("content-type", "application/x-www-form-urlencoded") .build(); Response response = client.newCall(request).execute(); </code></pre></div></div><h4 class="uk-margin-small-bottom">Response</h4><ul uk-tab="connect: .api-response-example"><li><a href="#">JSON</a></li><li><a href="#">XML</a></li></ul><div class="uk-switcher api-response-example"><div><pre><code class="language-json"> { "stat": "ok", "monitor": { "id": 777810874, "status": 1 } } </code></pre></div><div><pre><code class="language-xml"> <?xml version="1.0" encoding="UTF-8"?><monitor status="1" id="777810882"/> </code></pre></div></div></div></li><li id="editMonitorWrap"><a class="uk-accordion-title" href="#"><span class="uk-label uk-label-primary">POST</span> editMonitor</a><div class="uk-accordion-content"><p>Monitors can be edited using this method.</p><div class="uk-alert uk-alert-warning"><p><strong>Important:</strong> The type of a monitor can not be edited (like changing a HTTP monitor into a Port monitor). For such cases, deleting the monitor and re-creating a new one is adviced.</p></div><h4 class="uk-margin-small-bottom">Parameters</h4><table class="api-params uk-table uk-table-divider uk-table-hover uk-margin-small-top"><tr><td><strong>api_key</strong></td><td>required</td></tr><tr><td><strong>id</strong></td><td>required (the ID of the monitor to be edited)</td></tr><tr><td><strong>friendly_name</strong></td><td>optional</td></tr><tr><td><strong>url</strong></td><td>optional</td></tr><tr><td><strong>sub_type</strong></td><td>optional</td></tr><tr><td><strong>port</strong></td><td>optional</td></tr><tr><td><strong>keyword_type</strong></td><td>optional</td></tr><tr><td><strong>keyword_case_type</strong></td><td>optional</td></tr><tr><td><strong>keyword_value</strong></td><td>optional</td></tr><tr><td><strong>interval</strong></td><td>optional (in seconds)</td></tr><tr><td><strong>timeout</strong></td><td><em>optional</em> (in seconds, between 1 to 60) (for only HTTP, keyword, port monitor types)</td></tr><tr><td><strong>status</strong></td><td>optional (0 for pause, 1 for resume)</td></tr><tr><td><strong>http_username</strong></td><td>optional</td></tr><tr><td><strong>http_password</strong></td><td>optional</td></tr><tr><td><strong>http_auth_type</strong></td><td>optional (1 for HTTP Basic, 2 for Digest)</td></tr><tr><td><strong>http_method</strong></td><td>optional</td></tr><tr><td><strong>post_type</strong></td><td>optional (key-value or raw data)</td></tr><tr><td><strong>post_value</strong></td><td>optional</td></tr>(must be sent as a JSON object)<tr><td><strong>post_content_type</strong></td><td>optional</td></tr><tr><td><strong>alert_contacts</strong></td><td>optional (the alert contacts to be notified when the monitor goes up/down.Multiple <code>alert_contact>id</code>s can be sent like <code>alert_contacts=457_0_0-373_5_0-8956_2_3</code> where <code>alert_contact>id</code>s are seperated with - and <code>threshold</code> + <code>recurrence</code> are seperated with _. For ex: <code>alert_contacts=457_5_0</code> refers to 457 being the <code>alert_contact>id</code>, 5 being the <code>threshold</code> and 0 being the <code>recurrence</code>. As the threshold and recurrence is only available in the Pro Plan, they are always 0 in the Free Plan)</td></tr><tr><td><strong>mwindows</strong></td><td>optional (the maintenance windows for the monitor which can be mentioned with their IDs like 345-2986-71)</td></tr><tr><td><strong>custom_http_headers</strong></td><td>optional (must be sent as a JSON object)</td></tr><tr><td><strong>custom_http_statuses</strong></td><td>optional (must be sent as 404:0_200:1 to accept 404 as down and 200 as up)</td></tr><tr><td><strong>ignore_ssl_errors</strong></td><td>optional (for ignoring SSL certificate related errors)</td></tr><tr><td><strong>disable_domain_expire_notifications</strong></td><td><em>optional</em> (0 for enable, 1 for disable, available only on http and keyword monitors)</td></tr></table><p>The URL for the request would be:</p><p><code>https://api.uptimerobot.com/v2/editMonitor</code></p><h4 class="uk-margin-small-bottom">Example</h4><div uk-switcher="toggle:>button; connect: .api-example"><button type="button" class="uk-button uk-button-small uk-active uk-button-primary" data-value="1">cURL</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="2">PHP cURL</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="3">PHP httpRequest</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="4">Python http.client</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="4">Python Requests</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="6">Node.js Native</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="7">Node.js Requests</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="8">Go</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="9">C#</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="10">Ruby</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="11">Java</button></div><div class="api-example uk-switcher uk-margin-small-top"><div role="tabpanel" class="tab-pane" id="editMonitorCurl"><pre><code class="language-text"> curl -X POST -H "Cache-Control: no-cache" -H "Content-Type: application/x-www-form-urlencoded" -d 'api_key=enterYourAPIKeyHere&format=json&id=777712827&friendly_name=newFriendlyName' "https://api.uptimerobot.com/v2/editMonitor" </code></pre></div><div role="tabpanel" class="tab-pane" id="editMonitorPHPCurl"><pre><code class="language-php"> $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.uptimerobot.com/v2/editMonitor", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "api_key=enterYourAPIKeyHere&format=json&id=777712827&friendly_name=newFriendlyName", CURLOPT_HTTPHEADER => array( "cache-control: no-cache", "content-type: application/x-www-form-urlencoded" ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } </code></pre></div><div role="tabpanel" class="tab-pane" id="editMonitorPHPHttpRequest"><pre><code class="language-php"> $request = new HttpRequest(); $request->setUrl('https://api.uptimerobot.com/v2/editMonitor'); $request->setMethod(HTTP_METH_POST); $request->setHeaders(array( 'content-type' => 'application/x-www-form-urlencoded', 'cache-control' => 'no-cache' )); $request->setContentType('application/x-www-form-urlencoded'); $request->setPostFields(array( 'api_key' => 'enterYourAPIKeyHere', 'format' => 'json', 'id' => '777712827', 'friendly_name' => 'newFriendlyName' )); try { $response = $request->send(); echo $response->getBody(); } catch (HttpException $ex) { echo $ex; } </code></pre></div><div role="tabpanel" class="tab-pane" id="editMonitorPythonHttpClient"><pre><code class="language-python"> import http.client conn = http.client.HTTPSConnection("api.uptimerobot.com") payload = "api_key=enterYourAPIKeyHere&format=json&id=777712827&friendly_name=newFriendlyName" headers = { 'cache-control': "no-cache", 'content-type': "application/x-www-form-urlencoded" } conn.request("POST", "/v2/editMonitor", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) </code></pre></div><div role="tabpanel" class="tab-pane" id="editMonitorPythonRequests"><pre><code class="language-python"> import requests url = "https://api.uptimerobot.com/v2/editMonitor" payload = "api_key=enterYourAPIKeyHere&format=json&id=777712827&friendly_name=newFriendlyName" headers = { 'cache-control': "no-cache", 'content-type': "application/x-www-form-urlencoded" } response = requests.request("POST", url, data=payload, headers=headers) print(response.text) </code></pre></div><div role="tabpanel" class="tab-pane" id="editMonitorNodejsNative"><pre><code class="language-js"> var qs = require("querystring"); var http = require("https"); var options = { "method": "POST", "hostname": "api.uptimerobot.com", "port": null, "path": "/v2/editMonitor", "headers": { "cache-control": "no-cache", "content-type": "application/x-www-form-urlencoded" } }; var req = http.request(options, function (res) { var chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { var body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(qs.stringify({ api_key: 'enterYourAPIKeyHere', format: 'json', id: '777712827', friendly_name: 'newFriendlyName' })); req.end(); </code></pre></div><div role="tabpanel" class="tab-pane" id="editMonitorNodejsRequest"><pre><code class="language-js"> var request = require("request"); var options = { method: 'POST', url: 'https://api.uptimerobot.com/v2/editMonitor', headers: { 'content-type': 'application/x-www-form-urlencoded', 'cache-control': 'no-cache' }, form: { api_key: 'enterYourAPIKeyHere', format: 'json', id: '777712827', friendly_name: 'newFriendlyName' } }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); </code></pre></div><div role="tabpanel" class="tab-pane" id="editMonitorGo"><pre><code class="language-go"> package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://api.uptimerobot.com/v2/editMonitor" payload := strings.NewReader("api_key=enterYourAPIKeyHere&format=json&id=777712827&friendly_name=newFriendlyName") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("cache-control", "no-cache") req.Header.Add("content-type", "application/x-www-form-urlencoded") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } </code></pre></div><div role="tabpanel" class="tab-pane" id="editMonitorCSharp"><pre><code class="language-csharp"> var client = new RestClient("https://api.uptimerobot.com/v2/editMonitor"); var request = new RestRequest(Method.POST); request.AddHeader("content-type", "application/x-www-form-urlencoded"); request.AddHeader("cache-control", "no-cache"); request.AddParameter("application/x-www-form-urlencoded", "api_key=enterYourAPIKeyHere&format=json&id=777712827&friendly_name=newFriendlyName", ParameterType.RequestBody); IRestResponse response = client.Execute(request); </code></pre></div><div role="tabpanel" class="tab-pane" id="editMonitorRuby"><pre><code class="language-ruby"> require 'uri' require 'net/http' url = URI("https://api.uptimerobot.com/v2/editMonitor") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Post.new(url) request["cache-control"] = 'no-cache' request["content-type"] = 'application/x-www-form-urlencoded' request.body = "api_key=enterYourAPIKeyHere&format=json&id=777712827&friendly_name=newFriendlyName" response = http.request(request) puts response.read_body </code></pre></div><div role="tabpanel" class="tab-pane" id="editMonitorJava"><pre><code class="language-java"> OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded"); RequestBody body = RequestBody.create(mediaType, "api_key=enterYourAPIKeyHere&format=json&id=777712827&friendly_name=newFriendlyName"); Request request = new Request.Builder() .url("https://api.uptimerobot.com/v2/editMonitor") .post(body) .addHeader("cache-control", "no-cache") .addHeader("content-type", "application/x-www-form-urlencoded") .build(); Response response = client.newCall(request).execute(); </code></pre></div></div><h4 class="uk-margin-small-bottom">Response</h4><ul uk-tab="connect: .api-response-example"><li><a href="#">JSON</a></li><li><a href="#">XML</a></li></ul><div class="uk-switcher api-response-example"><div><pre><code class="language-json"> {"stat":"ok","monitor":{"id":777712827}} </code></pre></div><div><pre><code class="language-xml"> <?xml version="1.0" encoding="UTF-8"?><monitor id="777712827"/> </code></pre></div></div></div></li><li id="deleteMonitorWrap"><a class="uk-accordion-title" href="#"><span class="uk-label uk-label-primary">POST</span> deleteMonitor</a><div class="uk-accordion-content"><p>Monitors can be deleted using this method.</p><h4 class="uk-margin-small-bottom">Parameters</h4><table class="api-params uk-table uk-table-divider uk-table-hover uk-margin-small-top"><tr><td><strong>api_key</strong></td><td><em>required</em></td></tr><tr><td><strong>id</strong></td><td><em>required</em> (the ID of the monitor to be deleted)</td></tr></table><p>The URL for the request would be:</p><p><code>https://api.uptimerobot.com/v2/deleteMonitor</code></p><h4 class="uk-margin-small-bottom">Example</h4><div uk-switcher="toggle:>button; connect: .api-example"><button type="button" class="uk-button uk-button-small uk-active uk-button-primary" data-value="1">cURL</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="2">PHP cURL</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="3">PHP httpRequest</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="4">Python http.client</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="4">Python Requests</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="6">Node.js Native</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="7">Node.js Requests</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="8">Go</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="9">C#</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="10">Ruby</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="11">Java</button></div><div class="api-example uk-switcher uk-margin-small-top"><div role="tabpanel" class="tab-pane" id="deleteMonitorCurl"><pre><code class="language-text"> curl -X POST -H "Cache-Control: no-cache" -H "Content-Type: application/x-www-form-urlencoded" -d 'api_key=enterYourAPIKeyHere&format=json&id=777712827' "https://api.uptimerobot.com/v2/deleteMonitor" </code></pre></div><div role="tabpanel" class="tab-pane" id="deleteMonitorPHPCurl"><pre><code class="language-php"> $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.uptimerobot.com/v2/deleteMonitor", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "api_key=enterYourAPIKeyHere&format=json&id=777712827", CURLOPT_HTTPHEADER => array( "cache-control: no-cache", "content-type: application/x-www-form-urlencoded" ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } </code></pre></div><div role="tabpanel" class="tab-pane" id="deleteMonitorPHPHttpRequest"><pre><code class="language-php"> $request = new HttpRequest(); $request->setUrl('https://api.uptimerobot.com/v2/deleteMonitor'); $request->setMethod(HTTP_METH_POST); $request->setHeaders(array( 'content-type' => 'application/x-www-form-urlencoded', 'cache-control' => 'no-cache' )); $request->setContentType('application/x-www-form-urlencoded'); $request->setPostFields(array( 'api_key' => 'enterYourAPIKeyHere', 'format' => 'json', 'id' => '777712827' )); try { $response = $request->send(); echo $response->getBody(); } catch (HttpException $ex) { echo $ex; } </code></pre></div><div role="tabpanel" class="tab-pane" id="deleteMonitorPythonHttpClient"><pre><code class="language-python"> import http.client conn = http.client.HTTPSConnection("api.uptimerobot.com") payload = "api_key=enterYourAPIKeyHere&format=json&id=777712827" headers = { 'cache-control': "no-cache", 'content-type': "application/x-www-form-urlencoded" } conn.request("POST", "/v2/deleteMonitor", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) </code></pre></div><div role="tabpanel" class="tab-pane" id="deleteMonitorPythonRequests"><pre><code class="language-python"> import requests url = "https://api.uptimerobot.com/v2/deleteMonitor" payload = "api_key=enterYourAPIKeyHere&format=json&id=777712827" headers = { 'cache-control': "no-cache", 'content-type': "application/x-www-form-urlencoded" } response = requests.request("POST", url, data=payload, headers=headers) print(response.text) </code></pre></div><div role="tabpanel" class="tab-pane" id="deleteMonitorNodejsNative"><pre><code class="language-js"> var qs = require("querystring"); var http = require("https"); var options = { "method": "POST", "hostname": "api.uptimerobot.com", "port": null, "path": "/v2/deleteMonitor", "headers": { "cache-control": "no-cache", "content-type": "application/x-www-form-urlencoded" } }; var req = http.request(options, function (res) { var chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { var body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(qs.stringify({ api_key: 'enterYourAPIKeyHere', format: 'json', id: '777712827' })); req.end(); </code></pre></div><div role="tabpanel" class="tab-pane" id="deleteMonitorNodejsRequest"><pre><code class="language-js"> var request = require("request"); var options = { method: 'POST', url: 'https://api.uptimerobot.com/v2/deleteMonitor', headers: { 'content-type': 'application/x-www-form-urlencoded', 'cache-control': 'no-cache' }, form: { api_key: 'enterYourAPIKeyHere', format: 'json', id: '777712827' } }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); </code></pre></div><div role="tabpanel" class="tab-pane" id="deleteMonitorGo"><pre><code class="language-go"> package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://api.uptimerobot.com/v2/deleteMonitor" payload := strings.NewReader("api_key=enterYourAPIKeyHere&format=json&id=777712827") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("cache-control", "no-cache") req.Header.Add("content-type", "application/x-www-form-urlencoded") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } </code></pre></div><div role="tabpanel" class="tab-pane" id="deleteMonitorCSharp"><pre><code class="language-csharp"> var client = new RestClient("https://api.uptimerobot.com/v2/deleteMonitor"); var request = new RestRequest(Method.POST); request.AddHeader("content-type", "application/x-www-form-urlencoded"); request.AddHeader("cache-control", "no-cache"); request.AddParameter("application/x-www-form-urlencoded", "api_key=enterYourAPIKeyHere&format=json&id=777712827", ParameterType.RequestBody); IRestResponse response = client.Execute(request); </code></pre></div><div role="tabpanel" class="tab-pane" id="deleteMonitorRuby"><pre><code class="language-ruby"> require 'uri' require 'net/http' url = URI("https://api.uptimerobot.com/v2/deleteMonitor") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Post.new(url) request["cache-control"] = 'no-cache' request["content-type"] = 'application/x-www-form-urlencoded' request.body = "api_key=enterYourAPIKeyHere&format=json&id=777712827" response = http.request(request) puts response.read_body </code></pre></div><div role="tabpanel" class="tab-pane" id="deleteMonitorJava"><pre><code class="language-java"> OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded"); RequestBody body = RequestBody.create(mediaType, "api_key=enterYourAPIKeyHere&format=json&id=777712827"); Request request = new Request.Builder() .url("https://api.uptimerobot.com/v2/deleteMonitor") .post(body) .addHeader("cache-control", "no-cache") .addHeader("content-type", "application/x-www-form-urlencoded") .build(); Response response = client.newCall(request).execute(); </code></pre></div></div><h4 class="uk-margin-small-bottom">Response</h4><ul uk-tab="connect: .api-response-example"><li><a href="#">JSON</a></li><li><a href="#">XML</a></li></ul><div class="uk-switcher api-response-example"><div><pre><code class="language-json"> {"stat":"ok","monitor":{"id":777712827}} </code></pre></div><div><pre><code class="language-xml"> <?xml version="1.0" encoding="UTF-8"?><monitor id="777712827"/> </code></pre></div></div></div></li><li id="resetMonitorWrap"><a class="uk-accordion-title" href="#"><span class="uk-label uk-label-primary">POST</span> resetMonitor</a><div class="uk-accordion-content"><p>Monitors can be reset (deleting all stats and response time data) using this method.</p><h4 class="uk-margin-small-bottom">Parameters</h4><table class="api-params uk-table uk-table-divider uk-table-hover uk-margin-small-top"><tr><td><strong>api_key</strong></td><td><em>required</em></td></tr><tr><td><strong>id</strong></td><td><em>required</em> (the ID of the monitor to be reseted)</td></tr></table><p>The URL for the request would be:</p><p><code>https://api.uptimerobot.com/v2/resetMonitor</code></p><h4 class="uk-margin-small-bottom">Example</h4><div uk-switcher="toggle:>button; connect: .api-example"><button type="button" class="uk-button uk-button-small uk-active uk-button-primary" data-value="1">cURL</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="2">PHP cURL</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="3">PHP httpRequest</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="4">Python http.client</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="4">Python Requests</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="6">Node.js Native</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="7">Node.js Requests</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="8">Go</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="9">C#</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="10">Ruby</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="11">Java</button></div><div class="api-example uk-switcher uk-margin-small-top"><div role="tabpanel" class="tab-pane" id="resetMonitorCurl"><pre><code class="language-text"> curl -X POST -H "Cache-Control: no-cache" -H "Content-Type: application/x-www-form-urlencoded" -d 'api_key=enterYourAPIKeyHere&format=json&id=777712827' "https://api.uptimerobot.com/v2/resetMonitor" </code></pre></div><div role="tabpanel" class="tab-pane" id="resetMonitorPHPCurl"><pre><code class="language-php"> $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.uptimerobot.com/v2/resetMonitor", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "api_key=enterYourAPIKeyHere&format=json&id=777712827", CURLOPT_HTTPHEADER => array( "cache-control: no-cache", "content-type: application/x-www-form-urlencoded" ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } </code></pre></div><div role="tabpanel" class="tab-pane" id="resetMonitorPHPHttpRequest"><pre><code class="language-php"> $request = new HttpRequest(); $request->setUrl('https://api.uptimerobot.com/v2/resetMonitor'); $request->setMethod(HTTP_METH_POST); $request->setHeaders(array( 'content-type' => 'application/x-www-form-urlencoded', 'cache-control' => 'no-cache' )); $request->setContentType('application/x-www-form-urlencoded'); $request->setPostFields(array( 'api_key' => 'enterYourAPIKeyHere', 'format' => 'json', 'id' => '777712827' )); try { $response = $request->send(); echo $response->getBody(); } catch (HttpException $ex) { echo $ex; } </code></pre></div><div role="tabpanel" class="tab-pane" id="resetMonitorPythonHttpClient"><pre><code class="language-python"> import http.client conn = http.client.HTTPSConnection("api.uptimerobot.com") payload = "api_key=enterYourAPIKeyHere&format=json&id=777712827" headers = { 'cache-control': "no-cache", 'content-type': "application/x-www-form-urlencoded" } conn.request("POST", "/v2/resetMonitor", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) </code></pre></div><div role="tabpanel" class="tab-pane" id="resetMonitorPythonRequests"><pre><code class="language-python"> import requests url = "https://api.uptimerobot.com/v2/resetMonitor" payload = "api_key=enterYourAPIKeyHere&format=json&id=777712827" headers = { 'cache-control': "no-cache", 'content-type': "application/x-www-form-urlencoded" } response = requests.request("POST", url, data=payload, headers=headers) print(response.text) </code></pre></div><div role="tabpanel" class="tab-pane" id="resetMonitorNodejsNative"><pre><code class="language-js"> var qs = require("querystring"); var http = require("https"); var options = { "method": "POST", "hostname": "api.uptimerobot.com", "port": null, "path": "/v2/resetMonitor", "headers": { "cache-control": "no-cache", "content-type": "application/x-www-form-urlencoded" } }; var req = http.request(options, function (res) { var chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { var body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(qs.stringify({ api_key: 'enterYourAPIKeyHere', format: 'json', id: '777712827' })); req.end(); </code></pre></div><div role="tabpanel" class="tab-pane" id="resetMonitorNodejsRequest"><pre><code class="language-js"> var request = require("request"); var options = { method: 'POST', url: 'https://api.uptimerobot.com/v2/resetMonitor', headers: { 'content-type': 'application/x-www-form-urlencoded', 'cache-control': 'no-cache' }, form: { api_key: 'enterYourAPIKeyHere', format: 'json', id: '777712827' } }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); </code></pre></div><div role="tabpanel" class="tab-pane" id="resetMonitorGo"><pre><code class="language-go"> package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://api.uptimerobot.com/v2/resetMonitor" payload := strings.NewReader("api_key=enterYourAPIKeyHere&format=json&id=777712827") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("cache-control", "no-cache") req.Header.Add("content-type", "application/x-www-form-urlencoded") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } </code></pre></div><div role="tabpanel" class="tab-pane" id="resetMonitorCSharp"><pre><code class="language-csharp"> var client = new RestClient("https://api.uptimerobot.com/v2/resetMonitor"); var request = new RestRequest(Method.POST); request.AddHeader("content-type", "application/x-www-form-urlencoded"); request.AddHeader("cache-control", "no-cache"); request.AddParameter("application/x-www-form-urlencoded", "api_key=enterYourAPIKeyHere&format=json&id=777712827", ParameterType.RequestBody); IRestResponse response = client.Execute(request); </code></pre></div><div role="tabpanel" class="tab-pane" id="resetMonitorRuby"><pre><code class="language-ruby"> require 'uri' require 'net/http' url = URI("https://api.uptimerobot.com/v2/resetMonitor") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Post.new(url) request["cache-control"] = 'no-cache' request["content-type"] = 'application/x-www-form-urlencoded' request.body = "api_key=enterYourAPIKeyHere&format=json&id=777712827" response = http.request(request) puts response.read_body </code></pre></div><div role="tabpanel" class="tab-pane" id="resetMonitorJava"><pre><code class="language-java"> OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded"); RequestBody body = RequestBody.create(mediaType, "api_key=enterYourAPIKeyHere&format=json&id=777712827"); Request request = new Request.Builder() .url("https://api.uptimerobot.com/v2/resetMonitor") .post(body) .addHeader("cache-control", "no-cache") .addHeader("content-type", "application/x-www-form-urlencoded") .build(); Response response = client.newCall(request).execute(); </code></pre></div></div><h4 class="uk-margin-small-bottom">Response</h4><ul uk-tab="connect: .api-response-example"><li><a href="#">JSON</a></li><li><a href="#">XML</a></li></ul><div class="uk-switcher api-response-example"><div><pre><code class="language-json"> { "stat":"ok", "monitor": { "id": 777712827 } } </code></pre></div><div><pre><code class="language-xml"> <?xml version="1.0" encoding="UTF-8"?><monitor id="777712827"/> </code></pre></div></div></div></li><li id="getAlertContactsWrap"><a class="uk-accordion-title" href="#"><span class="uk-label uk-label-primary">POST</span> getAlertContacts</a><div class="uk-accordion-content"><p>The list of alert contacts can be called with this method.</p><h4 class="uk-margin-small-bottom">Parameters</h4><table class="api-params uk-table uk-table-divider uk-table-hover uk-margin-small-top"><tr><td><strong>api_key</strong></td><td><em>required</em></td></tr><tr><td><strong>alert_contacts</strong></td><td><em>optional</em> (if not used, will return all alert contacts in an account. Else, it is possible to define any number of alert contacts with their IDs like: <code>alert_contacts=236-1782-4790</code>)</td></tr><tr><td><strong>offset</strong></td><td><em>optional</em> (used for pagination. Defines the record to start paginating. Default is <code>0</code>)</td></tr><tr><td><strong>limit</strong></td><td><em>optional</em> (used for pagination. Defines the max number of records to return for the response. Default and max. is <code>50</code>)</td></tr></table><p>The URL for the request would be:</p><p><code>https://api.uptimerobot.com/v2/getAlertContacts</code></p><h4 class="uk-margin-small-bottom">Example</h4><div uk-switcher="toggle:>button; connect: .api-example"><button type="button" class="uk-button uk-button-small uk-active uk-button-primary" data-value="1">cURL</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="2">PHP cURL</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="3">PHP httpRequest</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="4">Python http.client</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="4">Python Requests</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="6">Node.js Native</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="7">Node.js Requests</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="8">Go</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="9">C#</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="10">Ruby</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="11">Java</button></div><div class="api-example uk-switcher uk-margin-small-top"><div role="tabpanel" class="tab-pane" id="getAlertContactsCurl"><pre><code class="language-text"> curl -X POST -H "Cache-Control: no-cache" -H "Content-Type: application/x-www-form-urlencoded" -d 'api_key=enterYourAPIKeyHere&format=json' "https://api.uptimerobot.com/v2/getAlertContacts" </code></pre></div><div role="tabpanel" class="tab-pane" id="getAlertContactsPHPCurl"><pre><code class="language-php"> $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.uptimerobot.com/v2/getAlertContacts", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "api_key=enterYourAPIKeyHere&format=json", CURLOPT_HTTPHEADER => array( "cache-control: no-cache", "content-type: application/x-www-form-urlencoded" ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } </code></pre></div><div role="tabpanel" class="tab-pane" id="getAlertContactsPHPHttpRequest"><pre><code class="language-php"> $request = new HttpRequest(); $request->setUrl('https://api.uptimerobot.com/v2/getAlertContacts'); $request->setMethod(HTTP_METH_POST); $request->setHeaders(array( 'content-type' => 'application/x-www-form-urlencoded', 'cache-control' => 'no-cache' )); $request->setContentType('application/x-www-form-urlencoded'); $request->setPostFields(array( 'api_key' => 'enterYourAPIKeyHere', 'format' => 'json' )); try { $response = $request->send(); echo $response->getBody(); } catch (HttpException $ex) { echo $ex; } </code></pre></div><div role="tabpanel" class="tab-pane" id="getAlertContactsPythonHttpClient"><pre><code class="language-python"> import http.client conn = http.client.HTTPSConnection("api.uptimerobot.com") payload = "api_key=enterYourAPIKeyHere&format=json" headers = { 'cache-control': "no-cache", 'content-type': "application/x-www-form-urlencoded" } conn.request("POST", "/v2/getAlertContacts", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) </code></pre></div><div role="tabpanel" class="tab-pane" id="getAlertContactsPythonRequests"><pre><code class="language-python"> import requests url = "https://api.uptimerobot.com/v2/getAlertContacts" payload = "api_key=enterYourAPIKeyHere&format=json" headers = { 'cache-control': "no-cache", 'content-type': "application/x-www-form-urlencoded" } response = requests.request("POST", url, data=payload, headers=headers) print(response.text) </code></pre></div><div role="tabpanel" class="tab-pane" id="getAlertContactsNodejsNative"><pre><code class="language-js"> var qs = require("querystring"); var http = require("https"); var options = { "method": "POST", "hostname": "api.uptimerobot.com", "port": null, "path": "/v2/getAlertContacts", "headers": { "cache-control": "no-cache", "content-type": "application/x-www-form-urlencoded" } }; var req = http.request(options, function (res) { var chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { var body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(qs.stringify({ api_key: 'enterYourAPIKeyHere', format: 'json' })); req.end(); </code></pre></div><div role="tabpanel" class="tab-pane" id="getAlertContactsNodejsRequest"><pre><code class="language-js"> var request = require("request"); var options = { method: 'POST', url: 'https://api.uptimerobot.com/v2/getAlertContacts', headers: { 'content-type': 'application/x-www-form-urlencoded', 'cache-control': 'no-cache' }, form: { api_key: 'enterYourAPIKeyHere', format: 'json' } }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); </code></pre></div><div role="tabpanel" class="tab-pane" id="getAlertContactsGo"><pre><code class="language-go"> package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://api.uptimerobot.com/v2/getAlertContacts" payload := strings.NewReader("api_key=enterYourAPIKeyHere&format=json") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("cache-control", "no-cache") req.Header.Add("content-type", "application/x-www-form-urlencoded") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } </code></pre></div><div role="tabpanel" class="tab-pane" id="getAlertContactsCSharp"><pre><code class="language-csharp"> var client = new RestClient("https://api.uptimerobot.com/v2/getAlertContacts"); var request = new RestRequest(Method.POST); request.AddHeader("content-type", "application/x-www-form-urlencoded"); request.AddHeader("cache-control", "no-cache"); request.AddParameter("application/x-www-form-urlencoded", "api_key=enterYourAPIKeyHere&format=json", ParameterType.RequestBody); IRestResponse response = client.Execute(request); </code></pre></div><div role="tabpanel" class="tab-pane" id="getAlertContactsRuby"><pre><code class="language-ruby"> require 'uri' require 'net/http' url = URI("https://api.uptimerobot.com/v2/getAlertContacts") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Post.new(url) request["cache-control"] = 'no-cache' request["content-type"] = 'application/x-www-form-urlencoded' request.body = "api_key=enterYourAPIKeyHere&format=json" response = http.request(request) puts response.read_body </code></pre></div><div role="tabpanel" class="tab-pane" id="getAlertContactsJava"><pre><code class="language-java"> OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded"); RequestBody body = RequestBody.create(mediaType, "api_key=enterYourAPIKeyHere&format=json"); Request request = new Request.Builder() .url("https://api.uptimerobot.com/v2/getAlertContacts") .post(body) .addHeader("cache-control", "no-cache") .addHeader("content-type", "application/x-www-form-urlencoded") .build(); Response response = client.newCall(request).execute(); </code></pre></div></div><h4 class="uk-margin-small-bottom">Response</h4><ul uk-tab="connect: .api-response-example"><li><a href="#">JSON</a></li><li><a href="#">XML</a></li></ul><div class="uk-switcher api-response-example"><div><pre><code class="language-json"> { "stat": "ok", "limit": 50, "offset": 0, "total": 2, "alert_contacts": [ { "id": "0993765", "friendly_name": "John Doe", "type": 2, "status": 1, "value": "johndoe@gmail.com" }, { "id": "2403924", "friendly_name": "My Twitter", "type": 3, "status": 0, "value": "sampleTwitterAccount" } ] } </code></pre></div><div><pre><code class="language-xml"> <?xml version="1.0" encoding="UTF-8"?> <alert_contacts offset="0" limit="50" total="2"> <alert_contact id="0993765" friendly_name="John Doe" type="2" status="1" value="johndoe@gmail.com"/> <alert_contact id="2403924" friendly_name="My Twitter" type="3" status="0" value="sampleTwitterAccount"/> </alert_contacts> </code></pre></div></div></div></li><li id="newAlertContactWrap"><a class="uk-accordion-title" href="#"><span class="uk-label uk-label-primary">POST</span> newAlertContact</a><div class="uk-accordion-content"><p>New alert contacts of any type (<strong>mobile/SMS alert contacts are not supported yet</strong>) can be created using this method.</p><p>The alert contacts created using the API are validated with the same way as they were created from uptimerobot.com (activation link for e-mails, etc.).</p><h4 class="uk-margin-small-bottom">Parameters</h4><table class="api-params uk-table uk-table-divider uk-table-hover uk-margin-small-top"><tr><td><strong>api_key</strong></td><td><em>required</em></td></tr><tr><td><strong>type</strong></td><td><em>required</em></td></tr><tr><td><strong>value</strong></td><td><em>required</em></td></tr><tr><td><strong>friendly_name</strong></td><td><em>optional</em></td></tr></table><p>The URL for the request would be:</p><p><code>https://api.uptimerobot.com/v2/newAlertContact</code></p><h4 class="uk-margin-small-bottom">Example</h4><div uk-switcher="toggle:>button; connect: .api-example"><button type="button" class="uk-button uk-button-small uk-active uk-button-primary" data-value="1">cURL</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="2">PHP cURL</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="3">PHP httpRequest</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="4">Python http.client</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="4">Python Requests</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="6">Node.js Native</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="7">Node.js Requests</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="8">Go</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="9">C#</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="10">Ruby</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="11">Java</button></div><div class="api-example uk-switcher uk-margin-small-top"><div role="tabpanel" class="tab-pane" id="newAlertContactCurl"><pre><code class="language-text"> curl -X POST -H "Cache-Control: no-cache" -H "Content-Type: application/x-www-form-urlencoded" -d 'api_key=enterYourAPIKeyHere&format=json&type=1&friendly_name=My Alert Contact&value=test@mydomain.com' "https://api.uptimerobot.com/v2/newAlertContact" </code></pre></div><div role="tabpanel" class="tab-pane" id="newAlertContactPHPCurl"><pre><code class="language-php"> $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.uptimerobot.com/v2/newAlertContact", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "api_key=enterYourAPIKeyHere&format=json&type=1&friendly_name=My%20Alert%20Contact&value=test%40mydomain.com", CURLOPT_HTTPHEADER => array( "cache-control: no-cache", "content-type: application/x-www-form-urlencoded" ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } </code></pre></div><div role="tabpanel" class="tab-pane" id="newAlertContactPHPHttpRequest"><pre><code class="language-php"> $request = new HttpRequest(); $request->setUrl('https://api.uptimerobot.com/v2/newAlertContact'); $request->setMethod(HTTP_METH_POST); $request->setHeaders(array( 'content-type' => 'application/x-www-form-urlencoded', 'cache-control' => 'no-cache' )); $request->setContentType('application/x-www-form-urlencoded'); $request->setPostFields(array( 'api_key' => 'enterYourAPIKeyHere', 'format' => 'json', 'type' => '1', 'friendly_name' => 'My Alert Contact', 'value' => 'test@mydomain.com' )); try { $response = $request->send(); echo $response->getBody(); } catch (HttpException $ex) { echo $ex; } </code></pre></div><div role="tabpanel" class="tab-pane" id="newAlertContactPythonHttpClient"><pre><code class="language-python"> import http.client conn = http.client.HTTPSConnection("api.uptimerobot.com") payload = "api_key=enterYourAPIKeyHere&format=json&type=1&friendly_name=My%20Alert%20Contact&value=test%40mydomain.com" headers = { 'cache-control': "no-cache", 'content-type': "application/x-www-form-urlencoded" } conn.request("POST", "/v2/newAlertContact", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) </code></pre></div><div role="tabpanel" class="tab-pane" id="newAlertContactPythonRequests"><pre><code class="language-python"> import requests url = "https://api.uptimerobot.com/v2/newAlertContact" payload = "api_key=enterYourAPIKeyHere&format=json&type=1&friendly_name=My%20Alert%20Contact&value=test%40mydomain.com" headers = { 'cache-control': "no-cache", 'content-type': "application/x-www-form-urlencoded" } response = requests.request("POST", url, data=payload, headers=headers) print(response.text) </code></pre></div><div role="tabpanel" class="tab-pane" id="newAlertContactNodejsNative"><pre><code class="language-js"> var qs = require("querystring"); var http = require("https"); var options = { "method": "POST", "hostname": "api.uptimerobot.com", "port": null, "path": "/v2/newAlertContact", "headers": { "cache-control": "no-cache", "content-type": "application/x-www-form-urlencoded" } }; var req = http.request(options, function (res) { var chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { var body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(qs.stringify({ api_key: 'enterYourAPIKeyHere', format: 'json', type: '1', friendly_name: 'My Alert Contact', value: 'test@mydomain.com' })); req.end(); </code></pre></div><div role="tabpanel" class="tab-pane" id="newAlertContactNodejsRequest"><pre><code class="language-js"> var request = require("request"); var options = { method: 'POST', url: 'https://api.uptimerobot.com/v2/newAlertContact', headers: { 'content-type': 'application/x-www-form-urlencoded', 'cache-control': 'no-cache' }, form: { api_key: 'enterYourAPIKeyHere', format: 'json', type: '1', friendly_name: 'My Alert Contact', value: 'test@mydomain.com' } }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); </code></pre></div><div role="tabpanel" class="tab-pane" id="newAlertContactGo"><pre><code class="language-go"> package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://api.uptimerobot.com/v2/newAlertContact" payload := strings.NewReader("api_key=enterYourAPIKeyHere&format=json&type=1&friendly_name=My%20Alert%20Contact&value=test%40mydomain.com") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("cache-control", "no-cache") req.Header.Add("content-type", "application/x-www-form-urlencoded") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } </code></pre></div><div role="tabpanel" class="tab-pane" id="newAlertContactCSharp"><pre><code class="language-csharp"> var client = new RestClient("https://api.uptimerobot.com/v2/newAlertContact"); var request = new RestRequest(Method.POST); request.AddHeader("content-type", "application/x-www-form-urlencoded"); request.AddHeader("cache-control", "no-cache"); request.AddParameter("application/x-www-form-urlencoded", "api_key=enterYourAPIKeyHere&format=json&type=1&friendly_name=My%20Alert%20Contact&value=test%40mydomain.com", ParameterType.RequestBody); IRestResponse response = client.Execute(request); </code></pre></div><div role="tabpanel" class="tab-pane" id="newAlertContactRuby"><pre><code class="language-ruby"> require 'uri' require 'net/http' url = URI("https://api.uptimerobot.com/v2/newAlertContact") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Post.new(url) request["cache-control"] = 'no-cache' request["content-type"] = 'application/x-www-form-urlencoded' request.body = "api_key=enterYourAPIKeyHere&format=json&type=1&friendly_name=My%20Alert%20Contact&value=test%40mydomain.com" response = http.request(request) puts response.read_body </code></pre></div><div role="tabpanel" class="tab-pane" id="newAlertContactJava"><pre><code class="language-java"> OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded"); RequestBody body = RequestBody.create(mediaType, "api_key=enterYourAPIKeyHere&format=json&type=1&friendly_name=My%20Alert%20Contact&value=test%40mydomain.com"); Request request = new Request.Builder() .url("https://api.uptimerobot.com/v2/newAlertContact") .post(body) .addHeader("cache-control", "no-cache") .addHeader("content-type", "application/x-www-form-urlencoded") .build(); Response response = client.newCall(request).execute(); </code></pre></div></div><h4 class="uk-margin-small-bottom">Response</h4><ul uk-tab="connect: .api-response-example"><li><a href="#">JSON</a></li><li><a href="#">XML</a></li></ul><div class="uk-switcher api-response-example"><div><pre><code class="language-json"> jsonUptimeRobotApi({ "stat": "ok", "alertcontact": { "id": "4561", "status": "0" } }) </code></pre></div><div><pre><code class="language-xml"> <alertcontact id="236" status="2"/></alertcontact> </code></pre></div></div></div></li><li id="editAlertContactWrap"><a class="uk-accordion-title" href="#"><span class="uk-label uk-label-primary">POST</span> editAlertContact</a><div class="uk-accordion-content"><p>Alert contacts can be edited using this method.</p><h4 class="uk-margin-small-bottom">Parameters</h4><table class="api-params uk-table uk-table-divider uk-table-hover uk-margin-small-top"><tr><td><strong>api_key</strong></td><td><em>required</em></td></tr><tr><td><strong>id</strong></td><td><em>required</em></td></tr><tr><td><strong>friendly_name</strong></td><td><em>optional</em></td></tr><tr><td><strong>value</strong></td><td><em>optional</em> (can only be used if it is a web-hook alert contact)</td></tr></table><p>The URL for the request would be:</p><p><code>https://api.uptimerobot.com/v2/editAlertContact</code></p><h4 class="uk-margin-small-bottom">Example</h4><div uk-switcher="toggle:>button; connect: .api-example"><button type="button" class="uk-button uk-button-small uk-active uk-button-primary" data-value="1">cURL</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="2">PHP cURL</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="3">PHP httpRequest</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="4">Python http.client</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="4">Python Requests</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="6">Node.js Native</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="7">Node.js Requests</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="8">Go</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="9">C#</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="10">Ruby</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="11">Java</button></div><div class="api-example uk-switcher uk-margin-small-top"><div role="tabpanel" class="tab-pane active" id="editAlertContactCurl"><pre><code class="language-text"> curl -X POST -H "Cache-Control: no-cache" -H "Content-Type: application/x-www-form-urlencoded" -d 'api_key=enterYourAPIKeyHere&format=json&friendly_name=New Name For Alert Contact&id=236&=' "https://api.uptimerobot.com/v2/editAlertContact" </code></pre></div><div role="tabpanel" class="tab-pane" id="editAlertContactPHPCurl"><pre><code class="language-php"> $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.uptimerobot.com/v2/editAlertContact", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "api_key=enterYourAPIKeyHere&format=json&friendly_name=New%20Name%20For%20Alert%20Contact&id=236&=", CURLOPT_HTTPHEADER => array( "cache-control: no-cache", "content-type: application/x-www-form-urlencoded" ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } </code></pre></div><div role="tabpanel" class="tab-pane" id="editAlertContactPHPHttpRequest"><pre><code class="language-php"> $request = new HttpRequest(); $request->setUrl('https://api.uptimerobot.com/v2/editAlertContact'); $request->setMethod(HTTP_METH_POST); $request->setHeaders(array( 'content-type' => 'application/x-www-form-urlencoded', 'cache-control' => 'no-cache' )); $request->setContentType('application/x-www-form-urlencoded'); $request->setPostFields(array( 'api_key' => 'enterYourAPIKeyHere', 'format' => 'json', 'friendly_name' => 'New Name For Alert Contact', 'id' => '236', '' => '' )); try { $response = $request->send(); echo $response->getBody(); } catch (HttpException $ex) { echo $ex; } </code></pre></div><div role="tabpanel" class="tab-pane" id="editAlertContactPythonHttpClient"><pre><code class="language-python"> import http.client conn = http.client.HTTPSConnection("api.uptimerobot.com") payload = "api_key=enterYourAPIKeyHere&format=json&friendly_name=New%20Name%20For%20Alert%20Contact&id=236&=" headers = { 'cache-control': "no-cache", 'content-type': "application/x-www-form-urlencoded" } conn.request("POST", "/v2/editAlertContact", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) </code></pre></div><div role="tabpanel" class="tab-pane" id="editAlertContactPythonRequests"><pre><code class="language-python"> import requests url = "https://api.uptimerobot.com/v2/editAlertContact" payload = "api_key=enterYourAPIKeyHere&format=json&friendly_name=New%20Name%20For%20Alert%20Contact&id=236&=" headers = { 'cache-control': "no-cache", 'content-type': "application/x-www-form-urlencoded" } response = requests.request("POST", url, data=payload, headers=headers) print(response.text) </code></pre></div><div role="tabpanel" class="tab-pane" id="editAlertContactNodejsNative"><pre><code class="language-js"> var qs = require("querystring"); var http = require("https"); var options = { "method": "POST", "hostname": "api.uptimerobot.com", "port": null, "path": "/v2/editAlertContact", "headers": { "cache-control": "no-cache", "content-type": "application/x-www-form-urlencoded" } }; var req = http.request(options, function (res) { var chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { var body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(qs.stringify({ api_key: 'enterYourAPIKeyHere', format: 'json', friendly_name: 'New Name For Alert Contact', id: '236', '': '' })); req.end(); </code></pre></div><div role="tabpanel" class="tab-pane" id="editAlertContactNodejsRequest"><pre><code class="language-js"> var request = require("request"); var options = { method: 'POST', url: 'https://api.uptimerobot.com/v2/editAlertContact', headers: { 'content-type': 'application/x-www-form-urlencoded', 'cache-control': 'no-cache' }, form: { api_key: 'enterYourAPIKeyHere', format: 'json', friendly_name: 'New Name For Alert Contact', id: '236', '': '' } }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); </code></pre></div><div role="tabpanel" class="tab-pane" id="editAlertContactGo"><pre><code class="language-go"> package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://api.uptimerobot.com/v2/editAlertContact" payload := strings.NewReader("api_key=enterYourAPIKeyHere&format=json&friendly_name=New%20Name%20For%20Alert%20Contact&id=236&=") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("cache-control", "no-cache") req.Header.Add("content-type", "application/x-www-form-urlencoded") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } </code></pre></div><div role="tabpanel" class="tab-pane" id="editAlertContactCSharp"><pre><code class="language-csharp"> var client = new RestClient("https://api.uptimerobot.com/v2/editAlertContact"); var request = new RestRequest(Method.POST); request.AddHeader("content-type", "application/x-www-form-urlencoded"); request.AddHeader("cache-control", "no-cache"); request.AddParameter("application/x-www-form-urlencoded", "api_key=enterYourAPIKeyHere&format=json&friendly_name=New%20Name%20For%20Alert%20Contact&id=236&=", ParameterType.RequestBody); IRestResponse response = client.Execute(request); </code></pre></div><div role="tabpanel" class="tab-pane" id="editAlertContactRuby"><pre><code class="language-ruby"> require 'uri' require 'net/http' url = URI("https://api.uptimerobot.com/v2/editAlertContact") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Post.new(url) request["cache-control"] = 'no-cache' request["content-type"] = 'application/x-www-form-urlencoded' request.body = "api_key=enterYourAPIKeyHere&format=json&friendly_name=New%20Name%20For%20Alert%20Contact&id=236&=" response = http.request(request) puts response.read_body </code></pre></div><div role="tabpanel" class="tab-pane" id="editAlertContactJava"><pre><code class="language-java"> OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded"); RequestBody body = RequestBody.create(mediaType, "api_key=enterYourAPIKeyHere&format=json&friendly_name=New%20Name%20For%20Alert%20Contact&id=236&="); Request request = new Request.Builder() .url("https://api.uptimerobot.com/v2/editAlertContact") .post(body) .addHeader("cache-control", "no-cache") .addHeader("content-type", "application/x-www-form-urlencoded") .build(); Response response = client.newCall(request).execute(); </code></pre></div></div><h4 class="uk-margin-small-bottom">Response</h4><ul uk-tab="connect: .api-response-example"><li><a href="#">JSON</a></li><li><a href="#">XML</a></li></ul><div class="uk-switcher api-response-example"><div><pre><code class="language-json"> jsonUptimeRobotApi({ "stat": "ok", "alertcontact": { "id": "236" } }) </code></pre></div><div><pre><code class="language-xml"> <alertcontact id="236"/></alertcontact> </code></pre></div></div></div></li><li id="deleteAlertContactWrap"><a class="uk-accordion-title" href="#"><span class="uk-label uk-label-primary">POST</span> deleteAlertContact</a><div class="uk-accordion-content"><p>Alert contacts can be deleted using this method.</p><h4 class="uk-margin-small-bottom">Parameters</h4><table class="api-params uk-table uk-table-divider uk-table-hover uk-margin-small-top"><tr><td><strong>api_key</strong></td><td><em>required</em></td></tr><tr><td><strong>id</strong></td><td><em>required</em></td></tr></table><p>The URL for the request would be:</p><p><code>https://api.uptimerobot.com/v2/deleteAlertContact</code></p><h4 class="uk-margin-small-bottom">Example</h4><div uk-switcher="toggle:>button; connect: .api-example"><button type="button" class="uk-button uk-button-small uk-active uk-button-primary" data-value="1">cURL</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="2">PHP cURL</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="3">PHP httpRequest</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="4">Python http.client</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="4">Python Requests</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="6">Node.js Native</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="7">Node.js Requests</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="8">Go</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="9">C#</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="10">Ruby</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="11">Java</button></div><div class="api-example uk-switcher uk-margin-small-top"><div role="tabpanel" class="tab-pane" id="deleteAlertContactCurl"><pre><code class="language-text"> curl -X POST -H "Cache-Control: no-cache" -H "Content-Type: application/x-www-form-urlencoded" -d 'api_key=enterYourAPIKeyHere&format=json&id=2414745' "https://api.uptimerobot.com/v2/deleteAlertContact" </code></pre></div><div role="tabpanel" class="tab-pane" id="deleteAlertContactPHPCurl"><pre><code class="language-php"> $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.uptimerobot.com/v2/deleteAlertContact", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "api_key=enterYourAPIKeyHere&format=json&id=2414745", CURLOPT_HTTPHEADER => array( "cache-control: no-cache", "content-type: application/x-www-form-urlencoded" ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } </code></pre></div><div role="tabpanel" class="tab-pane" id="deleteAlertContactPHPHttpRequest"><pre><code class="language-php"> $request = new HttpRequest(); $request->setUrl('https://api.uptimerobot.com/v2/deleteAlertContact'); $request->setMethod(HTTP_METH_POST); $request->setHeaders(array( 'content-type' => 'application/x-www-form-urlencoded', 'cache-control' => 'no-cache' )); $request->setContentType('application/x-www-form-urlencoded'); $request->setPostFields(array( 'api_key' => 'enterYourAPIKeyHere', 'format' => 'json', 'id' => '2414745' )); try { $response = $request->send(); echo $response->getBody(); } catch (HttpException $ex) { echo $ex; } </code></pre></div><div role="tabpanel" class="tab-pane" id="deleteAlertContactPythonHttpClient"><pre><code class="language-python"> import http.client conn = http.client.HTTPSConnection("api.uptimerobot.com") payload = "api_key=enterYourAPIKeyHere&format=json&id=2414745" headers = { 'cache-control': "no-cache", 'content-type': "application/x-www-form-urlencoded" } conn.request("POST", "/v2/deleteAlertContact", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) </code></pre></div><div role="tabpanel" class="tab-pane" id="deleteAlertContactPythonRequests"><pre><code class="language-python"> import requests url = "https://api.uptimerobot.com/v2/deleteAlertContact" payload = "api_key=enterYourAPIKeyHere&format=json&id=2414745" headers = { 'cache-control': "no-cache", 'content-type': "application/x-www-form-urlencoded" } response = requests.request("POST", url, data=payload, headers=headers) print(response.text) </code></pre></div><div role="tabpanel" class="tab-pane" id="deleteAlertContactNodejsNative"><pre><code class="language-js"> var qs = require("querystring"); var http = require("https"); var options = { "method": "POST", "hostname": "api.uptimerobot.com", "port": null, "path": "/v2/deleteAlertContact", "headers": { "cache-control": "no-cache", "content-type": "application/x-www-form-urlencoded" } }; var req = http.request(options, function (res) { var chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { var body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(qs.stringify({ api_key: 'enterYourAPIKeyHere', format: 'json', id: '2414745' })); req.end(); </code></pre></div><div role="tabpanel" class="tab-pane" id="deleteAlertContactNodejsRequest"><pre><code class="language-js"> var request = require("request"); var options = { method: 'POST', url: 'https://api.uptimerobot.com/v2/deleteAlertContact', headers: { 'content-type': 'application/x-www-form-urlencoded', 'cache-control': 'no-cache' }, form: { api_key: 'enterYourAPIKeyHere', format: 'json', id: '2414745' } }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); </code></pre></div><div role="tabpanel" class="tab-pane" id="deleteAlertContactGo"><pre><code class="language-go"> var request = require("request"); var options = { method: 'POST', url: 'https://api.uptimerobot.com/v2/deleteAlertContact', headers: { 'content-type': 'application/x-www-form-urlencoded', 'cache-control': 'no-cache' }, form: { api_key: 'enterYourAPIKeyHere', format: 'json', id: '2414745' } }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); </code></pre></div><div role="tabpanel" class="tab-pane" id="deleteAlertContactCSharp"><pre><code class="language-csharp"> var client = new RestClient("https://api.uptimerobot.com/v2/deleteAlertContact"); var request = new RestRequest(Method.POST); request.AddHeader("content-type", "application/x-www-form-urlencoded"); request.AddHeader("cache-control", "no-cache"); request.AddParameter("application/x-www-form-urlencoded", "api_key=enterYourAPIKeyHere&format=json&id=2414745", ParameterType.RequestBody); IRestResponse response = client.Execute(request); </code></pre></div><div role="tabpanel" class="tab-pane" id="deleteAlertContactRuby"><pre><code class="language-ruby"> require 'uri' require 'net/http' url = URI("https://api.uptimerobot.com/v2/deleteAlertContact") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Post.new(url) request["cache-control"] = 'no-cache' request["content-type"] = 'application/x-www-form-urlencoded' request.body = "api_key=enterYourAPIKeyHere&format=json&id=2414745" response = http.request(request) puts response.read_body </code></pre></div><div role="tabpanel" class="tab-pane" id="deleteAlertContactJava"><pre><code class="language-java"> OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded"); RequestBody body = RequestBody.create(mediaType, "api_key=enterYourAPIKeyHere&format=json&id=2414745"); Request request = new Request.Builder() .url("https://api.uptimerobot.com/v2/deleteAlertContact") .post(body) .addHeader("cache-control", "no-cache") .addHeader("content-type", "application/x-www-form-urlencoded") .build(); Response response = client.newCall(request).execute(); </code></pre></div></div><h4 class="uk-margin-small-bottom">Response</h4><ul uk-tab="connect: .api-response-example"><li><a href="#">JSON</a></li><li><a href="#">XML</a></li></ul><div class="uk-switcher api-response-example"><div><pre><code class="language-json"> jsonUptimeRobotApi({ "stat": "ok", "alert_contact": { "id": "236" } }) </code></pre></div><div><pre><code class="language-xml"> <alertcontact id="236"/></alertcontact> </code></pre></div></div></div></li><li id="getMWindowsWrap"><a class="uk-accordion-title" href="#"><span class="uk-label uk-label-primary">POST</span> getMWindows</a><div class="uk-accordion-content" style="display:block"><p>The list of maintenance windows can be called with this method.</p><h4 class="uk-margin-small-bottom">Parameters</h4><table class="api-params uk-table uk-table-divider uk-table-hover uk-margin-small-top"><tr><td><strong>api_key</strong></td><td><em>required</em></td></tr><tr><td><strong>mwindows</strong></td><td><em>optional</em> (if not used, will return all mwindows in an account. Else, it is possible to define any number of mwindows with their IDs like: <code>mwindows=236-1782-4790</code>)</td></tr><tr><td><strong>offset</strong></td><td><em>optional</em> (used for pagination. Defines the record to start paginating. Default is <code>0</code>)</td></tr><tr><td><strong>limit</strong></td><td><em>optional</em> (used for pagination. Defines the max number of records to return for the response. Default and max. is <code>50</code>)</td></tr></table><p>The URL for the request would be:</p><p><code>https://api.uptimerobot.com/v2/getMWindows</code></p><h4 class="uk-margin-small-bottom">Example</h4><div uk-switcher="toggle:>button; connect: .api-example"><button type="button" class="uk-button uk-button-small uk-active uk-button-primary" data-value="1">cURL</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="2">PHP cURL</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="3">PHP httpRequest</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="4">Python http.client</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="4">Python Requests</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="6">Node.js Native</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="7">Node.js Requests</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="8">Go</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="9">C#</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="10">Ruby</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="11">Java</button></div><div class="api-example uk-switcher uk-margin-small-top"><div role="tabpanel" class="tab-pane active" id="getMWindowsCurl"><pre><code class="language-text"> curl -X POST -H "Cache-Control: no-cache" -H "Content-Type: application/x-www-form-urlencoded" -d 'api_key=enterYourAPIKeyHere&format=json' "https://api.uptimerobot.com/v2/getMWindows" </code></pre></div><div role="tabpanel" class="tab-pane" id="getMWindowsPHPCurl"><pre><code class="language-php"> $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.uptimerobot.com/v2/getMWindows", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "api_key=enterYourAPIKeyHere&format=json", CURLOPT_HTTPHEADER => array( "cache-control: no-cache", "content-type: application/x-www-form-urlencoded" ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } </code></pre></div><div role="tabpanel" class="tab-pane" id="getMWindowsPHPHttpRequest"><pre><code class="language-php"> $request = new HttpRequest(); $request->setUrl('https://api.uptimerobot.com/v2/getMWindows'); $request->setMethod(HTTP_METH_POST); $request->setHeaders(array( 'content-type' => 'application/x-www-form-urlencoded', 'cache-control' => 'no-cache' )); $request->setContentType('application/x-www-form-urlencoded'); $request->setPostFields(array( 'api_key' => 'enterYourAPIKeyHere', 'format' => 'json' )); try { $response = $request->send(); echo $response->getBody(); } catch (HttpException $ex) { echo $ex; } </code></pre></div><div role="tabpanel" class="tab-pane" id="getMWindowsPythonHttpClient"><pre><code class="language-python"> import http.client conn = http.client.HTTPSConnection("api.uptimerobot.com") payload = "api_key=enterYourAPIKeyHere&format=json" headers = { 'cache-control': "no-cache", 'content-type': "application/x-www-form-urlencoded" } conn.request("POST", "/v2/getMWindows", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) </code></pre></div><div role="tabpanel" class="tab-pane" id="getMWindowsPythonRequests"><pre><code class="language-python"> import requests url = "https://api.uptimerobot.com/v2/getMWindows" payload = "api_key=enterYourAPIKeyHere&format=json" headers = { 'cache-control': "no-cache", 'content-type': "application/x-www-form-urlencoded" } response = requests.request("POST", url, data=payload, headers=headers) print(response.text) </code></pre></div><div role="tabpanel" class="tab-pane" id="getMWindowsNodejsNative"><pre><code class="language-js"> var qs = require("querystring"); var http = require("https"); var options = { "method": "POST", "hostname": "api.uptimerobot.com", "port": null, "path": "/v2/getMWindows", "headers": { "cache-control": "no-cache", "content-type": "application/x-www-form-urlencoded" } }; var req = http.request(options, function (res) { var chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { var body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(qs.stringify({ api_key: 'enterYourAPIKeyHere', format: 'json' })); req.end(); </code></pre></div><div role="tabpanel" class="tab-pane" id="getMWindowsNodejsRequest"><pre><code class="language-js"> var request = require("request"); var options = { method: 'POST', url: 'https://api.uptimerobot.com/v2/getMWindows', headers: { 'content-type': 'application/x-www-form-urlencoded', 'cache-control': 'no-cache' }, form: { api_key: 'enterYourAPIKeyHere', format: 'json' } }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); </code></pre></div><div role="tabpanel" class="tab-pane" id="getMWindowsGo"><pre><code class="language-go"> package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://api.uptimerobot.com/v2/getMWindows" payload := strings.NewReader("api_key=enterYourAPIKeyHere&format=json") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("cache-control", "no-cache") req.Header.Add("content-type", "application/x-www-form-urlencoded") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } </code></pre></div><div role="tabpanel" class="tab-pane" id="getMWindowsCSharp"><pre><code class="language-csharp"> var client = new RestClient("https://api.uptimerobot.com/v2/getMWindows"); var request = new RestRequest(Method.POST); request.AddHeader("content-type", "application/x-www-form-urlencoded"); request.AddHeader("cache-control", "no-cache"); request.AddParameter("application/x-www-form-urlencoded", "api_key=enterYourAPIKeyHere&format=json", ParameterType.RequestBody); IRestResponse response = client.Execute(request); </code></pre></div><div role="tabpanel" class="tab-pane" id="getMWindowsRuby"><pre><code class="language-ruby"> require 'uri' require 'net/http' url = URI("https://api.uptimerobot.com/v2/getMWindows") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Post.new(url) request["cache-control"] = 'no-cache' request["content-type"] = 'application/x-www-form-urlencoded' request.body = "api_key=enterYourAPIKeyHere&format=json" response = http.request(request) puts response.read_body </code></pre></div><div role="tabpanel" class="tab-pane" id="getMWindowsJava"><pre><code class="language-java"> OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded"); RequestBody body = RequestBody.create(mediaType, "api_key=enterYourAPIKeyHere&format=json"); Request request = new Request.Builder() .url("https://api.uptimerobot.com/v2/getMWindows") .post(body) .addHeader("cache-control", "no-cache") .addHeader("content-type", "application/x-www-form-urlencoded") .build(); Response response = client.newCall(request).execute(); </code></pre></div></div><h4 class="uk-margin-small-bottom">Response</h4><ul uk-tab="connect: .api-response-example"><li><a href="#">JSON</a></li><li><a href="#">XML</a></li></ul><div class="uk-switcher api-response-example"><div><pre><code class="language-json"> { "stat": "ok", "pagination": { "limit": 10, "offset": 0, "total": 3 }, "mwindows": [ { "id": 581, "user": 1, "type": 1, "friendly_name": "Once Backup", "start_time": 1461024000, "duration": 12, "value": "", "status": 1 }, { "id": 582, "user": 1, "type": 2, "friendly_name": "Daily Reboot", "start_time": "06:37", "duration": 2, "value": "", "status": 1 } ] } </code></pre></div><div><pre><code class="language-xml"> <?xml version="1.0" encoding="UTF-8"?> <result> <pagination> <limit>10</limit> <offset>0</offset> <total>3</total> </pagination> <mwindows> <mwindow> <id>581</id> <user>1</user> <type>1</type> <friendly_name>Once Backup</friendly_name> <start_time>1461024000</start_time> <duration>12</duration> <value></value> <status>1</status> </mwindow> <mwindow> <id>582</id> <user>1</user> <type>2</type> <friendly_name>Daily Reboot</friendly_name> <start_time>06:37</start_time> <duration>2</duration> <value></value> <status>1</status> </mwindow> </mwindows> </result> </code></pre></div></div></div></li><li id="newMWindowWrap"><a class="uk-accordion-title" href="#"><span class="uk-label uk-label-primary">POST</span> newMWindow</a><div class="uk-accordion-content"><p>New maintenance windows can be created using this method.</p><h4 class="uk-margin-small-bottom">Parameters</h4><table class="api-params uk-table uk-table-divider uk-table-hover uk-margin-small-top"><tr><td><strong>api_key</strong></td><td><em>required</em></td></tr><tr><td><strong>friendly_name</strong></td><td><em>required</em></td></tr><tr><td><strong>type</strong></td><td><em>required</em></td></tr><tr><td><strong>value</strong></td><td><em>required</em> (only needed for weekly and monthly maintenance windows and must be sent like 2-4-5 for Tuesday-Thursday-Friday or 10-17-26 for the days of the month)</td></tr><tr><td><strong>start_time</strong></td><td><em>required</em> (the start datetime)</td></tr><tr><td><strong>duration</strong></td><td><em>required</em> (how many minutes the maintenance window will be active for)</td></tr></table><p>The URL for the request would be:</p><p><code>https://api.uptimerobot.com/v2/newMWindow</code></p><h4 class="uk-margin-small-bottom">Example</h4><div uk-switcher="toggle:>button; connect: .api-example"><button type="button" class="uk-button uk-button-small uk-active uk-button-primary" data-value="1">cURL</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="2">PHP cURL</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="3">PHP httpRequest</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="4">Python http.client</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="4">Python Requests</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="6">Node.js Native</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="7">Node.js Requests</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="8">Go</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="9">C#</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="10">Ruby</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="11">Java</button></div><div class="api-example uk-switcher uk-margin-small-top"><div role="tabpanel" class="tab-pane" id="newMWindowCurl"><pre><code class="language-text"> curl -X POST -H "Cache-Control: no-cache" -H "Content-Type: application/x-www-form-urlencoded" -d 'api_key=enterYourAPIKeyHere&format=json&friendly_name=My Maintenance Window&type=1&start_time=1612083323&duration=30' "https://api.uptimerobot.com/v2/newMWindow" </code></pre></div><div role="tabpanel" class="tab-pane" id="newMWindowPHPCurl"><pre><code class="language-php"> $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.uptimerobot.com/v2/newMWindow", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "api_key=enterYourAPIKeyHere&format=json&friendly_name=My%20Maintenance%20Window&type=1&start_time=1612083323&duration=30", CURLOPT_HTTPHEADER => array( "cache-control: no-cache", "content-type: application/x-www-form-urlencoded" ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } </code></pre></div><div role="tabpanel" class="tab-pane" id="newMWindowPHPHttpRequest"><pre><code class="language-php"> $request = new HttpRequest(); $request->setUrl('https://api.uptimerobot.com/v2/newMWindow'); $request->setMethod(HTTP_METH_POST); $request->setHeaders(array( 'content-type' => 'application/x-www-form-urlencoded', 'cache-control' => 'no-cache' )); $request->setContentType('application/x-www-form-urlencoded'); $request->setPostFields(array( 'api_key' => 'enterYourAPIKeyHere', 'format' => 'json', 'friendly_name' => 'My Maintenance Window', 'type' => '1', 'start_time' => '1612083323', 'duration' => '30' )); try { $response = $request->send(); echo $response->getBody(); } catch (HttpException $ex) { echo $ex; } </code></pre></div><div role="tabpanel" class="tab-pane" id="newMWindowPythonHttpClient"><pre><code class="language-python"> import http.client conn = http.client.HTTPSConnection("api.uptimerobot.com") payload = "api_key=enterYourAPIKeyHere&format=json&friendly_name=My%20Maintenance%20Window&type=1&start_time=1612083323&duration=30" headers = { 'cache-control': "no-cache", 'content-type': "application/x-www-form-urlencoded" } conn.request("POST", "/v2/newMWindow", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) </code></pre></div><div role="tabpanel" class="tab-pane" id="newMWindowPythonRequests"><pre><code class="language-python"> import requests url = "https://api.uptimerobot.com/v2/newMWindow" payload = "api_key=enterYourAPIKeyHere&format=json&friendly_name=My%20Maintenance%20Window&type=1&start_time=1612083323&duration=30" headers = { 'cache-control': "no-cache", 'content-type': "application/x-www-form-urlencoded" } response = requests.request("POST", url, data=payload, headers=headers) print(response.text) </code></pre></div><div role="tabpanel" class="tab-pane" id="newMWindowNodejsNative"><pre><code class="language-js"> var qs = require("querystring"); var http = require("https"); var options = { "method": "POST", "hostname": "api.uptimerobot.com", "port": null, "path": "/v2/newMWindow", "headers": { "cache-control": "no-cache", "content-type": "application/x-www-form-urlencoded" } }; var req = http.request(options, function (res) { var chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { var body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(qs.stringify({ api_key: 'enterYourAPIKeyHere', format: 'json', friendly_name: 'My Maintenance Window', type: '1', start_time: '1612083323', duration: '30' })); req.end(); </code></pre></div><div role="tabpanel" class="tab-pane" id="newMWindowNodejsRequest"><pre><code class="language-js"> var request = require("request"); var options = { method: 'POST', url: 'https://api.uptimerobot.com/v2/newMWindow', headers: { 'content-type': 'application/x-www-form-urlencoded', 'cache-control': 'no-cache' }, form: { api_key: 'enterYourAPIKeyHere', format: 'json', friendly_name: 'My Maintenance Window', type: '1', start_time: '1612083323', duration: '30' } }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); </code></pre></div><div role="tabpanel" class="tab-pane" id="newMWindowGo"><pre><code class="language-go"> package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://api.uptimerobot.com/v2/newMWindow" payload := strings.NewReader("api_key=enterYourAPIKeyHere&format=json&friendly_name=My%20Maintenance%20Window&type=1&start_time=1612083323&duration=30") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("cache-control", "no-cache") req.Header.Add("content-type", "application/x-www-form-urlencoded") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } </code></pre></div><div role="tabpanel" class="tab-pane" id="newMWindowCSharp"><pre><code class="language-csharp"> var client = new RestClient("https://api.uptimerobot.com/v2/newMWindow"); var request = new RestRequest(Method.POST); request.AddHeader("content-type", "application/x-www-form-urlencoded"); request.AddHeader("cache-control", "no-cache"); request.AddParameter("application/x-www-form-urlencoded", "api_key=enterYourAPIKeyHere&format=json&friendly_name=My%20Maintenance%20Window&type=1&start_time=1612083323&duration=30", ParameterType.RequestBody); IRestResponse response = client.Execute(request); </code></pre></div><div role="tabpanel" class="tab-pane" id="newMWindowRuby"><pre><code class="language-ruby"> require 'uri' require 'net/http' url = URI("https://api.uptimerobot.com/v2/newMWindow") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Post.new(url) request["cache-control"] = 'no-cache' request["content-type"] = 'application/x-www-form-urlencoded' request.body = "api_key=enterYourAPIKeyHere&format=json&friendly_name=My%20Maintenance%20Window&type=1&start_time=1612083323&duration=30" response = http.request(request) puts response.read_body </code></pre></div><div role="tabpanel" class="tab-pane" id="newMWindowJava"><pre><code class="language-java"> OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded"); RequestBody body = RequestBody.create(mediaType, "api_key=enterYourAPIKeyHere&format=json&friendly_name=My%20Maintenance%20Window&type=1&start_time=1612083323&duration=30"); Request request = new Request.Builder() .url("https://api.uptimerobot.com/v2/newMWindow") .post(body) .addHeader("cache-control", "no-cache") .addHeader("content-type", "application/x-www-form-urlencoded") .build(); Response response = client.newCall(request).execute(); </code></pre></div></div><h4 class="uk-margin-small-bottom">Response</h4><ul uk-tab="connect: .api-response-example"><li><a href="#">JSON</a></li><li><a href="#">XML</a></li></ul><div class="uk-switcher api-response-example"><div><pre><code class="language-json"> { "stat": "ok", "pagination": { "limit": 10, "offset": 0, "total": 3 }, "mwindows": [ { "id": 581, "user": 1, "type": 1, "friendly_name": "Once Backup", "start_time": 1461024000, "duration": 12, "value": "", "status": 1 }, { "id": 582, "user": 1, "type": 2, "friendly_name": "Daily Reboot", "start_time": "06:37", "duration": 2, "value": "", "status": 1 } ] } </code></pre></div><div><pre><code class="language-xml"> <?xml version="1.0" encoding="UTF-8"?> <result> <pagination> <limit>10</limit> <offset>0</offset> <total>3</total> </pagination> <mwindows> <mwindow> <id>581</id> <user>1</user> <type>1</type> <friendly_name>Once Backup</friendly_name> <start_time>1461024000</start_time> <duration>12</duration> <value></value> <status>1</status> </mwindow> <mwindow> <id>582</id> <user>1</user> <type>2</type> <friendly_name>Daily Reboot</friendly_name> <start_time>06:37</start_time> <duration>2</duration> <value></value> <status>1</status> </mwindow> </mwindows> </result> </code></pre></div></div></div></li><li id="editMWindowWrap"><a class="uk-accordion-title" href="#"><span class="uk-label uk-label-primary">POST</span> editMWindow</a><div class="uk-accordion-content"><p>Maintenance windows can be edited using this method.</p><h4 class="uk-margin-small-bottom">Parameters</h4><table class="api-params uk-table uk-table-divider uk-table-hover uk-margin-small-top"><tr><td><strong>api_key</strong></td><td><em>required</em></td></tr><tr><td><strong>friendly_name</strong></td><td><em>required</em></td></tr><tr><td><strong>type</strong></td><td><em>required</em></td></tr><tr><td><strong>value</strong></td><td><em>required</em> (only needed for weekly and monthly maintenance windows and must be sent like 2-4-5 for Tuesday-Thursday-Friday or 10-17-26 for the days of the month)</td></tr><tr><td><strong>start_time</strong></td><td><em>required</em> (the start datetime)</td></tr><tr><td><strong>duration</strong></td><td><em>required</em> (how many minutes the maintenance window will be active for)</td></tr></table><p>The URL for the request would be:</p><p><code>https://api.uptimerobot.com/v2/editMWindow</code></p><h4 class="uk-margin-small-bottom">Example</h4><div uk-switcher="toggle:>button; connect: .api-example"><button type="button" class="uk-button uk-button-small uk-active uk-button-primary" data-value="1">cURL</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="2">PHP cURL</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="3">PHP httpRequest</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="4">Python http.client</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="4">Python Requests</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="6">Node.js Native</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="7">Node.js Requests</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="8">Go</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="9">C#</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="10">Ruby</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="11">Java</button></div><div class="api-example uk-switcher uk-margin-small-top"><div role="tabpanel" class="tab-pane active" id="editMWindowCurl"><pre><code class="language-text"> curl -X POST -H "Cache-Control: no-cache" -H "Content-Type: application/x-www-form-urlencoded" -d 'api_key=enterYourAPIKeyHere&id=256&format=json&friendly_name=New Name For mWindow&start_time=1613093323&duration=22' "https://api.uptimerobot.com/v2/editMWindow" </code></pre></div><div role="tabpanel" class="tab-pane" id="editMWindowPHPCurl"><pre><code class="language-php"> $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.uptimerobot.com/v2/editMWindow", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "api_key=enterYourAPIKeyHere&id=256&format=json&friendly_name=New%20Name%20For%20mWindow&start_time=1613093323&duration=22", CURLOPT_HTTPHEADER => array( "cache-control: no-cache", "content-type: application/x-www-form-urlencoded" ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } </code></pre></div><div role="tabpanel" class="tab-pane" id="editMWindowPHPHttpRequest"><pre><code class="language-php"> $request = new HttpRequest(); $request->setUrl('https://api.uptimerobot.com/v2/editMWindow'); $request->setMethod(HTTP_METH_POST); $request->setHeaders(array( 'content-type' => 'application/x-www-form-urlencoded', 'cache-control' => 'no-cache' )); $request->setContentType('application/x-www-form-urlencoded'); $request->setPostFields(array( 'api_key' => 'enterYourAPIKeyHere', 'id' => '256', 'format' => 'json', 'friendly_name' => 'New Name For mWindow', 'start_time' => '1613093323', 'duration' => '22' )); try { $response = $request->send(); echo $response->getBody(); } catch (HttpException $ex) { echo $ex; } </code></pre></div><div role="tabpanel" class="tab-pane" id="editMWindowPythonHttpClient"><pre><code class="language-python"> import http.client conn = http.client.HTTPSConnection("api.uptimerobot.com") payload = "api_key=enterYourAPIKeyHere&id=256&format=json&friendly_name=New%20Name%20For%20mWindow&start_time=1613093323&duration=22" headers = { 'cache-control': "no-cache", 'content-type': "application/x-www-form-urlencoded" } conn.request("POST", "/v2/editMWindow", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) </code></pre></div><div role="tabpanel" class="tab-pane" id="editMWindowPythonRequests"><pre><code class="language-python"> import requests url = "https://api.uptimerobot.com/v2/editMWindow" payload = "api_key=enterYourAPIKeyHere&id=256&format=json&friendly_name=New%20Name%20For%20mWindow&start_time=1613093323&duration=22" headers = { 'cache-control': "no-cache", 'content-type': "application/x-www-form-urlencoded" } response = requests.request("POST", url, data=payload, headers=headers) print(response.text) </code></pre></div><div role="tabpanel" class="tab-pane" id="editMWindowNodejsNative"><pre><code class="language-js"> var qs = require("querystring"); var http = require("https"); var options = { "method": "POST", "hostname": "api.uptimerobot.com", "port": null, "path": "/v2/editMWindow", "headers": { "cache-control": "no-cache", "content-type": "application/x-www-form-urlencoded" } }; var req = http.request(options, function (res) { var chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { var body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(qs.stringify({ api_key: 'enterYourAPIKeyHere', id: '256', format: 'json', friendly_name: 'New Name For mWindow', start_time: '1613093323', duration: '22' })); req.end(); </code></pre></div><div role="tabpanel" class="tab-pane" id="editMWindowNodejsRequest"><pre><code class="language-js"> var request = require("request"); var options = { method: 'POST', url: 'https://api.uptimerobot.com/v2/editMWindow', headers: { 'content-type': 'application/x-www-form-urlencoded', 'cache-control': 'no-cache' }, form: { api_key: 'enterYourAPIKeyHere', id: '256', format: 'json', friendly_name: 'New Name For mWindow', start_time: '1613093323', duration: '22' } }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); </code></pre></div><div role="tabpanel" class="tab-pane" id="editMWindowGo"><pre><code class="language-go"> package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://api.uptimerobot.com/v2/editMWindow" payload := strings.NewReader("api_key=enterYourAPIKeyHere&id=256&format=json&friendly_name=New%20Name%20For%20mWindow&start_time=1613093323&duration=22") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("cache-control", "no-cache") req.Header.Add("content-type", "application/x-www-form-urlencoded") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } </code></pre></div><div role="tabpanel" class="tab-pane" id="editMWindowCSharp"><pre><code class="language-csharp"> var client = new RestClient("https://api.uptimerobot.com/v2/editMWindow"); var request = new RestRequest(Method.POST); request.AddHeader("content-type", "application/x-www-form-urlencoded"); request.AddHeader("cache-control", "no-cache"); request.AddParameter("application/x-www-form-urlencoded", "api_key=enterYourAPIKeyHere&id=256&format=json&friendly_name=New%20Name%20For%20mWindow&start_time=1613093323&duration=22", ParameterType.RequestBody); IRestResponse response = client.Execute(request); </code></pre></div><div role="tabpanel" class="tab-pane" id="editMWindowRuby"><pre><code class="language-ruby"> require 'uri' require 'net/http' url = URI("https://api.uptimerobot.com/v2/editMWindow") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Post.new(url) request["cache-control"] = 'no-cache' request["content-type"] = 'application/x-www-form-urlencoded' request.body = "api_key=enterYourAPIKeyHere&id=256&format=json&friendly_name=New%20Name%20For%20mWindow&start_time=1613093323&duration=22" response = http.request(request) puts response.read_body </code></pre></div><div role="tabpanel" class="tab-pane" id="editMWindowJava"><pre><code class="language-java"> OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded"); RequestBody body = RequestBody.create(mediaType, "api_key=enterYourAPIKeyHere&id=256&format=json&friendly_name=New%20Name%20For%20mWindow&start_time=1613093323&duration=22"); Request request = new Request.Builder() .url("https://api.uptimerobot.com/v2/editMWindow") .post(body) .addHeader("cache-control", "no-cache") .addHeader("content-type", "application/x-www-form-urlencoded") .build(); Response response = client.newCall(request).execute(); </code></pre></div></div><h4 class="uk-margin-small-bottom">Response</h4><ul uk-tab="connect: .api-response-example"><li><a href="#">JSON</a></li><li><a href="#">XML</a></li></ul><div class="uk-switcher api-response-example"><div><pre><code class="langueage-json"> { "stat": "ok", "mwindow": { "id": 256, "status": 1 } } </code></pre></div><div><pre><code class="langueage-json"> <?xml version="1.0" encoding="UTF-8"?><mwindow status="1" id="256"/> </code></pre></div></div></div></li><li id="deleteMWindowWrap"><a class="uk-accordion-title" href="#"><span class="uk-label uk-label-primary">POST</span> deleteMWindow</a><div class="uk-accordion-content"><p>Maintenance windows can be deleted using this method.</p><h4 class="uk-margin-small-bottom">Parameters</h4><table class="api-params uk-table uk-table-divider uk-table-hover uk-margin-small-top"><tr><td><strong>id</strong></td><td><em>required</em></td></tr><tr><td><strong>api_key</strong></td><td><em>required</em></td></tr></table><p>The URL for the request would be:</p><p><code>https://api.uptimerobot.com/v2/deleteMWindow</code></p><h4 class="uk-margin-small-bottom">Example</h4><div uk-switcher="toggle:>button; connect: .api-example"><button type="button" class="uk-button uk-button-small uk-active uk-button-primary" data-value="1">cURL</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="2">PHP cURL</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="3">PHP httpRequest</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="4">Python http.client</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="4">Python Requests</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="6">Node.js Native</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="7">Node.js Requests</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="8">Go</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="9">C#</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="10">Ruby</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="11">Java</button></div><div class="api-example uk-switcher uk-margin-small-top"><div role="tabpanel" class="tab-pane active" id="deleteMWindowCurl"><pre><code class="language-text"> curl -X POST -H "Cache-Control: no-cache" -H "Content-Type: application/x-www-form-urlencoded" -d 'api_key=enterYourAPIKeyHere&format=json&id=2414745' "https://api.uptimerobot.com/v2/deleteMWindow" </code></pre></div><div role="tabpanel" class="tab-pane" id="deleteMWindowPHPCurl"><pre><code class="language-php"> $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.uptimerobot.com/v2/deleteMWindow", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "api_key=enterYourAPIKeyHere&format=json&id=2414745", CURLOPT_HTTPHEADER => array( "cache-control: no-cache", "content-type: application/x-www-form-urlencoded" ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } </code></pre></div><div role="tabpanel" class="tab-pane" id="deleteMWindowPHPHttpRequest"><pre><code class="language-php"> $request = new HttpRequest(); $request->setUrl('https://api.uptimerobot.com/v2/deleteMWindow'); $request->setMethod(HTTP_METH_POST); $request->setHeaders(array( 'content-type' => 'application/x-www-form-urlencoded', 'cache-control' => 'no-cache' )); $request->setContentType('application/x-www-form-urlencoded'); $request->setPostFields(array( 'api_key' => 'enterYourAPIKeyHere', 'format' => 'json', 'id' => '2414745' )); try { $response = $request->send(); echo $response->getBody(); } catch (HttpException $ex) { echo $ex; } </code></pre></div><div role="tabpanel" class="tab-pane" id="deleteMWindowPythonHttpClient"><pre><code class="language-python"> import http.client conn = http.client.HTTPSConnection("api.uptimerobot.com") payload = "api_key=enterYourAPIKeyHere&format=json&id=2414745" headers = { 'cache-control': "no-cache", 'content-type': "application/x-www-form-urlencoded" } conn.request("POST", "/v2/deleteMWindow", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) </code></pre></div><div role="tabpanel" class="tab-pane" id="deleteMWindowPythonRequests"><pre><code class="language-python"> import requests url = "https://api.uptimerobot.com/v2/deleteMWindow" payload = "api_key=enterYourAPIKeyHere&format=json&id=2414745" headers = { 'cache-control': "no-cache", 'content-type': "application/x-www-form-urlencoded" } response = requests.request("POST", url, data=payload, headers=headers) print(response.text) </code></pre></div><div role="tabpanel" class="tab-pane" id="deleteMWindowNodejsNative"><pre><code class="language-js"> var qs = require("querystring"); var http = require("https"); var options = { "method": "POST", "hostname": "api.uptimerobot.com", "port": null, "path": "/v2/deleteMWindow", "headers": { "cache-control": "no-cache", "content-type": "application/x-www-form-urlencoded" } }; var req = http.request(options, function (res) { var chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { var body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(qs.stringify({ api_key: 'enterYourAPIKeyHere', format: 'json', id: '2414745' })); req.end(); </code></pre></div><div role="tabpanel" class="tab-pane" id="deleteMWindowNodejsRequest"><pre><code class="language-js"> var request = require("request"); var options = { method: 'POST', url: 'https://api.uptimerobot.com/v2/deleteMWindow', headers: { 'content-type': 'application/x-www-form-urlencoded', 'cache-control': 'no-cache' }, form: { api_key: 'enterYourAPIKeyHere', format: 'json', id: '2414745' } }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); </code></pre></div><div role="tabpanel" class="tab-pane" id="deleteMWindowGo"><pre><code class="language-go"> package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://api.uptimerobot.com/v2/deleteMWindow" payload := strings.NewReader("api_key=enterYourAPIKeyHere&format=json&id=2414745") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("cache-control", "no-cache") req.Header.Add("content-type", "application/x-www-form-urlencoded") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } </code></pre></div><div role="tabpanel" class="tab-pane" id="deleteMWindowCSharp"><pre><code class="language-csharp"> var client = new RestClient("https://api.uptimerobot.com/v2/deleteMWindow"); var request = new RestRequest(Method.POST); request.AddHeader("content-type", "application/x-www-form-urlencoded"); request.AddHeader("cache-control", "no-cache"); request.AddParameter("application/x-www-form-urlencoded", "api_key=enterYourAPIKeyHere&format=json&id=2414745", ParameterType.RequestBody); IRestResponse response = client.Execute(request); </code></pre></div><div role="tabpanel" class="tab-pane" id="deleteMWindowRuby"><pre><code class="language-ruby"> require 'uri' require 'net/http' url = URI("https://api.uptimerobot.com/v2/deleteMWindow") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Post.new(url) request["cache-control"] = 'no-cache' request["content-type"] = 'application/x-www-form-urlencoded' request.body = "api_key=enterYourAPIKeyHere&format=json&id=2414745" response = http.request(request) puts response.read_body </code></pre></div><div role="tabpanel" class="tab-pane" id="deleteMWindowJava"><pre><code class="language-java"> OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded"); RequestBody body = RequestBody.create(mediaType, "api_key=enterYourAPIKeyHere&format=json&id=2414745"); Request request = new Request.Builder() .url("https://api.uptimerobot.com/v2/deleteMWindow") .post(body) .addHeader("cache-control", "no-cache") .addHeader("content-type", "application/x-www-form-urlencoded") .build(); Response response = client.newCall(request).execute(); </code></pre></div></div><h4 class="uk-margin-small-bottom">Response</h4><ul uk-tab="connect: .api-response-example"><li><a href="#">JSON</a></li><li><a href="#">XML</a></li></ul><div class="uk-switcher api-response-example"><div><pre><code class="language-json"> jsonUptimeRobotApi({ "stat": "ok", "mwindow": { "id": "2414745" } }) </code></pre></div><div><pre><code class="language-xml"> <?xml version="1.0" encoding="UTF-8"?><mwindow id="2414745"/> </code></pre></div></div></div></li><li id="getPSPsWrap"><a class="uk-accordion-title" href="#"><span class="uk-label uk-label-primary">POST</span> getPSPs</a><div class="uk-accordion-content"><p>The list of public status pages can be called with this method.</p><h4 class="uk-margin-small-bottom">Parameters</h4><table class="api-params uk-table uk-table-divider uk-table-hover uk-margin-small-top"><tr><td><strong>api_key</strong></td><td><em>required</em></td></tr><tr><td><strong>psps</strong></td><td><em>optional</em> (if not used, will return all public status pages in an account. Else, it is possible to define any number of public status pages with their IDs like: <code>psps=236-1782-4790</code>)</td></tr><tr><td><strong>offset</strong></td><td><em>optional</em> (used for pagination. Defines the record to start paginating. Default is <code>0</code>)</td></tr><tr><td><strong>limit</strong></td><td><em>optional</em> (used for pagination. Defines the max number of records to return for the response. Default and max. is <code>50</code>)</td></tr></table><p>The URL for the request would be:</p><p><code>https://api.uptimerobot.com/v2/getPSPs</code></p><h4 class="uk-margin-small-bottom">Example</h4><div uk-switcher="toggle:>button; connect: .api-example"><button type="button" class="uk-button uk-button-small uk-active uk-button-primary" data-value="1">cURL</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="2">PHP cURL</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="3">PHP httpRequest</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="4">Python http.client</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="4">Python Requests</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="6">Node.js Native</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="7">Node.js Requests</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="8">Go</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="9">C#</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="10">Ruby</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="11">Java</button></div><div class="api-example uk-switcher uk-margin-small-top"><div role="tabpanel" class="tab-pane" id="getPSPsCurl"><pre><code class="language-text"> curl -X POST -H "Cache-Control: no-cache" -H "Content-Type: application/x-www-form-urlencoded" -d 'api_key=enterYourAPIKeyHere&format=json' "https://api.uptimerobot.com/v2/getPSPs" </code></pre></div><div role="tabpanel" class="tab-pane" id="getPSPsPHPCurl"><pre><code class="language-php"> $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.uptimerobot.com/v2/getPSPs", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "api_key=enterYourAPIKeyHere&format=json", CURLOPT_HTTPHEADER => array( "cache-control: no-cache", "content-type: application/x-www-form-urlencoded" ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } </code></pre></div><div role="tabpanel" class="tab-pane" id="getPSPsPHPHttpRequest"><pre><code class="language-php"> $request = new HttpRequest(); $request->setUrl('https://api.uptimerobot.com/v2/getPSPs'); $request->setMethod(HTTP_METH_POST); $request->setHeaders(array( 'content-type' => 'application/x-www-form-urlencoded', 'cache-control' => 'no-cache' )); $request->setContentType('application/x-www-form-urlencoded'); $request->setPostFields(array( 'api_key' => 'enterYourAPIKeyHere', 'format' => 'json' )); try { $response = $request->send(); echo $response->getBody(); } catch (HttpException $ex) { echo $ex; } </code></pre></div><div role="tabpanel" class="tab-pane" id="getPSPsPythonHttpClient"><pre><code class="language-python"> import http.client conn = http.client.HTTPSConnection("api.uptimerobot.com") payload = "api_key=enterYourAPIKeyHere&format=json" headers = { 'cache-control': "no-cache", 'content-type': "application/x-www-form-urlencoded" } conn.request("POST", "/v2/getPSPs", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) </code></pre></div><div role="tabpanel" class="tab-pane" id="getPSPsPythonRequests"><pre><code class="language-python"> import requests url = "https://api.uptimerobot.com/v2/getPSPs" payload = "api_key=enterYourAPIKeyHere&format=json" headers = { 'cache-control': "no-cache", 'content-type': "application/x-www-form-urlencoded" } response = requests.request("POST", url, data=payload, headers=headers) print(response.text) </code></pre></div><div role="tabpanel" class="tab-pane" id="getPSPsNodejsNative"><pre><code class="language-js"> var qs = require("querystring"); var http = require("https"); var options = { "method": "POST", "hostname": "api.uptimerobot.com", "port": null, "path": "/v2/getPSPs", "headers": { "cache-control": "no-cache", "content-type": "application/x-www-form-urlencoded" } }; var req = http.request(options, function (res) { var chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { var body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(qs.stringify({ api_key: 'enterYourAPIKeyHere', format: 'json' })); req.end(); </code></pre></div><div role="tabpanel" class="tab-pane" id="getPSPsNodejsRequest"><pre><code class="language-js"> var request = require("request"); var options = { method: 'POST', url: 'https://api.uptimerobot.com/v2/getPSPs', headers: { 'content-type': 'application/x-www-form-urlencoded', 'cache-control': 'no-cache' }, form: { api_key: 'enterYourAPIKeyHere', format: 'json' } }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); </code></pre></div><div role="tabpanel" class="tab-pane" id="getPSPsGo"><pre><code class="language-go"> package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://api.uptimerobot.com/v2/getPSPs" payload := strings.NewReader("api_key=enterYourAPIKeyHere&format=json") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("cache-control", "no-cache") req.Header.Add("content-type", "application/x-www-form-urlencoded") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } </code></pre></div><div role="tabpanel" class="tab-pane" id="getPSPsCSharp"><pre><code class="language-csharp"> var client = new RestClient("https://api.uptimerobot.com/v2/getPSPs"); var request = new RestRequest(Method.POST); request.AddHeader("content-type", "application/x-www-form-urlencoded"); request.AddHeader("cache-control", "no-cache"); request.AddParameter("application/x-www-form-urlencoded", "api_key=enterYourAPIKeyHere&format=json", ParameterType.RequestBody); IRestResponse response = client.Execute(request); </code></pre></div><div role="tabpanel" class="tab-pane" id="getPSPsRuby"><pre><code class="language-ruby"> require 'uri' require 'net/http' url = URI("https://api.uptimerobot.com/v2/getPSPs") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Post.new(url) request["cache-control"] = 'no-cache' request["content-type"] = 'application/x-www-form-urlencoded' request.body = "api_key=enterYourAPIKeyHere&format=json" response = http.request(request) puts response.read_body </code></pre></div><div role="tabpanel" class="tab-pane" id="getPSPsJava"><pre><code class="language-java"> OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded"); RequestBody body = RequestBody.create(mediaType, "api_key=enterYourAPIKeyHere&format=json"); Request request = new Request.Builder() .url("https://api.uptimerobot.com/v2/getPSPs") .post(body) .addHeader("cache-control", "no-cache") .addHeader("content-type", "application/x-www-form-urlencoded") .build(); Response response = client.newCall(request).execute(); </code></pre></div></div><h4 class="uk-margin-small-bottom">Response</h4><ul uk-tab="connect: .api-response-example"><li><a href="#">JSON</a></li><li><a href="#">XML</a></li></ul><div class="uk-switcher api-response-example"><div><pre><code class="language-json"> { "stat": "ok", "limit": 50, "offset": 0, "total": 2, "psps": [ { "id": 76, "friendly_name": "My Domain Status", "monitors": 0, "sort": 1, "status": 1, "standard_url": "https://stats.uptimerobot.com/Z7f2g", "custom_url": "https://status.mydomain.com" }, { "id": 77, "friendly_name": "Internal Status", "monitors": 0, "sort": 1, "status": 1, "standard_url": "https://stats.uptimerobot.com/a3x1e", "custom_url": "https://test.oursite.com" } ] } </code></pre></div><div><pre><code class="language-xml"> <?xml version="1.0" encoding="UTF-8"?> <psps offset="0" limit="50" total="2"> <psp id="76" friendly_name="My Domain Status" monitors="0" sort="1" status="1" standard_url="https://stats.uptimerobot.com/Z7f2g" custom_url="https://status.mydomain.com"/> <psp id="77" friendly_name="Internal Status" monitors="0" sort="1" status="1" standard_url="https://stats.uptimerobot.com/a3x1e" custom_url="https://test.oursite.com"/> </psps> </code></pre></div></div></div></li><li id="newPSPWrap"><a class="uk-accordion-title" href="#"><span class="uk-label uk-label-primary">POST</span> newPSP</a><div class="uk-accordion-content"><p>New public status pages can be created using this method.</p><h4 class="uk-margin-small-bottom">Parameters</h4><table class="api-params uk-table uk-table-divider uk-table-hover uk-margin-small-top"><tr><td><strong>api_key</strong></td><td><em>required</em></td></tr><tr><td><strong>type</strong></td><td><em>required</em></td></tr><tr><td><strong>friendly_name</strong></td><td><em>required</em></td></tr><tr><td><strong>monitors</strong></td><td><em>required</em> (The monitors to be displayed can be sent as <code>15830-32696-83920</code>. Or <code>0</code> for displaying all monitors)</td></tr><tr><td><strong>custom_domain</strong></td><td><em>optional</em></td></tr><tr><td><strong>password</strong></td><td><em>optional</em></td></tr><tr><td><strong>sort</strong></td><td><em>optional</em></td></tr><tr><td><strong>hide_url_links</strong></td><td><em>optional</em> (for hiding the UptimeRobot links and only available in the Pro Plan)</td></tr><tr><td><strong>status</strong></td><td><em>optional</em></td></tr></table><p>The URL for the request would be:</p><p><code>https://api.uptimerobot.com/v2/newPSP</code></p><h4 class="uk-margin-small-bottom">Example</h4><div uk-switcher="toggle:>button; connect: .api-example"><button type="button" class="uk-button uk-button-small uk-active uk-button-primary" data-value="1">cURL</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="2">PHP cURL</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="3">PHP httpRequest</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="4">Python http.client</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="4">Python Requests</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="6">Node.js Native</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="7">Node.js Requests</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="8">Go</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="9">C#</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="10">Ruby</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="11">Java</button></div><div class="api-example uk-switcher uk-margin-small-top"><div role="tabpanel" class="tab-pane" id="newPSPCurl"><pre><code class="language-text"> curl -X POST -H "Cache-Control: no-cache" -H "Content-Type: application/x-www-form-urlencoded" -d 'api_key=enterYourAPIKeyHere&format=json&type=1&friendly_name=My Status Page&monitors=15830-32696-83920' "https://api.uptimerobot.com/v2/newPSP" </code></pre></div><div role="tabpanel" class="tab-pane" id="newPSPPHPCurl"><pre><code class="language-php"> $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.uptimerobot.com/v2/newPSP", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "api_key=enterYourAPIKeyHere&format=json&type=1&friendly_name=My%20Status%20Page&monitors=15830-32696-83920", CURLOPT_HTTPHEADER => array( "cache-control: no-cache", "content-type: application/x-www-form-urlencoded" ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } </code></pre></div><div role="tabpanel" class="tab-pane" id="newPSPPHPHttpRequest"><pre><code class="language-php"> $request = new HttpRequest(); $request->setUrl('https://api.uptimerobot.com/v2/newPSP'); $request->setMethod(HTTP_METH_POST); $request->setHeaders(array( 'content-type' => 'application/x-www-form-urlencoded', 'cache-control' => 'no-cache' )); $request->setContentType('application/x-www-form-urlencoded'); $request->setPostFields(array( 'api_key' => 'enterYourAPIKeyHere', 'format' => 'json', 'type' => '1', 'friendly_name' => 'My Status Page', 'monitors' => '15830-32696-83920' )); try { $response = $request->send(); echo $response->getBody(); } catch (HttpException $ex) { echo $ex; } </code></pre></div><div role="tabpanel" class="tab-pane" id="newPSPPythonHttpClient"><pre><code class="language-python"> import http.client conn = http.client.HTTPSConnection("api.uptimerobot.com") payload = "api_key=enterYourAPIKeyHere&format=json&type=1&friendly_name=My%20Status%20Page&monitors=15830-32696-83920" headers = { 'cache-control': "no-cache", 'content-type': "application/x-www-form-urlencoded" } conn.request("POST", "/v2/newPSP", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) </code></pre></div><div role="tabpanel" class="tab-pane" id="newPSPPythonRequests"><pre><code class="language-python"> import requests url = "https://api.uptimerobot.com/v2/newPSP" payload = "api_key=enterYourAPIKeyHere&format=json&type=1&friendly_name=My%20Status%20Page&monitors=15830-32696-83920" headers = { 'cache-control': "no-cache", 'content-type': "application/x-www-form-urlencoded" } response = requests.request("POST", url, data=payload, headers=headers) print(response.text) </code></pre></div><div role="tabpanel" class="tab-pane" id="newPSPNodejsNative"><pre><code class="language-js"> var qs = require("querystring"); var http = require("https"); var options = { "method": "POST", "hostname": "api.uptimerobot.com", "port": null, "path": "/v2/newPSP", "headers": { "cache-control": "no-cache", "content-type": "application/x-www-form-urlencoded" } }; var req = http.request(options, function (res) { var chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { var body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(qs.stringify({ api_key: 'enterYourAPIKeyHere', format: 'json', type: '1', friendly_name: 'My Status Page', monitors: '15830-32696-83920' })); req.end(); </code></pre></div><div role="tabpanel" class="tab-pane" id="newPSPNodejsRequest"><pre><code class="language-js"> var request = require("request"); var options = { method: 'POST', url: 'https://api.uptimerobot.com/v2/newPSP', headers: { 'content-type': 'application/x-www-form-urlencoded', 'cache-control': 'no-cache' }, form: { api_key: 'enterYourAPIKeyHere', format: 'json', type: '1', friendly_name: 'My Status Page', monitors: '15830-32696-83920' } }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); </code></pre></div><div role="tabpanel" class="tab-pane" id="newPSPGo"><pre><code class="language-go"> package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://api.uptimerobot.com/v2/newPSP" payload := strings.NewReader("api_key=enterYourAPIKeyHere&format=json&type=1&friendly_name=My%20Status%20Page&monitors=15830-32696-83920") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("cache-control", "no-cache") req.Header.Add("content-type", "application/x-www-form-urlencoded") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } </code></pre></div><div role="tabpanel" class="tab-pane" id="newPSPCSharp"><pre><code class="language-csharp"> var client = new RestClient("https://api.uptimerobot.com/v2/newPSP"); var request = new RestRequest(Method.POST); request.AddHeader("content-type", "application/x-www-form-urlencoded"); request.AddHeader("cache-control", "no-cache"); request.AddParameter("application/x-www-form-urlencoded", "api_key=enterYourAPIKeyHere&format=json&type=1&friendly_name=My%20Status%20Page&monitors=15830-32696-83920", ParameterType.RequestBody); IRestResponse response = client.Execute(request); </code></pre></div><div role="tabpanel" class="tab-pane" id="newPSPRuby"><pre><code class="language-ruby"> require 'uri' require 'net/http' url = URI("https://api.uptimerobot.com/v2/newPSP") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Post.new(url) request["cache-control"] = 'no-cache' request["content-type"] = 'application/x-www-form-urlencoded' request.body = "api_key=enterYourAPIKeyHere&format=json&type=1&friendly_name=My%20Status%20Page&monitors=15830-32696-83920" response = http.request(request) puts response.read_body </code></pre></div><div role="tabpanel" class="tab-pane" id="newPSPJava"><pre><code class="language-java"> OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded"); RequestBody body = RequestBody.create(mediaType, "api_key=enterYourAPIKeyHere&format=json&type=1&friendly_name=My%20Status%20Page&monitors=15830-32696-83920"); Request request = new Request.Builder() .url("https://api.uptimerobot.com/v2/newPSP") .post(body) .addHeader("cache-control", "no-cache") .addHeader("content-type", "application/x-www-form-urlencoded") .build(); Response response = client.newCall(request).execute(); </code></pre></div></div><h4 class="uk-margin-small-bottom">Response</h4><ul uk-tab="connect: .api-response-example"><li><a href="#">JSON</a></li><li><a href="#">XML</a></li></ul><div class="uk-switcher api-response-example"><div><pre><code class="language-json"> jsonUptimeRobotApi({ "stat": "ok", "psp": { "id": "4561" } }) </code></pre></div><div><pre><code class="language-xml"> <psp id="236" status="2"/></psp> </code></pre></div></div></div></li><li id="editPSPWrap"><a class="uk-accordion-title" href="#"><span class="uk-label uk-label-primary">POST</span> editPSP</a><div class="uk-accordion-content"><p>Public status pages can be edited using this method.</p><h4 class="uk-margin-small-bottom">Parameters</h4><table class="api-params uk-table uk-table-divider uk-table-hover uk-margin-small-top"><tr><td><strong>api_key</strong></td><td><em>required</em></td></tr><tr><td><strong>type</strong></td><td><em>required</em></td></tr><tr><td><strong>friendly_name</strong></td><td><em>required</em></td></tr><tr><td><strong>monitors</strong></td><td><em>required</em> (The monitors to be displayed can be sent as <code>15830-32696-83920</code>. Or <code>0</code> for displaying all monitors)</td></tr><tr><td><strong>custom_domain</strong></td><td><em>optional</em></td></tr><tr><td><strong>password</strong></td><td><em>optional</em></td></tr><tr><td><strong>sort</strong></td><td><em>optional</em></td></tr><tr><td><strong>hide_url_links</strong></td><td><em>optional</em> (for hiding the UptimeRobot links and only available in the Pro Plan)</td></tr><tr><td><strong>status</strong></td><td><em>optional</em></td></tr></table><p>The URL for the request would be:</p><p><code>https://api.uptimerobot.com/v2/editPSP</code></p><h4 class="uk-margin-small-bottom">Example</h4><div uk-switcher="toggle:>button; connect: .api-example"><button type="button" class="uk-button uk-button-small uk-active uk-button-primary" data-value="1">cURL</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="2">PHP cURL</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="3">PHP httpRequest</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="4">Python http.client</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="4">Python Requests</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="6">Node.js Native</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="7">Node.js Requests</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="8">Go</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="9">C#</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="10">Ruby</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="11">Java</button></div><div class="api-example uk-switcher uk-margin-small-top"><div role="tabpanel" class="tab-pane" id="editPSPCurl"><pre><code class="language-text"> curl -X POST -H "Cache-Control: no-cache" -H "Content-Type: application/x-www-form-urlencoded" -d 'api_key=enterYourAPIKeyHere&format=json&id=495&friendly_name=New Name For Status Page&id=236&=' "https://api.uptimerobot.com/v2/editPSP" </code></pre></div><div role="tabpanel" class="tab-pane" id="editPSPPHPCurl"><pre><code class="language-php"> $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.uptimerobot.com/v2/editPSP", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "api_key=enterYourAPIKeyHere&format=json&id=495&friendly_name=New%20Name%20For%20Status%20Page&monitors=15830-32696", CURLOPT_HTTPHEADER => array( "cache-control: no-cache", "content-type: application/x-www-form-urlencoded" ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } </code></pre></div><div role="tabpanel" class="tab-pane" id="editPSPPHPHttpRequest"><pre><code class="language-php"> $request = new HttpRequest(); $request->setUrl('https://api.uptimerobot.com/v2/editPSP'); $request->setMethod(HTTP_METH_POST); $request->setHeaders(array( 'content-type' => 'application/x-www-form-urlencoded', 'cache-control' => 'no-cache' )); $request->setContentType('application/x-www-form-urlencoded'); $request->setPostFields(array( 'api_key' => 'enterYourAPIKeyHere', 'format' => 'json', 'id' => '495', 'friendly_name' => 'New Name For Status Page', 'monitors' => '15830-32696', '' => '' )); try { $response = $request->send(); echo $response->getBody(); } catch (HttpException $ex) { echo $ex; } </code></pre></div><div role="tabpanel" class="tab-pane" id="editPSPPythonHttpClient"><pre><code class="language-python"> import http.client conn = http.client.HTTPSConnection("api.uptimerobot.com") payload = "api_key=enterYourAPIKeyHere&format=json&id=495&friendly_name=New%20Name%20For%20Status%20Page&monitors=15830-32696" headers = { 'cache-control': "no-cache", 'content-type': "application/x-www-form-urlencoded" } conn.request("POST", "/v2/editPSP", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) </code></pre></div><div role="tabpanel" class="tab-pane" id="editPSPPythonRequests"><pre><code class="language-python"> import requests url = "https://api.uptimerobot.com/v2/editPSP" payload = "api_key=enterYourAPIKeyHere&format=json&id=495&friendly_name=New%20Name%20For%20Status%20Page&monitors=15830-32696" headers = { 'cache-control': "no-cache", 'content-type': "application/x-www-form-urlencoded" } response = requests.request("POST", url, data=payload, headers=headers) print(response.text) </code></pre></div><div role="tabpanel" class="tab-pane" id="editPSPNodejsNative"><pre><code class="language-js"> var qs = require("querystring"); var http = require("https"); var options = { "method": "POST", "hostname": "api.uptimerobot.com", "port": null, "path": "/v2/editPSP", "headers": { "cache-control": "no-cache", "content-type": "application/x-www-form-urlencoded" } }; var req = http.request(options, function (res) { var chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { var body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(qs.stringify({ api_key: 'enterYourAPIKeyHere', format: 'json', id: '495', friendly_name: 'New Name For Status Page', monitors: '15830-32696', '': '' })); req.end(); </code></pre></div><div role="tabpanel" class="tab-pane" id="editPSPNodejsRequest"><pre><code class="language-js"> var request = require("request"); var options = { method: 'POST', url: 'https://api.uptimerobot.com/v2/editPSP', headers: { 'content-type': 'application/x-www-form-urlencoded', 'cache-control': 'no-cache' }, form: { api_key: 'enterYourAPIKeyHere', format: 'json', id: '495', friendly_name: 'New Name For Status Page', monitors: '15830-32696', '': '' } }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); </code></pre></div><div role="tabpanel" class="tab-pane" id="editPSPGo"><pre><code class="language-go"> package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://api.uptimerobot.com/v2/editPSP" payload := strings.NewReader("api_key=enterYourAPIKeyHere&format=json&id=495&friendly_name=New%20Name%20For%20Status%20Page&monitors=15830-32696") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("cache-control", "no-cache") req.Header.Add("content-type", "application/x-www-form-urlencoded") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } </code></pre></div><div role="tabpanel" class="tab-pane" id="editPSPCSharp"><pre><code class="language-csharp"> var client = new RestClient("https://api.uptimerobot.com/v2/editPSP"); var request = new RestRequest(Method.POST); request.AddHeader("content-type", "application/x-www-form-urlencoded"); request.AddHeader("cache-control", "no-cache"); request.AddParameter("application/x-www-form-urlencoded", "api_key=enterYourAPIKeyHere&format=json&id=495&friendly_name=New%20Name%20For%20Status%20Page&monitors=15830-32696", ParameterType.RequestBody); IRestResponse response = client.Execute(request); </code></pre></div><div role="tabpanel" class="tab-pane" id="editPSPRuby"><pre><code class="language-ruby"> require 'uri' require 'net/http' url = URI("https://api.uptimerobot.com/v2/editPSP") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Post.new(url) request["cache-control"] = 'no-cache' request["content-type"] = 'application/x-www-form-urlencoded' request.body = "api_key=enterYourAPIKeyHere&format=json&id=495&friendly_name=New%20Name%20For%20Status%20Page&monitors=15830-32696" response = http.request(request) puts response.read_body </code></pre></div><div role="tabpanel" class="tab-pane" id="editPSPJava"><pre><code class="language-java"> OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded"); RequestBody body = RequestBody.create(mediaType, "api_key=enterYourAPIKeyHere&format=json&id=495&friendly_name=New%20Name%20For%20Status%20Page&monitors=15830-32696"); Request request = new Request.Builder() .url("https://api.uptimerobot.com/v2/editPSP") .post(body) .addHeader("cache-control", "no-cache") .addHeader("content-type", "application/x-www-form-urlencoded") .build(); Response response = client.newCall(request).execute(); </code></pre></div></div><h4 class="uk-margin-small-bottom">Response</h4><ul uk-tab="connect: .api-response-example"><li><a href="#">JSON</a></li><li><a href="#">XML</a></li></ul><div class="uk-switcher api-response-example"><div><pre><code class="language-json"> jsonUptimeRobotApi({ "stat": "ok", "psp": { "id": "4561" } }) </code></pre></div><div><pre><code class="language-xml"> <psp id="236" status="2"/></psp> </code></pre></div></div></div></li><li id="deletePSPWrap"><a class="uk-accordion-title" href="#"><span class="uk-label uk-label-primary">POST</span> deletePSP</a><div class="uk-accordion-content"><p>Public status pages can be deleted using this method.</p><h4 class="uk-margin-small-bottom">Parameters</h4><table class="api-params uk-table uk-table-divider uk-table-hover uk-margin-small-top"><tr><td><strong>api_key</strong></td><td><em>required</em></td></tr><tr><td><strong>id</strong></td><td><em>required</em></td></tr></table><p>The URL for the request would be:</p><p><code>https://api.uptimerobot.com/v2/deletePSP</code></p><h4 class="uk-margin-small-bottom">Example</h4><div uk-switcher="toggle:>button; connect: .api-example"><button type="button" class="uk-button uk-button-small uk-active uk-button-primary" data-value="1">cURL</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="2">PHP cURL</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="3">PHP httpRequest</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="4">Python http.client</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="4">Python Requests</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="6">Node.js Native</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="7">Node.js Requests</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="8">Go</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="9">C#</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="10">Ruby</button> <button type="button" class="uk-button uk-button-small uk-button-primary" data-value="11">Java</button></div><div class="api-example uk-switcher uk-margin-small-top"><div role="tabpanel" class="tab-pane" id="deletePSPCurl"><pre><code class="language-text"> curl -X POST -H "Cache-Control: no-cache" -H "Content-Type: application/x-www-form-urlencoded" -d 'api_key=enterYourAPIKeyHere&format=json&id=1256' "https://api.uptimerobot.com/v2/deletePSP" </code></pre></div><div role="tabpanel" class="tab-pane" id="deletePSPPHPCurl"><pre><code class="language-php"> $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.uptimerobot.com/v2/deletePSP", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "api_key=enterYourAPIKeyHere&format=json&id=1256", CURLOPT_HTTPHEADER => array( "cache-control: no-cache", "content-type: application/x-www-form-urlencoded" ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } </code></pre></div><div role="tabpanel" class="tab-pane" id="deletePSPPHPHttpRequest"><pre><code class="language-php"> $request = new HttpRequest(); $request->setUrl('https://api.uptimerobot.com/v2/deletePSP'); $request->setMethod(HTTP_METH_POST); $request->setHeaders(array( 'content-type' => 'application/x-www-form-urlencoded', 'cache-control' => 'no-cache' )); $request->setContentType('application/x-www-form-urlencoded'); $request->setPostFields(array( 'api_key' => 'enterYourAPIKeyHere', 'format' => 'json', 'id' => '1256' )); try { $response = $request->send(); echo $response->getBody(); } catch (HttpException $ex) { echo $ex; } </code></pre></div><div role="tabpanel" class="tab-pane" id="deletePSPPythonHttpClient"><pre><code class="language-python"> import http.client conn = http.client.HTTPSConnection("api.uptimerobot.com") payload = "api_key=enterYourAPIKeyHere&format=json&id=1256" headers = { 'cache-control': "no-cache", 'content-type': "application/x-www-form-urlencoded" } conn.request("POST", "/v2/deletePSP", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) </code></pre></div><div role="tabpanel" class="tab-pane" id="deletePSPPythonRequests"><pre><code class="language-python"> import requests url = "https://api.uptimerobot.com/v2/deletePSP" payload = "api_key=enterYourAPIKeyHere&format=json&id=1256" headers = { 'cache-control': "no-cache", 'content-type': "application/x-www-form-urlencoded" } response = requests.request("POST", url, data=payload, headers=headers) print(response.text) </code></pre></div><div role="tabpanel" class="tab-pane" id="deletePSPNodejsNative"><pre><code class="language-js"> var qs = require("querystring"); var http = require("https"); var options = { "method": "POST", "hostname": "api.uptimerobot.com", "port": null, "path": "/v2/deletePSP", "headers": { "cache-control": "no-cache", "content-type": "application/x-www-form-urlencoded" } }; var req = http.request(options, function (res) { var chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { var body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(qs.stringify({ api_key: 'enterYourAPIKeyHere', format: 'json', id: '1256' })); req.end(); </code></pre></div><div role="tabpanel" class="tab-pane" id="deletePSPNodejsRequest"><pre><code class="language-js"> var request = require("request"); var options = { method: 'POST', url: 'https://api.uptimerobot.com/v2/deletePSP', headers: { 'content-type': 'application/x-www-form-urlencoded', 'cache-control': 'no-cache' }, form: { api_key: 'enterYourAPIKeyHere', format: 'json', id: '1256' } }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); </code></pre></div><div role="tabpanel" class="tab-pane" id="deletePSPGo"><pre><code class="language-go"> var request = require("request"); var options = { method: 'POST', url: 'https://api.uptimerobot.com/v2/deletePSP', headers: { 'content-type': 'application/x-www-form-urlencoded', 'cache-control': 'no-cache' }, form: { api_key: 'enterYourAPIKeyHere', format: 'json', id: '1256' } }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); </code></pre></div><div role="tabpanel" class="tab-pane" id="deletePSPCSharp"><pre><code class="language-csharp"> var client = new RestClient("https://api.uptimerobot.com/v2/deletePSP"); var request = new RestRequest(Method.POST); request.AddHeader("content-type", "application/x-www-form-urlencoded"); request.AddHeader("cache-control", "no-cache"); request.AddParameter("application/x-www-form-urlencoded", "api_key=enterYourAPIKeyHere&format=json&id=1256", ParameterType.RequestBody); IRestResponse response = client.Execute(request); </code></pre></div><div role="tabpanel" class="tab-pane" id="deletePSPRuby"><pre><code class="language-ruby"> require 'uri' require 'net/http' url = URI("https://api.uptimerobot.com/v2/deletePSP") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Post.new(url) request["cache-control"] = 'no-cache' request["content-type"] = 'application/x-www-form-urlencoded' request.body = "api_key=enterYourAPIKeyHere&format=json&id=1256" response = http.request(request) puts response.read_body </code></pre></div><div role="tabpanel" class="tab-pane" id="deletePSPJava"><pre><code class="language-java"> OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded"); RequestBody body = RequestBody.create(mediaType, "api_key=enterYourAPIKeyHere&format=json&id=1256"); Request request = new Request.Builder() .url("https://api.uptimerobot.com/v2/deletePSP") .post(body) .addHeader("cache-control", "no-cache") .addHeader("content-type", "application/x-www-form-urlencoded") .build(); Response response = client.newCall(request).execute(); </code></pre></div></div><h4 class="uk-margin-small-bottom">Response</h4><ul uk-tab="connect: .api-response-example"><li><a href="#">JSON</a></li><li><a href="#">XML</a></li></ul><div class="uk-switcher api-response-example"><div><pre><code class="language-json"> jsonUptimeRobotApi({ "stat": "ok", "psp": { "id": "236" } }) </code></pre></div><div><pre><code class="language-xml"> <?xml version="1.0" encoding="UTF-8"?><psp id="1256"/> </code></pre></div></div></div></li></ul><h2 id="parameters">Parameters</h2><p>All API parameters have to send inside the POST request's body.</p><table class="api-params uk-table uk-table-divider uk-table-hover"><thead><tr><th scope="col">Objects</th><th scope="col" width="200px">Values</th><th scope="col">Extra Details</th></tr></thead><tbody><tr><td>stat</td><td><ul><li>ok</li><li>fail</li></ul></td><td>exists only for JSON responses to show if any records are returned or not.</td></tr><tr><td>pagination>offset</td><td>integer</td><td>the starting record for <code>getMonitors</code> and <code>getAlertContacts</code> methods</td></tr><tr><td>pagination>limit</td><td>integer</td><td>the number of records to be returned for <code>getMonitors</code> and <code>getAlertContacts</code> methods</td></tr><tr><td>pagination>total</td><td>integer</td><td>the total number of records for <code>getMonitors</code> and <code>getAlertContacts</code> methods</td></tr><tr><td>account>email</td><td>text</td><td>the account e-mail.</td></tr><tr><td>account>monitor_limit</td><td>integer</td><td>the max number of monitors that can be created for the account</td></tr><tr><td>account>monitor_interval</td><td>integer</td><td>the min monitoring interval (in seconds) supported by the account</td></tr><tr><td>account>up_monitors</td><td>integer</td><td>the number of "up" monitors</td></tr><tr><td>account>down_monitors</td><td>integer</td><td>the number of "down" monitors</td></tr><tr><td>account>pause_monitors</td><td>integer</td><td>the number of "paused" monitors</td></tr><tr><td>monitor>id</td><td>integer</td><td>the ID of the monitor (can be used for monitor-specific requests).</td></tr><tr><td>monitor>friendly_name</td><td>text</td><td>the friendly name of the monitor.</td></tr><tr><td>monitor>url</td><td>URL or IP</td><td>the URL/IP of the monitor.</td></tr><tr><td>monitor>monitor_interval</td><td>integer</td><td>timeout duration for monitoring check. Used only for only HTTP, keyword, port monitor types (in seconds between 1 to 60, default 30)</td></tr><tr><td>monitor>type</td><td><ul><li>1 - HTTP(s)</li><li>2 - Keyword</li><li>3 - Ping</li><li>4 - Port</li><li>5 - Heartbeat</li></ul></td><td>the type of the monitor.</td></tr><tr><td>monitor>sub_type</td><td><ul><li>1 - HTTP (80)</li><li>2 - HTTPS (443)</li><li>3 - FTP (21)</li><li>4 - SMTP (25)</li><li>5 - POP3 (110)</li><li>6 - IMAP (143)</li><li>99 - Custom Port</li></ul></td><td>used only for "Port monitoring (monitor>type = 4)" and shows which pre-defined port/service is monitored or if a custom port is monitored.</td></tr><tr><td>monitor>keyword_type</td><td><ul><li>1 - exists</li><li>2 - not exists</li></ul></td><td>used only for "Keyword monitoring (monitor>type = 2)" and shows "if the monitor will be flagged as down when the keyword exists or not exists".</td></tr><tr><td>monitor>keyword_case_type</td><td><ul><li>0 - case sensitive</li><li>1 - case insensitive</li></ul></td><td>used only for "Keyword monitoring (monitor>type = 2)" if set the keyword value will be checked as case sensitive or case insensitive according the selection. (case sensitive by default)</td></tr><tr><td>monitor>keyword_value</td><td>text</td><td>the value of the keyword.</td></tr><tr><td>monitor>http_username</td><td>text</td><td>used for password-protected web pages. Available for HTTP and keyword monitoring.</td></tr><tr><td>monitor>http_password</td><td>text</td><td>used for password-protected web pages. Available for HTTP and keyword monitoring.</td></tr><tr><td>monitor>http_auth_type</td><td><ul><li>1 - HTTP Basic Auth</li><li>2 - Digest</li></ul></td><td>used for password-protected web pages. Available for HTTP and keyword monitoring</td></tr><tr><td>monitor>port</td><td>integer</td><td>used only for "Port monitoring (monitor>type = 4)" and shows the port monitored.</td></tr><tr><td>monitor>interval</td><td>integer</td><td>the interval for the monitoring check (300 seconds by default).</td></tr><tr><td>monitor>status</td><td><ul><li>0 - paused</li><li>1 - not checked yet</li><li>2 - up</li><li>8 - seems down</li><li>9 - down</li></ul></td><td>the status of the monitor. When used with the editMonitor method 0 (to pause) or 1 (to start) can be sent.</td></tr><tr><td>monitor>all_time_uptime_ratio</td><td><p>formatted as up-down-paused</p></td><td>the uptime ratio of the monitor calculated since the monitor is created.</td></tr><tr><td>monitor>all_time_uptime_durations</td><td><p>rational number (with 3 decimals)</p></td><td>the durations of all time up-down-paused events in seconds.</td></tr><tr><td>monitor>custom_uptime_ratios</td><td><p>rational number (with 3 decimals)</p></td><td>the uptime ratio of the monitor for the given periods (if there is more than 1 period, then the values are seperated with "-")</td></tr><tr><td>monitor>custom_down_durations</td><td><p>rational number (with 3 decimals)</p></td><td>the down durations of the monitor for the given periods in seconds(if there is more than 1 period, then the values are seperated with "-")</td></tr><tr><td>monitor>custom_uptime_ranges</td><td><p>rational number (with 3 decimals)</p></td><td>the uptime ratio of the monitor for the given ranges (if there is more than 1 range, then the values are seperated with "-")</td></tr><tr><td>monitor>average_response_time</td><td><p>rational number (with 3 decimals)</p></td><td>the average value of the response times (requires <code>response_times=1</code>)</td></tr><tr><td>monitor>custom_http_headers</td><td><p>JSON object</p></td><td>used for setting custom HTTP headers for the monitor</td></tr><tr><td>monitor>custom_http_statuses</td><td><p>text</p></td><td>For ex: 404:0_200:1 (to accept 404 as down and 200 as up)</td></tr><tr><td>monitor>http_method</td><td><ul><li>1 - HEAD</li><li>2 - GET</li><li>3 - POST</li><li>4 - PUT</li><li>5 - PATCH</li><li>6 - DELETE</li><li>7 - OPTIONS</li></ul></td><td>the HTTP method to be used</td></tr><tr><td>monitor>post_type</td><td><ul><li>1 - key-value</li><li>2 - raw data</li></ul></td><td>the format of data to be sent with POST, PUT, PATCH, DELETE, OPTIONS HTTP methods</td></tr><tr><td>monitor>post_value</td><td>JSON</td><td>the data to be sent with POST, PUT, PATCH, DELETE, OPTIONS HTTP methods</td></tr><tr><td>monitor>post_content_type</td><td><ul><li>0 - text/html</li><li>1 - application/json</li></ul></td><td>sets the <code>Content-Type</code> for POST, PUT, PATCH, DELETE, OPTIONS HTTP methods</td></tr><tr><td>log>type</td><td><ul><li>1 - down</li><li>2 - up</li><li>99 - paused</li><li>98 - started</li></ul></td><td>the value of the keyword.</td></tr><tr><td>log>datetime</td><td>Unix time</td><td>the date and time of the log (inherits the user's timezone setting).</td></tr><tr><td>log>duration</td><td>seconds (integer)</td><td>the duration of the downtime in seconds.</td></tr><tr><td>log>reason</td><td>text</td><td>the reason of the downtime (if exists).</td></tr><tr><td>response_time>datetime</td><td>Unix time</td><td>the date and time of the log (inherits the user's timezone setting).</td></tr><tr><td>response_time>value</td><td>Integer</td><td>the time to first-byte in milliseconds.</td></tr><tr><td>alertcontact>id</td><td>integer</td><td>the ID of the alert contact.</td></tr><tr><td>alertcontact>type</td><td><ul><li>1 or sms</li><li>2 or e-mail</li><li>3 or twitter</li><li>5 or web-hook</li><li>6 or pushbullet</li><li>7 or zapier</li><li>8 or pro-sms</li><li>9 or pushover</li><li>11 or slack</li><li>14 or voice-call</li><li>15 or splunk</li><li>16 or pagerduty</li><li>17 or opsgenie</li><li>20 or ms-teams</li><li>21 or google-chat</li><li>23 or discord</li></ul></td><td>the type of the alert contact notified.</td></tr><tr><td>alertcontact>friendly_name</td><td>text</td><td>friendly name of the alert contact (for making it easier to distinguish from others).</td></tr><tr><td>alertcontact>value</td><td><ul><li>number:<ul><li>sms</li><li>voice-call</li><li>pro-sms</li></ul></li></ul><i><b>format :</b> 12345678910 (with country code)</i><ul><li>email address:<ul><li>e-mail</li><li>boxcar</li></ul></li></ul><i><b>format :</b> user@uptimerobot.com</i><ul><li>api key:<ul><li>pushover</li><li>pushbullet</li><li>pagerduty</li></ul></li></ul><i><b>format :</b> dXB0aW1lcm9ib3Q=</i><ul><li>url:<ul><li>web-hook</li><li>slack</li><li>zapier</li><li>splunk</li><li>opsgenie</li><li>ms-teams</li><li>google-chat</li><li>discord</li></ul></li></ul><i><b>format :</b> https://example.com/webhook/</i><ul><li>username:<ul><li>twitter</li></ul></li></ul><i><b>format :</b> username</i></td><td>alert contact's email address, phone, username, url or api key depending on the alert contact type.</td></tr><tr><td>alertcontact>status</td><td><ul><li>0 - not activated</li><li>1 - paused</li><li>2 - active</li></ul></td><td>the status of the alert contact.</td></tr><tr><td>alertcontact>threshold</td><td style="word-break:break-all">0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,20,30,35,40,45,50,55,60,70,80,90,100,110,120,150,180,210,240,270,300,360,420,480,540,600,660,720</td><td>the x value that is set to define "if down for x minutes, alert every y minutes.</td></tr><tr><td>alertcontact>recurrence</td><td style="word-break:break-all">0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,20,30,35,40,45,50,55,60</td><td>the y value that is set to define "if down for x minutes, alert every y minutes.</td></tr><tr><td>mwindow>id</td><td>integer</td><td>the ID of the maintenance window.</td></tr><tr><td>mwindow>type</td><td><ul><li>1 - Once</li><li>2 - Daily</li><li>3 - Weekly</li><li>4 - Monthly</li></ul></td><td>the type of the maintenance window.</td></tr><tr><td>mwindow>friendly_name</td><td>text</td><td>friendly name of the maintenance window (for making it easier to distinguish from others).</td></tr><tr><td>mwindow>value</td><td>text</td><td>seperated with "-" and used only for weekly and monthly maintenance windows.</td></tr><tr><td>mwindow>start_time</td><td>Unix time for type=1 and HH:mm for other types.</td><td>start time of the maintenance windows.</td></tr><tr><td>mwindow>duration</td><td>Integer</td><td>duration of the maintenance windows in minutes.</td></tr><tr><td>mwindow>status</td><td><ul><li>0 - paused</li><li>1 - active</li></ul></td><td>the status of the maintenance window.</td></tr><tr><td>psp>id</td><td>integer</td><td>the ID of the status page.</td></tr><tr><td>psp>friendly_name</td><td>text</td><td>friendly name of the status page (for making it easier to distinguish from others).</td></tr><tr><td>psp>monitors</td><td>text</td><td>the list of <code>monitorID</code>s to be displayed in status page (the values are seperated with "-" or 0 for all monitors).</td></tr><tr><td>psp>custom_domain</td><td>text</td><td>the domain or subdomain that the status page will run on.</td></tr><tr><td>psp>password</td><td>text</td><td>the password for the status page.</td></tr><tr><td>psp>sort</td><td><ul><li>1 - friendly name (a-z)</li><li>2 - friendly name (z-a)</li><li>3 - status (up-down-paused)</li><li>4 - status (down-up-paused)</li></ul></td><td>the sorting of the status page.</td></tr><tr><td>psp>status</td><td><ul><li>0 - paused</li><li>1 - active</li></ul></td><td>the status of the status page.</td></tr><tr><td>psp>hide_url_links</td><td>boolean</td><td>removes the uptimerobot link from the status page (pro plan feature).</td></tr></tbody></table></div></div></div></section></main><footer class="page-footer uk-section uk-section-secondary uk-section-large uk-position-relative uk-position-z-index"><div class="uk-container"><div class="uk-margin-bottom" uk-grid><div class="uk-width-1-3@l"><a title="UptimeRobot Homepage" href="/" class="uk-margin-small-bottom uk-display-inline-block"><img alt="UptimeRobot logo" class="page-logo" src="/assets/images/uptimerobot-logo.svg" width="210" height="23"></a><div>Downtime happens. Get notified!</div><p class="uk-margin-small uk-text-muted">Join more than 2,100,000 happy users! UptimeRobot is one of the most popular website monitoring services in the world.</p><div class="footer-social"><a aria-label="Go to our Facebook page" class="btn-icon uk-padding-remove-vertical" href="https://www.facebook.com/UptimeRobot/" rel="me noopener" target="_blank"><svg class="icon-facebook"><use xlink:href="/assets/images/symbol-defs.svg#icon-facebook"></use></svg> </a><a aria-label="Go to our Twitter profile" class="btn-icon uk-padding-remove-vertical" href="https://twitter.com/uptimerobot" rel="me noopener" target="_blank"><svg class="icon-x"><use xlink:href="/assets/images/symbol-defs.svg#icon-x"></use></svg> </a><a aria-label="Go to our LinkedIn profile" class="btn-icon uk-padding-remove-vertical" href="https://www.linkedin.com/company/uptime-robot/" rel="me noopener" target="_blank"><svg class="icon-linkedin"><use xlink:href="/assets/images/symbol-defs.svg#icon-linkedin"></use></svg> </a><a aria-label="Go to our Discord channel" class="btn-icon uk-padding-remove-vertical" href="https://discord.gg/JRBar2vA5N" rel="me noopener" target="_blank"><svg class="icon-discord"><use xlink:href="/assets/images/symbol-defs.svg#icon-discord"></use></svg></a></div></div><div class="uk-width-2-3@l"><div uk-grid><div class="uk-width-1-3@l"><h3 class="uk-margin-small-bottom">Monitoring<span class="uk-text-primary">.</span></h3><ul class="footer-nav uk-text-muted"><li><a href="/website-monitoring/?ref=footer">Website monitoring</a></li><li><a href="/ssl-monitoring/?ref=footer">SSL monitoring</a></li><li><a href="/domain-expiration-monitoring/?ref=footer">Domain monitoring</a></li><li><a href="/ping-monitoring/?ref=footer">Ping monitoring</a></li><li><a href="/port-monitoring/?ref=footer">Port monitoring</a></li><li><a href="/tcp-monitoring/?ref=footer">TCP monitoring</a></li><li><a href="/cron-job-monitoring/?ref=footer">Cron job monitoring</a></li><li><a href="/keyword-monitoring/?ref=footer">Keyword monitoring</a></li></ul></div><div class="uk-width-1-3@l"><h3 class="uk-margin-small-bottom">Company<span class="uk-text-primary">.</span></h3><ul class="footer-nav uk-text-muted"><li><a href="/pricing/">Pricing</a></li><li><a href="https://uptimerobot.com/blog/">Blog</a></li><li><a href="/affiliate/">Affiliate program</a></li><li><a href="/sponsorship/">Non profit & charities 馃げ</a></li><li><a href="/terms/">Terms</a> / <a href="/privacy">Privacy</a></li><li><a href="/contact/">Contact us</a></li><li><a class="uk-label uk-label-warning" href="https://itrinitycom.notion.site/Careers-work-with-us-d3796aa492764653af60f7028a87b206" target="_blank" rel="noopener nofollow" style="text-decoration:none!important">We are hiring!</a></li></ul></div><div class="uk-width-1-3@l"><h3 class="uk-margin-small-bottom">Resources<span class="uk-text-primary">.</span></h3><ul class="footer-nav uk-text-muted"><li><a href="/integrations/">Integrations</a></li><li><a href="/api/">API</a></li><li><a href="/faq/">FAQs</a></li><li><a href="/help/">Help center</a></li><li><a href="/help/locations/">Locations & IPs</a></li><li><a href="/comparisons/">Comparisons</a></li><li><a href="/case-studies/">Case studies</a></li><li><a href="/knowledge-hub/">Knowledge hub</a></li></ul></div></div></div></div><div class="uk-text-center"><span class="green-dot is-big is-pulse" uk-tooltip="title: Yes, we are always monitoring! 馃槈; delay: 1000; pos: bottom"></span></div></div></footer><aside id="mobile-menu" uk-offcanvas="overlay: true" class="mobile-menu-wrap"><div class="uk-flex uk-flex-column uk-padding-remove uk-offcanvas-bar uk-width-1-1 mobile-menu"><div class="uk-flex uk-flex-between uk-flex-middle uk-padding"><a title="UptimeRobot Homepage" href="/"><img alt="UptimeRobot logo" class="page-logo" src="/assets/images/uptimerobot-logo.svg" width="210" height="32"> </a><button class="btn-icon uk-offcanvas-close" type="button" uk-close></button></div><div class="uk-flex uk-flex-column uk-child-width-1@m uk-padding mobile-menu-section"><span class="font-18 uk-text-bold">Monitors</span><div class="uk-flex uk-flex-middle uk-padding-remove uk-margin-remove uk-flex-between uk-width-1-1 uk-child-width-1@m uk-grid monitoring-submenu-mobile"><a href="/website-monitoring/" class="uk-flex uk-flex-top uk-padding-small monitor uk-margin-remove"><div class="uk-flex uk-flex-middle uk-flex-left monitor-icon"><img alt="website monitoring icon" src="/assets/images/monitor-icons/dark/website-monitoring-dark.svg" width="50px" uk-img></div><div class="uk-flex uk-flex-top uk-flex-column uk-margin-small-left text"><span class="font-18 uk-text-secondary uk-text-bold uk-margin-remove">Website monitoring</span> <span class="font-16 uk-text-muted uk-margin-remove">Be the first to know that your website is down!</span></div></a><a href="/cron-job-monitoring/" class="uk-flex uk-flex-top uk-padding-small monitor uk-margin-remove"><div class="uk-flex uk-flex-middle uk-flex-left monitor-icon"><img alt="cron job monitoring icon" src="/assets/images/monitor-icons/dark/cron-job-monitoring-dark.svg" width="50px" uk-img></div><div class="uk-flex uk-flex-top uk-flex-column uk-margin-small-left text"><span class="font-18 uk-text-secondary uk-text-bold uk-margin-remove">Cron job monitoring</span> <span class="font-16 uk-text-muted uk-margin-remove">Monitor recurring background jobs or intranet devices.</span></div></a><a href="/port-monitoring/" class="uk-flex uk-flex-top uk-padding-small monitor uk-margin-remove"><div class="uk-flex uk-flex-middle uk-flex-left monitor-icon"><img alt="port monitoring icon" src="/assets/images/monitor-icons/dark/port-monitoring-dark.svg" width="50px" uk-img></div><div class="uk-flex uk-flex-top uk-flex-column uk-margin-small-left text"><span class="font-18 uk-text-secondary uk-text-bold uk-margin-remove">Port monitoring</span> <span class="font-16 uk-text-muted uk-margin-remove">Monitor any specific service running on any port.</span></div></a><a href="/keyword-monitoring/" class="uk-flex uk-flex-top uk-padding-small monitor uk-margin-remove"><div class="uk-flex uk-flex-middle uk-flex-left monitor-icon"><img alt="keyword monitoring icon" src="/assets/images/monitor-icons/dark/keyword-monitoring-dark.svg" width="50px" uk-img></div><div class="uk-flex uk-flex-top uk-flex-column uk-margin-small-left text"><span class="font-18 uk-text-secondary uk-text-bold uk-margin-remove">Keyword monitoring</span> <span class="font-16 uk-text-muted uk-margin-remove">Check presence or absence of any text on the page.</span></div></a><a href="/ping-monitoring/" class="uk-flex uk-flex-top uk-padding-small monitor uk-margin-remove"><div class="uk-flex uk-flex-middle uk-flex-left monitor-icon"><img alt="ping monitoring icon" src="/assets/images/monitor-icons/dark/ping-monitoring-dark.svg" width="50px" uk-img></div><div class="uk-flex uk-flex-top uk-flex-column uk-margin-small-left text"><span class="font-18 uk-text-secondary uk-text-bold uk-margin-remove">Ping monitoring</span> <span class="font-16 uk-text-muted uk-margin-remove">Leverage one of the most used network admin tools.</span></div></a><a href="/ssl-monitoring/" class="uk-flex uk-flex-top uk-padding-small monitor uk-margin-remove"><div class="uk-flex uk-flex-middle uk-flex-left monitor-icon"><img alt="ssl certificate monitoring icon" src="/assets/images/monitor-icons/dark/ssl-monitoring-dark.svg" width="50px" uk-img></div><div class="uk-flex uk-flex-top uk-flex-column uk-margin-small-left text"><span class="font-18 uk-text-secondary uk-text-bold uk-margin-remove">SSL monitoring</span> <span class="font-16 uk-text-muted uk-margin-remove">Don't lose visitors because of expired SSL certificates.</span></div></a><a href="/domain-expiration-monitoring/" class="uk-flex uk-flex-top uk-padding-small monitor uk-margin-remove"><div class="uk-flex uk-flex-middle uk-flex-left monitor-icon"><img alt="domain expiration monitoring icon" src="/assets/images/monitor-icons/dark/domain-monitoring-dark.svg" width="50px" uk-img></div><div class="uk-flex uk-flex-top uk-flex-column uk-margin-small-left text"><span class="font-18 uk-text-secondary uk-text-bold uk-margin-remove">Domain monitoring</span> <span class="font-16 uk-text-muted uk-margin-remove">Don't let your unique domain name expire.</span></div></a></div></div><div class="uk-flex uk-flex-column uk-child-width-1@m uk-padding mobile-menu-section"><span class="font-18 uk-text-bold">Teams</span><ul class="uk-flex uk-flex-column uk-padding-remove mobile-menu-list font-16 uk-marign-small-top"><li><a class="uk-padding-small uk-display-block uk-padding-remove-horizontal" href="/monitoring-for-devops">Devops</a></li><li><a class="uk-padding-small uk-display-block uk-padding-remove-horizontal" href="/monitoring-for-developers">Developers</a></li><li><a class="uk-padding-small uk-display-block uk-padding-remove-horizontal" href="/monitoring-for-marketers">Marketers</a></li><li><a class="uk-padding-small uk-display-block uk-padding-remove-horizontal" href="/monitoring-for-support">Support</a></li><li><a class="uk-padding-small uk-display-block uk-padding-remove-horizontal" href="/monitoring-for-business-owners">Business owners</a></li></ul></div><ul class="uk-flex uk-flex-column uk-padding mobile-menu-list font-18 uk-text-bold mobile-menu-section"><li><a href="/integrations" class="uk-padding-small uk-display-block uk-padding-remove-horizontal">Integrations</a></li><li><a href="/status-page" class="uk-padding-small uk-display-block uk-padding-remove-horizontal">Status Page</a></li><li><a href="/pricing" class="uk-padding-small uk-display-block uk-padding-remove-horizontal">Pricing</a></li><li class="hide-for-logged"><a href="https://dashboard.uptimerobot.com/login?ref=website-mobile-menu" class="uk-padding-small uk-display-block uk-padding-remove-horizontal">Log In</a></li><li class="show-for-logged uk-hidden"><a href="https://dashboard.uptimerobot.com?ref=website-mobile-menu" class="uk-padding-small uk-display-block uk-padding-remove-horizontal">Go to Dashboard</a></li></ul><div class="uk-flex uk-padding mobile-menu-section"><a class="uk-button uk-margin-auto uk-button-primary uk-button-large uk-width-auto hide-for-logged" href="https://dashboard.uptimerobot.com/sign-up?ref=website-mobile-menu">Register for FREE</a></div></div></aside><aside id="ck-consent" class="card is-dark uk-hidden font-14">馃崻 This website use cookies. <a href="https://uptimerobot.com/privacy" class="uk-text-muted" rel="nofollow noopener" target="_blank">Learn more</a><br><button class="uk-button uk-button-text uk-text-muted hide-ckc" data-ckc-action="decline" style="margin-left:0;font-weight:100">Decline all</button> <span class="uk-text-muted"> | </span> <button class="uk-button uk-button-text uk-text-muted hide-ckc" data-ckc-action="essential-only" style="font-weight:100">Allow essential</button> <span class="uk-text-muted"> | </span> <button class="uk-button uk-button-text uk-text-primary hide-ckc" data-ckc-action="accept">Accept all</button></aside><script>!function(e,t,s,a,n){e[a]=e[a]||[],e[a].push({"gtm.start":(new Date).getTime(),event:"gtm.js"});var r=t.getElementsByTagName(s)[0],m=t.createElement(s);m.async=!0,m.src="https://users.uptimerobot.com/gtm.js?id=GTM-TMWSCG3",r.parentNode.insertBefore(m,r)}(window,document,"script","dataLayer")</script><script src=".././assets/scripts/main.28af88c9f73ad049b721.js"></script><link href=".././assets/styles/main.28af88c9f73ad049b721.css" rel="stylesheet"><script data-cfasync="false">window.civchat={apiKey:"su5k6k"}</script><script data-cfasync="false" src="https://uptimerobot.user.com/widget.js"></script><script data-cfasync="false" src="/assets/js/referral-code.js"></script><script>!function(e,r,t,c,g){e.gr=e.gr||function(){e.gr.ce=30,e.gr.q=e.gr.q||[],e.gr.q.push(arguments)},c=r.getElementsByTagName(t)[0],(g=r.createElement(t)).async=!0,g.src="https://script.getreditus.com/v2.js",c.parentNode.insertBefore(g,c)}(window,document,"script"),gr("initCustomer","000dba31-e3ab-4ca8-9edd-612e549d18e1"),gr("track","pageview")</script><script>var giftofspeed=document.createElement("link");giftofspeed.rel="stylesheet",giftofspeed.href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap",giftofspeed.type="text/css";var godefer=document.getElementsByTagName("link")[0];godefer.parentNode.insertBefore(giftofspeed,godefer)</script><script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.0.3/build/highlight.min.js"></script><script>$(document).ready(function(){hljs.initHighlighting()})</script></body></html>