WP Engine Customer API
The WP Engine API allows you the ability to interact with our platform programmatically. API credentials need to be generated on a per-user basis. In this article, we will show you how to enable the WP Engine API on your account and how to generate your own API credentials.
Enable WPE API
To enable the API for your account, you must be an account Owner. For more information on User Portal roles, check out this guide.
- Log in to the User Portal
- Expand Users in the lefthand menu
- Select API Access
- You can visit this page directly at: https://my.wpengine.com/api_access
- Locate the account name you’d like to enable API access for
- Toggle the button to the ON position next to the account name
- Click the Generate Credentials button at the top right
- This will generate the user’s credential required to connect to WP Engine’s API, across all accounts that have API access enabled and they are authorized to access.
- Copy the username and password to a safe place.
Finally, go to wpengineapi.com to learn how to authenticate with the API and learn more about the endpoints available.
NOTE
Users can only make API calls to environments they have access to in the User Portal. Review User Portal roles and permissions.
Example tasks that can be done with the WP Engine API
The WP Engine API allows you to perform basic account management tasks.
The terms install and environment are interchangeable in the below context.
- List your WP Engine accounts
- List account users
- Add account user
- Delete account user
- Update account user
- User role in the WP Engine User Portal
- Install IDs that a user can access for Partial users
- List your sites
- Add site
- Rename site
- Delete site
- List your installs
- Add environment
- Delete environment
- Add domain(s)
- Delete domain
- Set domain as primary
- Check domain status
- Create backup
- Purge cache
- List your SSH keys
- Add SSH key
- Delete SSH key
Example tasks that can NOT be done with the WP Engine API
The following example tasks can not currently be performed with the WP Engine API.
- Copy environment
- Transfer environment
- Restore backup
- Manage SSL
- Manage SFTP credentials
- Switch network
- Manage Redirect Rules
- Manage Web Rules
- View logs
- Manage Git users
- Migrate a website
- Manage cache exclusions
- Manage password protection
- Enable/disable multisite
- Enable/disable “redirect bots” setting
- Enable/disable “read only” setting
- Enable/disable “alternate cron” setting
- Reset file permissions
- Manage themes or plugins
- Manage product extensions or their settings
- Manage Headless (Atlas) Sites
- See instead: https://developers.wpengine.com/docs/
Further Reading
For API code samples, see: https://wpengineapi.com/
For a full list of WP Engine API calls, see: https://wpengineapi.com/reference
NEXT STEP: Use the WPE API to connect with Local