> ## Documentation Index
> Fetch the complete documentation index at: https://docs.neoagent.io/llms.txt
> Use this file to discover all available pages before exploring further.

# MainWP API

> Find a client's WordPress site in your MainWP Dashboard by its URL or name, read its versions, pending updates and sync status, and manage it

The common use is a WordPress ticket: the agent finds the client's site in MainWP by the URL or site name in the ticket, reads its WordPress and PHP versions, connection status, last sync and pending updates, and adds an internal note with what it found and the site's `wp-admin` link.

> [!NOTE]
>
> Automatically enabled when you configure MainWP permissions in your agent workflow.

## What It Does

* Find a client's site by URL or name, and read its versions, connection status, last sync, sync errors and Site Health
* List a site's pending core, plugin, theme and translation updates, and ignored updates
* Read plugins and themes, abandoned ones, security checks, changes made outside MainWP, uptime and incidents
* Sync a site, run its updates, and activate, deactivate or delete plugins and themes, with the access you give it
* Read and manage clients, tags, posts, pages, comments, WordPress users, costs and time tracking
* Read and change Dashboard settings

## Permission Groups

| Group | Covers |
| - | - |
| Sites | Sites with their versions, connection and sync status, health, security checks, changes made outside MainWP; sync, check, reconnect, edit, suspend, add, remove |
| Plugins and Themes | A site's plugins and themes, abandoned ones; activate, deactivate, delete |
| Updates | Pending and ignored core, plugin, theme and translation updates; run and ignore them |
| Clients and Tags | Clients, client fields, a client's sites and costs, tags |
| Posts, Pages and Comments | Posts, pages and comments on your sites |
| WordPress Users | Users on your sites and their roles |
| Monitoring and Reports | Uptime monitors, heartbeats and incidents, SSL and domain checks, Lighthouse audits, Pro Reports data |
| Costs and Time Tracking | Cost Tracker records, Time Tracker tasks, buckets and timers |
| Dashboard Settings | Dashboard settings, maintenance tools, API keys, the global batch |

## Access Profiles

| Profile | What runs on its own | What asks a technician |
| - | - | - |
| **Read Only** | Every read | No write is allowed |
| **Helpdesk** | Every read | Every change to sites, plugins and themes, updates, content and monitors. Other writes are off |
| **IT Admin** | Every read and most changes | Plugin and theme changes, WordPress users and Dashboard settings |
| **Full Automation** | Every read and write | Only the writes that always ask |

## Safety Controls

| Control | Behavior |
| - | - |
| **Calls** | Neo sends each operation of the MainWP REST API v2 with its own method, and refuses creating an API key and the CSV user import |
| **Ticket scope** | On a ticket, the agent reaches only the MainWP client mapped to the ticket's company and that client's sites. Lists across every client, and Dashboard settings and changes, are for runs with no ticket company, such as a chat |
| **Sites** | Before a call that names a site, Neo reads from MainWP that the site is assigned to the client the call names. On a ticket, a site edit cannot move the site to a client the ticket's company is not mapped to |
| **Secrets** | Neo removes a child site's keys and Unique Security ID, HTTP authentication logins, backup provider and Cloudflare keys, and API key secrets from every answer |
| **Failed actions** | An answer with `success: 0` is a failure, even when MainWP sends it with HTTP 200 |
| **Always ask** | Removing a site or a client, a batch that can delete them, running every update on every site, disconnecting every site, signing every user out, clearing add-on activations, creating or editing a WordPress user, setting the administrator password, and changing or deleting an API key always ask a technician |
| **Replays** | A write is never resent after a timeout, so an update or a new site never runs twice |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.