API Reference

PECS Global REST API

Base URL: https://api.pecsglobal.uk/wp-json/pecsglobal

API Access Tier — £29/month · 10,000 requests/month · JWT authentication

Get API Key →
Authentication

All API requests require your PECS Global licence key passed as the X-API-Key header. Obtain your key from the portal dashboard after subscribing.

curl -X GET \
  "https://api.pecsglobal.uk/wp-json/pecsglobal/v1/catalog" \
  -H "X-API-Key: YOUR_LICENCE_KEY" \
  -H "X-Domain: yoursite.com"

The X-Domain header should be your registered site domain. Required for domain-restricted plans.

Error Codes
CodeHTTPMeaning
E100401Missing or invalid API key
E101403Domain not authorised on this licence
E102403Plugin not in your plan's allowed list
E103429Rate limit exceeded — wait and retry
E104404Plugin slug not found in catalogue
E105402Subscription expired or inactive
E106403Fair use policy violation — contact support
E107404Plugin not yet in local vault
Rate Limits

API Access Tier: 10,000 requests/month. Rate limited at 100 req/minute. A Retry-After header is returned when you hit the limit.

{
  "error_code": "E103",
  "message": "Rate limit exceeded.",
  "retry_after": 60
}
Catalogue
GET/v1/catalog
Returns the full plugin and theme catalogue available on your plan.
Query params: page, per_page (max 100), category
{
  "success": true,
  "plugins": [
    {
      "slug": "elementor-pro",
      "name": "Elementor Pro",
      "version": "3.21.0",
      "category": "Page Builder",
      "image": "https://..."
    }
  ],
  "total": 923,
  "source": "vault"
}
Download Info
GET/v1/download-info/{slug}
Returns a signed, time-limited download URL for the specified plugin ZIP. URL expires in 15 minutes.
GET /v1/download-info/elementor-pro
X-API-Key: YOUR_KEY
X-Domain: yoursite.com

{
  "success": true,
  "download_url": "https://api.pecsglobal.uk/wp-json/pecsglobal/v1/dl?t=...&e=...&h=...",
  "version": "3.21.0",
  "source": "vault"
}
Check Versions
POST/v1/check-versions
Submit a list of installed plugins with their current versions. Returns only those with newer versions available. Used by WPAU for update detection.
POST /v1/check-versions
Content-Type: application/json

[
  {"slug": "elementor-pro", "version": "3.19.0", "type": "plugin"},
  {"slug": "wp-rocket",     "version": "3.14.0", "type": "plugin"}
]

Response:
{
  "plugins": [
    {
      "slug": "elementor-pro",
      "version": "3.21.0",
      "download_url": "https://..."
    }
  ],
  "source": "vault"
}
Account Info
GET/v1/account-info
Returns your plan details, domain limit, allowed slugs, and subscription status.
{
  "plan_key":     "unlimited_monthly",
  "plan_name":    "Unlimited",
  "domain_limit": 999,
  "expires_at":   null,
  "status":       "active"
}
Mobile API

JWT-authenticated endpoints for the PlugBase mobile app. Base: https://api.pecsglobal.uk/wp-json/pecsglobal/mobile/v1. Access token valid 1 hour, refresh token 30 days.

POST/mobile/v1/auth/licence
Authenticate with a PECS Global licence key. Returns access + refresh tokens.
GET/mobile/v1/catalogue
Browse the full catalogue. Params: q, category, page, per_page.
GET/mobile/v1/sites/{id}/updates
Get pending updates for a connected WordPress site.

Full mobile API reference: 22 endpoints covering auth, sites, catalogue, billing, free plan, and notifications. Contact support@pecsglobal.uk for the full OpenAPI spec.