REST API
MediaShield overviewFree + ProGet MediaShield →
PRO - requires MediaShield Pro. Every route below was checked against the registered routes of a running 1.4.0 install.
Base URL: /wp-json/mediashield-pro/v1/
The namespace index GET /mediashield-pro/v1 is added by WordPress. All other endpoints require manage_options unless noted. Authentication uses the X-WP-Nonce header with a wp_rest nonce. /bunny/webhook differs: it is public (verified by HMAC signature or shared token).
Platforms
Section titled “Platforms”| Method | Route | Description |
|---|---|---|
| GET | /platforms |
List platform connections. Credentials are never returned - the response carries id, platform, extra_config, is_active, connected_by, connected_at, and for Bunny has_read_only_api_key (never the key) |
| POST | /platforms |
Create a connection. Params: platform (bunny, vimeo, youtube, wistia), api_key, api_secret, extra_config. Bunny requires extra_config.pull_zone_hostname |
| PATCH | /platforms/{id} |
Bunny only: set or remove the Read-Only API key. Param: read_only_api_key (empty removes it) |
| DELETE | /platforms/{id} |
Remove a connection |
Uploads
Section titled “Uploads”| Method | Route | Description |
|---|---|---|
| GET | /uploads |
Paginated ms_upload_queue job list. Params: page, per_page, status (pending, uploading, processing, complete, failed) |
Uploads themselves are started through free’s POST /mediashield/v1/upload/init. Pass driver=bunny|vimeo|youtube|wistia to route an upload to a connected platform. When driver is left out, Free uses the Default Upload Target setting (ms_default_upload_target). Pro answers “auto” with the first active connection, or self_hosted when none is connected.
Platform Browsing and Import
Section titled “Platform Browsing and Import”| Method | Route | Description |
|---|---|---|
| GET | /bunny/videos |
List Bunny Stream library videos. Params: page, per_page (max 100), search, collection |
| POST | /bunny/import |
Import videos. Body: video_ids (array of Bunny GUIDs) |
| GET | /bunny/collections |
List Bunny collections |
| POST | /bunny/webhook |
Receive Bunny encoding callbacks. Public. Needs the ms_token query argument, or a valid X-BunnyStream-Signature header (v1, HMAC SHA-256 of the body keyed with the library’s Read-Only API key), else 403 invalid_signature |
| GET | /youtube/videos |
List channel videos. Params: page, per_page (max 50), search, playlist |
| POST | /youtube/import |
Import videos. Body: video_ids |
| GET | /youtube/playlists |
List YouTube playlists |
| GET | /vimeo/videos |
List account videos. Params: page, per_page (max 100), search, folder |
| POST | /vimeo/import |
Import videos. Body: video_ids |
| GET | /vimeo/folders |
List Vimeo folders |
| GET | /wistia/videos |
List videos. Params: page, per_page (max 100), search, project |
| POST | /wistia/import |
Import videos. Body: video_ids |
| GET | /wistia/projects |
List Wistia projects |
Imports skip videos already in the library and return counts of imported, skipped and failed.
Analytics
Section titled “Analytics”| Method | Route | Description |
|---|---|---|
| GET | /analytics/heatmap/{id} |
10-second bucket heatmap data for a video (from ms_heatmap_cache) |
| GET | /analytics/playlist-funnel/{playlist_id} |
Drop-off analysis for a playlist. No admin screen consumes this - API only |
| GET | /analytics/device-breakdown |
Device and browser distribution. Param: period (default 30d) |
| GET | /realtime/viewers |
Active sessions (is_active = 1 and last heartbeat within 5 minutes) |
| GET | /analytics/suspicious |
Paginated activity alerts. Params: page, per_page (default 20) |
| PATCH | /analytics/suspicious/{id}/dismiss |
Dismiss an alert (sets is_dismissed = 1) |
| POST | /analytics/suspicious/safe-user |
Whitelist a user. Param: user_id. Also dismisses that user’s open alerts |
Milestones
Section titled “Milestones”| Method | Route | Description |
|---|---|---|
| GET | /milestones/config |
Retrieve milestone action configuration (ms_pro_milestone_config) |
| PUT | /milestones/config |
Save the configuration. Body: {config: [{threshold, actions: [{type, config}]}]} or a bare array. threshold 1-100, type one of tag, email, webhook |
| POST | /milestones/test-action |
Fire one action once against the current admin. Body: {type, threshold, config} |
The config has no per-video dimension - a milestone action applies to every video.
Export
Section titled “Export”| Method | Route | Description |
|---|---|---|
| GET | /export/csv/{type} |
Stream CSV. {type}: watch_sessions, milestones, users. Params: date_from, date_to, user_id, video_id. No cap on watch-session and milestone exports since 1.3.0 - they keyset-page and export in full. The user export keeps a 200,000-row ceiling and writes a NOTE row into the CSV if it is reached. Requires _wpnonce (the download is a plain anchor navigation, so the nonce travels in the query string) |
| POST | /export/pdf/report |
Queue an async PDF report. Param: period (7d, 30d, 90d, all; default 30d). Returns 202 with { job_id, status, message } |
| GET | /export/status/{job_id} |
Check PDF job status. Adds download_url once the job is complete |
Reports
Section titled “Reports”| Method | Route | Description |
|---|---|---|
| POST | /digest/send-test |
Render the weekly digest and send it to the requesting admin’s email, not the configured digest address. Returns sent: false with reason digest_disabled_or_no_recipient when ms_weekly_digest_enabled is off |
License
Section titled “License”| Method | Route | Description |
|---|---|---|
| GET | /license |
Current license state: key_masked, has_key, status (raw store object), is_valid, has_bypass, item_id, store_url |
| POST | /license |
Activate a key against the wbcomdesigns.com store |
| DELETE | /license |
Deactivate the stored key and free the store slot |
All Pro routes use the mediashield-pro/v1 namespace exclusively. No Pro routes are registered under mediashield/v1.
Pro settings through Free’s settings route
Section titled “Pro settings through Free’s settings route”Pro adds its options to GET and PUT /mediashield/v1/settings through the mediashield_settings_response and mediashield_settings_update filters. They are listed with defaults in Settings, Options and Scheduled Jobs. ms_vpn_api_key is accepted on PUT and never returned. GET returns ms_vpn_api_key_set (a boolean) instead.

