API Reference
HQ provides a scoped Sanctum API for partners and integrations.
Authentication
All API endpoints require a Bearer token issued via the Hub admin or CLI:
php artisan hub:api-token "Partner A" --scopes=node:read report:read --expires=90
Include the token in the Authorization header:
Authorization: Bearer 1|abc123...
Scopes
| Scope | Endpoints |
|---|---|
node:read | List and view nodes |
node:write | Update node settings |
report:read | View posts, tasks, logs |
report:write | Submit status reports |
content:generate | Trigger AI content generation |
content:publish | Trigger node publishing |
Endpoints
Health
GET /api/ping
Returns {"status": "ok"}. No auth required.
Nodes
GET /api/v1/nodes # List nodes
GET /api/v1/nodes/{id} # Show node
PATCH /api/v1/nodes/{id} # Update node
Posts
GET /api/v1/posts # List posts
GET /api/v1/posts/{id} # Show post
Content Operations
POST /api/v1/content/generate # Trigger AI generation
POST /api/v1/content/publish # Trigger node publish
Generate Content
{
"title": "Article Title",
"website_id": 1,
"topic": "Optional topic angle",
"inline_image_count": 2,
"publish_at": "2026-08-15T10:00:00Z"
}
Publish to Node
{
"post_id": 42,
"publish_at": "2026-08-15T10:00:00Z" // optional
}
Reports
GET /api/v1/scheduled-tasks # List tasks
POST /api/v1/status-reports # Submit node status
Billing
GET /api/v1/billing/limits # Current plan limits + usage
Pagination
List endpoints support pagination:
GET /api/v1/posts?page=2&per_page=25
Response includes data, links, and meta with pagination info.
Rate Limits
API rate limits are determined by your subscription plan. Free: 60 req/min, Pro: 300 req/min, Agency: 1000 req/min.
Error Format
{
"message": "The given data was invalid.",
"errors": {
"title": ["The title field is required."]
}
}