FleetWP Docs
Developers

REST API

HTTP endpoints under /api/v1 for sites, backups, actions, and activity.

All endpoints are relative to ${FLEETWP_URL}/api/v1 and require a Bearer token (see Authentication). Responses are JSON.

Sites

List sites

GET /api/v1/sites

Returns every site in the workspace.

Get a site

GET /api/v1/sites/{id}

Backups

List a site's backups

GET /api/v1/sites/{id}/backups

Each backup includes id, type, status, size_bytes, created_at, completed_at, and error.

Create a backup

POST /api/v1/sites/{id}/backups
Content-Type: application/json

{ "type": "full" }

type is one of full (default), db, or files. Requires the write scope.

Actions

Run a command against a site.

POST /api/v1/sites/{id}/actions
Content-Type: application/json

{ "action": "update", "plugins": ["akismet", "woocommerce"] }
actionEffectScope
pingSigned liveness check of the connectorread
updateApply updates (optionally limited to plugins[])write
loginReturn a one-click admin login URLwrite

Activity

GET /api/v1/activity?limit=50

Returns recent workspace activity. limit defaults to 50 (capped).

Errors

StatusMeaning
400Invalid payload
401Missing or invalid token
403Token lacks the required scope
404Site not found in this workspace

Example

# Trigger a database backup, then poll the backups list
curl -s -X POST "$FLEETWP_URL/api/v1/sites/$SITE/backups" \
  -H "Authorization: Bearer $FLEETWP_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"type":"db"}'

curl -s "$FLEETWP_URL/api/v1/sites/$SITE/backups" \
  -H "Authorization: Bearer $FLEETWP_TOKEN"

On this page