Skip to content

API Overview

The PackEdge API is built on Hono running on Cloudflare Workers.

Base URL

https://api.packedge.dev

API Zones

Management API — /api/*

Authenticated endpoints for managing your products, licenses, customers, and settings. Requires a valid session cookie.

Edge API — /v1/*

Public, high-performance endpoints for license validation, activation, and WordPress update checks. No authentication required. Cached at the edge via Cloudflare KV.

Request Format

All request bodies use JSON:

bash
curl -X POST https://api.packedge.dev/api/products \
  -H "Content-Type: application/json" \
  -H "Cookie: session=YOUR_SESSION_TOKEN" \
  -d '{"name": "My Plugin", "productType": "plugin"}'

Response Format

All responses return JSON:

json
{
  "items": [...],
  "pagination": {
    "page": 1,
    "perPage": 20,
    "total": 50,
    "totalPages": 3
  }
}

Error Responses

Errors return a JSON object with an error field:

json
{
  "error": "Not found"
}
Status CodeMeaning
400Bad request — invalid or missing parameters
401Unauthorized — missing or invalid session
403Forbidden — insufficient permissions
404Not found
500Internal server error

Pagination

List endpoints support pagination via query parameters:

ParameterDefaultDescription
page1Page number
per_page20Items per page

Filtering

Most list endpoints support filtering:

ParameterDescription
searchFull-text search
statusFilter by status
product_idFilter by product

Rate Limits

The API runs on Cloudflare Workers and is subject to Cloudflare's standard rate limits. Edge endpoints (/v1/*) use KV caching to minimize database reads.