Skip to content

API Reference Overview

The WP Engine Customer API provides a comprehensive set of endpoints for managing your WordPress sites, accounts, and users. This reference documentation will help you understand the available resources and how to interact with them.

Base URL & Versioning

All API requests should be made to:

https://api.wpengineapi.com/v1

The current version of the API is v1. The version is included in the URL path to ensure compatibility as the API evolves.

Authentication

The API uses Basic Authentication. You’ll need your API username and password from the WP Engine User Portal. See the Authentication guide for detailed instructions.

Making Requests

Content Types

The API accepts JSON-encoded request bodies:

  • For JSON requests: Content-Type: application/json

HTTP Methods

The API uses standard HTTP methods:

  • GET: Retrieve resources
  • POST: Create new resources
  • PATCH: Update existing resources
  • DELETE: Remove resources

Here’s an example of each method:

Terminal window
# Retrieve a site
curl -X GET "https://api.wpengineapi.com/v1/sites/28c78b6d-c2da-4f09-85f5-1ad588089b2d" \
-u "API_USER_ID:API_USER_PASSWORD"

Status Codes

The API uses standard HTTP status codes:

CodeDescription
200Success - The request was successful
201Created - The resource was successfully created
204No Content - The request was successful (often for DELETE operations)
400Bad Request - The request was invalid
401Authentication Error - Invalid credentials
403Not Authorized - You don’t have permission
404Not Found - The resource doesn’t exist
429Too Many Requests - Rate limit exceeded
503Service Unavailable - The service is temporarily unavailable

Response Format

Most endpoints return data in this format:

{
"id": "28c78b6d-c2da-4f09-85f5-1ad588089b2d",
"name": "Torque Magazine",
"account": {
"id": "eeda3227-9a39-46ae-9e14-20958bb4e6c9"
}
}

List endpoints return paginated results:

{
"previous": "https://api.wpengineapi.com/v1/sites?limit=100&offset=0",
"next": "https://api.wpengineapi.com/v1/sites?limit=100&offset=200",
"count": 225,
"results": [
{
"id": "28c78b6d-c2da-4f09-85f5-1ad588089b2d",
"name": "Torque Magazine",
"account": {
"id": "eeda3227-9a39-46ae-9e14-20958bb4e6c9"
}
}
]
}

See the Pagination guide for details on working with paginated responses.

Error Responses

When an error occurs, the API returns an error object:

{
"message": "Bad Credentials"
}

Available Resources

ResourceDescriptionEndpoints
StatusSystem status and healthGET /status
AccountsManage WP Engine accountsGET /accounts, GET /accounts/{id}
Account UsersManage account usersGET, POST, PATCH, DELETE /accounts/{id}/account_users
SitesManage sitesGET, POST, PATCH, DELETE /sites
InstallsManage WordPress installationsGET, POST, PATCH, DELETE /installs
DomainsManage domains and redirectsGET, POST, PATCH, DELETE /installs/{id}/domains
BackupsCreate and manage backupsPOST /installs/{id}/backups
CachePurge various cachesPOST /installs/{id}/purge_cache
UserCurrent user informationGET /user
SSH KeysManage SSH keysGET, POST, DELETE /ssh_keys