The MainWP API uses REST conventions and returns all data in JSON format. Authenticate requests using an API key (Bearer token) or Consumer Key/Consumer Secret for Legacy REST API (Version 1).
All MainWP REST API calls, including documentation and examples, are publicly available on Postman.
Your MainWP Dashboard must be on a web host accessible via the internet. Locally hosted Dashboards cannot receive REST API requests.
Enable REST API
1
Configure permalinks
Go to WP Admin > Settings > Permalinks and choose any setting except Plain (WordPress REST API limitation).

2
Create an API key
Navigate to Dashboard > REST API > Add API Keys and enter a name for your key.
3
Save the Bearer token
Copy the generated API key (Bearer token) to a safe location.

4
Set permissions
Select the permissions your key requires (Read, Write, Delete).
5
(Optional) Enable Legacy API
To use Legacy REST API (Version 1):
- Click Show Legacy API Credentials
- Copy the Consumer Key and Consumer Secret
- Enable MainWP REST API v1 Compatibility

6
Save settings
Click Save Settings to activate the key.
REST API Permissions
MainWP REST API uses granular permissions that you can assign individually or in combination.| Permission | HTTP Methods | Use Case |
|---|---|---|
| Read | GET | Retrieve data without modifications |
| Write | POST, PUT | Create or update data, trigger actions |
| Delete | DELETE | Remove data |
API keys created before version 4.5 have all three permissions enabled by default. Edit existing keys to adjust permissions.

Disable REST API
Navigate to Dashboard > REST API > Manage API Keys and disable any enabled keys.
Delete REST API Keys
Navigate to Dashboard > REST API > Manage API Keys. Click Delete to remove individual keys, or select multiple keys and choose Delete from the Bulk actions dropdown.