Dynamic Status Pages on Demand

Published on July 2, 2025 by Sean White

Clients expect transparency - especially when things go wrong. But manually updating a status page during an incident or maintenance window slows you down when speed matters most.

Oh Dear’s status pages are more than just a pretty uptime dashboard. They’re fully API-driven and designed to scale with your workflow. Whether you manage five client sites or five hundred, you can create, update and sync status pages as needed.

Before we get going you can find the status page API docs here: https://ohdear.test/docs/integrations/the-oh-dear-api#status-pages

Here’s how to do it.

1. Create Status Pages via the API (with Custom Domains)

You can programmatically spin up a status page using the Oh Dear API. This includes:

  • Name and title
  • Sites components to show
  • Create a status update

This is perfect for automating client onboarding from your CRM - provision their site, then create a branded status page as part of the same flow.

Let's create a status page for all of our client sites.

const response = await fetch('https://ohdear.app/api/status-pages', {
    headers: {
        'Authorization': `Bearer ${process.env.OHDEAR_API_KEY}`,
        'Content-Type': 'application/json'
    },
    method: 'POST',
    body: JSON.stringify({
        "team_id": 1,
        "title": "Clients",
        "sites": []
    })
});

const data = await response.json();

const statusPageId = data.id;

2. Sync Sites by Tag

Once the page is created, use the API to attach monitored sites to it. To keep status pages in sync with your infrastructure, you can pull all sites matching tag and attach them to the relevant status page.

In this example we will sync sites tagged with env:production and client:*. This way, new sites added to your system are reflected in public reporting without extra effort. Add this in as a hook to your CRM or on a schedule.

Tip: you can monitor the scheduled task using Oh Dear's cron job monitoring service.

Let's see how we can do this:

// get the status page using the id from the previous step or find it by your custom domain:

const statusPages = await (await get('status-pages')).json();

const statusPage = statusPages.data.find(page => page.domain === 'status.your-site.com');

const sites = await (await get('sites')).json();

const sitesToSync = sites.data.filter(site => site.tags.includes('env:production') && site.tags.includes('client:*'));

const response = await post(`https://ohdear.app/api/status-pages/${statusPage.id}/sites`, {
        "sync": true,
        "sites": sitesToSync.map(site => ({
            "id": site.id,
            "clickable": true
        }))
    })

console.log(response.status);

You should see a 200 response and all sites synced to the status page. You can also switch off the sync by setting "sync": false which turns this endpoint into a append-only operation.

Status page sites are automatically grouped by the 'group name' in your site settings. Note: tags are not visible to the public.

3. Create Reusable Status Page Update Templates

If you manage multiple clients with similar needs, you can define a status page template from the UI or API. This gives you the option to set a default title, text and/or severity with a label for quick selection.

Even though we are using the API one of the biggest benefits of status page templates is the ability to give non-technical team members access to pre-prepared messages to the public. No more back and forth with the team to get a message approved.

Let's see how we can create a new template. You might use this to control the list of messages from your CRM.

const response = await post('https://ohdear.app/api/status-page-update-templates', {
    "team_id": 1,
    "name": "Major issue template",
    "title": "Major issue",
    "text": "We are currently experiencing a major issue. Please check back later.",
    "severity": "major"
})

You might want to make the template more useful by providing more details about the issue. You can view some example templates we have prepared here: https://ohdear.app/news-and-updates/new-feature-status-page-update-templates

4. Recurring Maintenance Periods (and Update Status)

Using the API, you can schedule a maintenance window and set the status page’s current status at the same time. This is ideal when deploying updates or rolling out infrastructure changes.

We recommend:

  1. Triggering the maintenance state just before deployment starts (if you are zero downtime it might be worth doing this for larger code changes, migrations and performance-impacting work)
  2. Updating the status to "Maintenance scheduled"
  3. Redirecting traffic to the status page during the window if there's downtime involved

This improves transparency and helps set expectations regarding performance while you focus on the work.

We frequently get asked about recurring maintenance periods. We don't support it directly in the application as it can be confusing to manage - sometimes it's not obvious why your notifications have been supressed. This is especially important when a maintenance window is cancelled internally but Oh Dear is not aware - potentially causing some alerts to be silenced.

However, the API allow you to set a time in advance and duration for the maintenance window., This way you can schedule as many maintenance windows as you want in preparation scheduled releases. Similarly, status page updates can also be set in advance so you can co-ordinate your alert maintenance windows and public status updates.

Let's see how we can do this:

const response = await post('https://ohdear.app/api/maintenance-periods', {
    "site_id": 1,
    "start_at": "2025-01-01 09:00",
    "end_at": "2025-01-01 10:00",
});

const response = await post('https://ohdear.app/api/status-page-updates', {
    "status_page_id": 1,
    "title": "Scheduled maintenance",
    "text": "We are working on it. Please check back later.",
    "severity": "maintenance",
    "time": "2025-01-01 09:00",
    "pinned": false
});

Now everything is nicely syncronized. Set up as many as you need in advance, trigger it via a cron job or by deployment or via your internal tools - your status page and alerts is only an API call away.

Automate Everything

By integrating status page management into your deployment pipeline and client onboarding you give your customers a better experience without extra overhead. And with Oh Dear’s flexible API you're always in control of what gets shared, and when.

The API works across your account (assuming you have scoped the API key appropriately) so you can easily transfer sites, status pages, message templates and notifications between teams.

Let us know what you would like to see in the API to make managing sites as easy as using the UI.

Start using Oh Dear today!

  • Access to all features
  • Cancel anytime
  • No credit card required
  • First 30 days free

More updates

Want to get started? We offer a no-strings-attached 30 day trial. No credit card required.

Start monitoring

You're all set in
less than a minute!