Create Status Page
This API endpoint allows creating a new status page in the system. The request body requires details such as the name, description, subdomain, and other relevant information.

Authorization: Bearer YOUR_TOKEN


Expected Behavior:


  • On success, the system will create a new status page and return its details.
  • If the request is invalid, the system will return an error message with details of the invalid fields.
Request Body Parameters
  • name string
    The name of the status page.
  • description string
  • subdomain string
  • type string
  • password (enabled for private) string
  • domain (optional) string
  • page_name (optional) string
  • dark_theme (optional) boolean
  • favicon (optional) string
  • logo (optional) string
  • redirect_to_https (optional) boolean
  • remove_branding (optional) boolean
  • robots_meta_contents (optional) array of strings
  • website_url (optional) string
  • privacy_url (optional) string
  • support_url (optional) string
  • ga_tracking (optional) string
  • ip_addresses (enabled for private) array of strings
  • subscription_enabled (optional) boolean
  • components array of objects
  • groups array of objects
JavaScript
Response codes
const axios = require('axios');

const url = "https://statuspage-cmd.api.pinghome.io/v1/statuspage";
const data = {
  name: 'Statuspage name',
  description: 'Statuspage description',
  subdomain: 'status',
  type: 'public',
  password: 'TestPassw0rd!',
  domain: 'status.pinghome.io',
  page_name: 'Example',
  dark_theme: false,
  favicon: 'org/f14340fc-3321-42c7-a93b-9befeea8871e/images/img-1705147439.jpg',
  logo: 'org/f14340fc-3321-42c7-a93b-9befeea8871e/images/img-1705147439.jpg',
  redirect_to_https: true,
  remove_branding: true,
  robots_meta_contents: ['index'],
  website_url: 'https://pinghome.io',
  privacy_url: 'https://pinghome.io/privacy-policy',
  support_url: 'https://pinghome.io/support',
  ga_tracking: 'UA-123123-1',
  ip_addresses: ['8.8.8.8'],
  subscription_enabled: true,
  components: [{
    name: 'Component name',
    description: 'Component description',
    status: 'operational',
    type: 'resource',
    resource_id: 'c03b02ec-244f-4d2c-8f68-3910071ed5c8'
  }],
  groups: [{
    name: 'Group name',
    components: [{
      name: 'Component name',
      description: 'Component description',
      status: 'operational',
      type: 'resource',
      resource_id: 'c03b02ec-244f-4d2c-8f68-3910071ed5c8'
    }]
  }]
};

axios.post(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).