Use the MainWP Postman collection as the source of truth for request and response schemas.
{key_identifier} accepts either a numeric key ID (v2) or a ck_... key identifier (legacy key format).
Route Matrix
| Method | Path | Purpose | Key Params |
|---|---|---|---|
| GET | /rest-api/keys | List API keys | page, per_page |
| POST | /rest-api/add-key | Create a new API key | active (bool), permissions (read, write, delete combos), optional description |
| PUT, PATCH | /rest-api/edit-key/{key_identifier} | Edit key properties | key_identifier, optional active, permissions, description |
| DELETE | /rest-api/delete-key/{key_identifier} | Delete an API key | key_identifier |