Worker service health check.
Response:
{
"status": "healthy",
"uptime": 3600,
"queues": { "comments": true, "dms": true, "content": true, "reports": true }
}Per-tenant health check (DB, Redis, token validity, rate limits).
Response:
{
"status": "healthy",
"checks": { "db": true, "redis": true, "token_valid": true, "rate_limit_ok": true }
}Daily LLM cost for a tenant.
Response:
{
"total_usd": 2.34,
"by_model": { "kimi-k2.5": 0.80, "claude-opus-4.6": 1.54 },
"budget_remaining": 2.66
}List all tenants.
Create a new tenant.
Body:
{
"name": "Client Name",
"ig_handle": "clienthandle",
"ig_access_token": "token...",
"ig_user_id": "12345",
"brand_voice": "Warm and professional",
"no_go_topics": ["politics", "religion"],
"status": "active"
}Get tenant details.
Update tenant.
Soft-delete tenant (sets status to 'inactive').
Meta webhook verification (challenge-response).
Query params: hub.mode, hub.verify_token, hub.challenge
Receive Instagram webhook events. Validates x-hub-signature-256, routes comments to comment queue and DMs to DM queue.
Dashboard + infrastructure health.
Response:
{
"status": "healthy",
"services": { "database": "connected", "redis": "connected", "worker": "healthy" }
}{
"tenantId": "uuid",
"ig_comment_id": "string",
"author_name": "string",
"text": "string",
"post_id": "string (optional)"
}{
"tenantId": "uuid",
"ig_sender_id": "string",
"sender_name": "string",
"message_text": "string"
}{
"tenantId": "uuid",
"type": "generate_caption | schedule_post | generate_calendar",
"topic": "string",
"image_url": "string (optional)",
"post_id": "string (for schedule_post)",
"days": "number (for generate_calendar)"
}{
"tenantId": "uuid",
"type": "daily_briefing | weekly_report | monthly_review | competitor_pulse | cost_report"
}