API Overview
The PackEdge API is built on Hono running on Cloudflare Workers.
Base URL
https://api.packedge.devAPI 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 Code | Meaning |
|---|---|
400 | Bad request — invalid or missing parameters |
401 | Unauthorized — missing or invalid session |
403 | Forbidden — insufficient permissions |
404 | Not found |
500 | Internal server error |
Pagination
List endpoints support pagination via query parameters:
| Parameter | Default | Description |
|---|---|---|
page | 1 | Page number |
per_page | 20 | Items per page |
Filtering
Most list endpoints support filtering:
| Parameter | Description |
|---|---|
search | Full-text search |
status | Filter by status |
product_id | Filter 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.
