Skip to main content

GET /maintenance

Returns the current maintenance mode status and all appearance settings for the maintenance page.
curl -X GET https://example.com/wp-json/wp-manager-pro/v1/maintenance \
  -H "X-WP-Nonce: YOUR_NONCE"

Response

active
boolean
Whether maintenance mode is currently enabled.
title
string
Heading text shown on the maintenance page.
message
string
Body message shown on the maintenance page.
end_time
string
Optional ISO 8601 timestamp for the countdown timer. Empty string if not set.
bg_start
string
Hex color for the start of the background gradient (e.g. #1e1e2e).
bg_end
string
Hex color for the end of the background gradient.
accent
string
Hex color for accent elements such as the divider and badge.
text_color
string
Hex color for body text.
Logo content — an emoji or short text displayed in the icon box.
badge_text
string
Text shown inside the animated badge.
show_badge
boolean
Whether the animated badge is visible.
show_countdown
boolean
Whether the countdown timer is visible.
bypass_roles
array
List of role slugs that can bypass maintenance and view the site normally.
available_roles
object
Map of role slug to role display name for all non-administrator roles.
bypass_key
string
Secret URL key. Appending ?wmp_preview=KEY to any URL grants a 7-day bypass cookie.
scope
string
Which pages maintenance applies to: all, home, or paths.
scope_paths
string
Newline-separated URL path patterns when scope is paths.
home_url
string
The site’s home URL with trailing slash.

POST /maintenance/toggle

Enables or disables maintenance mode. You can also pass any appearance settings in the same request to update them atomically.
WP Manager Pro stores maintenance state in the database rather than writing a .maintenance file. This ensures the REST API remains accessible while maintenance mode is active, so you can always toggle it back via the API.
curl -X POST https://example.com/wp-json/wp-manager-pro/v1/maintenance/toggle \
  -H "X-WP-Nonce: YOUR_NONCE" \
  -H "Content-Type: application/json" \
  -d '{"enable": true, "title": "Down for maintenance", "message": "Back in 30 minutes."}'

Parameters

enable
boolean
required
true to enable maintenance mode, false to disable it.
title
string
Page heading text.
message
string
Body message text (supports newlines).
end_time
string
Countdown end time as an ISO 8601 string (e.g. 2026-04-01T12:00:00).
bg_start
string
Hex color for the gradient start.
bg_end
string
Hex color for the gradient end.
accent
string
Hex color for accent elements.
text_color
string
Hex color for body text.
logo
string
Logo emoji or text.
badge_text
string
Animated badge text.
show_badge
boolean
Whether to show the animated badge.
show_countdown
boolean
Whether to show the countdown timer.
bypass_roles
array
Array of role slugs that can bypass maintenance.
scope
string
Scope of maintenance: all, home, or paths.
scope_paths
string
Newline-separated URL path patterns (used when scope is paths).

Response

success
boolean
Always true on success.
active
boolean
The new maintenance mode state.

POST /maintenance/settings

Saves appearance settings without changing the maintenance mode active state. Use this endpoint to update the page design while maintenance is already running.
curl -X POST https://example.com/wp-json/wp-manager-pro/v1/maintenance/settings \
  -H "X-WP-Nonce: YOUR_NONCE" \
  -H "Content-Type: application/json" \
  -d '{"accent": "#ff6b6b", "badge_text": "Coming soon"}'

Parameters

Accepts the same appearance parameters as POST /maintenance/toggle (all optional): title, message, end_time, bg_start, bg_end, accent, text_color, logo, badge_text, show_badge, show_countdown, bypass_roles, bypass_key, scope, scope_paths.

Response

success
boolean
Always true on success.
message
string
Confirmation message.

Build docs developers (and LLMs) love