Update Status Page Status
This API endpoint allows updating the status of a statuspage. The path parameter requires the statuspage ID and the request body requires the enabled field to specify whether the statuspage should be enabled or disabled.

Authorization: Bearer YOUR_TOKEN


Expected Behavior:


  • On success, the system will update the status of the statuspage.
  • If the statuspage is not found, a 404 error will be returned.
  • If the request is invalid, the system will return an error message with details of the invalid fields.
Path Parameters
  • id string
    The unique ID of the statuspage to update. Example: '445a5c1f-c0eb-403a-96d7-3976e5dc74ed'
Request Body Parameters
  • enabled boolean
    A boolean value that indicates whether the statuspage should be enabled or disabled. Example: 'false'
JavaScript
Response codes
const axios = require('axios');

const url = "https://statuspage-cmd.api.pinghome.io/v1/statuspage/445a5c1f-c0eb-403a-96d7-3976e5dc74ed/status";
const data = { enabled: false };

axios.put(url, data, {
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json'
  }
})
.then(response => {
  console.log(response.data);
})
.catch(error => {
  console.error(error);
});
ResponseThis section is used to view the possible HTTP response codes returned by the API. These codes indicate the status of a request, such as 201 (Created), 401 (Unauthorized), 409 (Conflict), or 422 (Unprocessable Entity).