{"name":"MOJAQ API","version":"1.0.0","base_url":"https://api.mojaq.com","dashboard_url":"https://mojaq.com/app","status":"beta","authentication":{"dashboard":{"type":"Bearer JWT","header":"Authorization: Bearer <token>","obtain":"POST /auth/login with { email, password }"},"api_gateway":{"type":"API Key","header":"X-API-Key: mq_...","obtain":"Create in dashboard at /app/api-keys"}},"endpoints":{"auth":{"POST /auth/register":{"body":"{ email, password, name }","returns":"{ access_token, refresh_token }"},"POST /auth/login":{"body":"{ email, password }","returns":"{ access_token, refresh_token }"},"POST /auth/refresh":{"body":"{ refresh_token }","returns":"{ access_token, refresh_token }"},"POST /auth/forgot-password":{"body":"{ email }","returns":"{ message }"},"POST /auth/reset-password":{"body":"{ token, password }","returns":"{ message }"},"POST /auth/verify-email":{"body":"{ token }","returns":"{ message }"},"GET /auth/me":{"auth":"Bearer JWT","returns":"{ user, org }"}},"analytics":{"GET /v1/analytics/sites":{"auth":"X-API-Key","returns":"{ sites: [...] }"},"POST /v1/analytics/sites":{"auth":"X-API-Key","body":"{ domain, timezone? }","returns":"{ site }"},"DELETE /v1/analytics/sites/:domain":{"auth":"X-API-Key","returns":"{ deleted: true }"},"GET /v1/analytics/stats/:domain":{"auth":"X-API-Key","returns":"{ domain, period, pageviews }"},"GET /v1/analytics/embed/:domain":{"auth":"X-API-Key","returns":"{ embed_url }"}},"render":{"POST /v1/render/chromium/convert/html":{"auth":"X-API-Key","body":"multipart/form-data (HTML file)","returns":"PDF binary"},"POST /v1/render/chromium/convert/url":{"auth":"X-API-Key","body":"multipart/form-data (url field)","returns":"PDF/Screenshot binary"}},"monitors":{"GET /v1/monitors":{"auth":"X-API-Key","returns":"{ monitors: [...] }"},"POST /v1/monitors":{"auth":"X-API-Key","body":"{ name, url, type?, interval? }","returns":"{ monitor }"},"DELETE /v1/monitors/:id":{"auth":"X-API-Key","returns":"{ deleted: true }"},"POST /v1/monitors/:id/pause":{"auth":"X-API-Key","returns":"{ paused: true }"},"POST /v1/monitors/:id/resume":{"auth":"X-API-Key","returns":"{ resumed: true }"}},"errors":{"GET /v1/errors/projects":{"auth":"X-API-Key","returns":"{ projects, provisioned }"},"POST /v1/errors/projects":{"auth":"X-API-Key","body":"{ name }","returns":"{ project, dsn }"},"GET /v1/errors/dsn":{"auth":"X-API-Key","returns":"{ dsn, provisioned }"},"GET /v1/errors/events":{"auth":"X-API-Key","returns":"{ events, provisioned }"}},"billing":{"GET /billing/plans":{"auth":"Bearer JWT","returns":"{ plans }"},"GET /billing/subscription":{"auth":"Bearer JWT","returns":"{ plan, status, trial_ends_at }"}},"reports":{"POST /dashboard/report":{"auth":"Bearer JWT","returns":"PDF binary (application/pdf)","desc":"Generate a monthly platform report as PDF"},"GET /dashboard/report/preview":{"auth":"Bearer JWT","returns":"HTML report preview"}},"webhooks":{"GET /alerts/webhooks":{"auth":"Bearer JWT","returns":"{ channels: [...] }"},"POST /alerts/webhooks":{"auth":"Bearer JWT","body":"{ name, type: slack|discord|generic, url, events? }","returns":"{ id }"},"POST /alerts/webhooks/:id/test":{"auth":"Bearer JWT","returns":"{ success, message }"},"PUT /alerts/webhooks/:id":{"auth":"Bearer JWT","body":"{ name?, url?, active?, events? }","returns":"{ message }"},"DELETE /alerts/webhooks/:id":{"auth":"Bearer JWT","returns":"{ message }"}},"deploys":{"POST /v1/deploys":{"auth":"X-API-Key","body":"{ version, environment?, description?, commit_sha?, commit_url?, deployed_by?, deployed_at?, metadata? }","returns":"{ deploy }"},"GET /v1/deploys":{"auth":"X-API-Key","query":"environment?, from?, to?, limit?, offset?","returns":"{ deploys, count }"},"GET /v1/deploys/:id":{"auth":"X-API-Key","returns":"{ deploy }"},"DELETE /v1/deploys/:id":{"auth":"X-API-Key","returns":"{ ok }"}},"error_resolution":{"GET /v1/errors/suggest":{"auth":"X-API-Key","query":"limit?","returns":"{ suggestions with deploy_context }","desc":"AI-powered error analysis with deploy regression correlation"},"POST /v1/errors/analyze":{"auth":"X-API-Key","body":"{ error_type, error_message, stack_trace? }","returns":"{ analysis, deploy_context }"}},"scheduled_reports":{"GET /dashboard/reports/schedule":{"auth":"Bearer JWT","returns":"{ configured, schedule }"},"PUT /dashboard/reports/schedule":{"auth":"Bearer JWT","body":"{ frequency, recipients, day_of_week?, day_of_month?, hour_utc?, enabled? }","returns":"{ ok, next_run_at }"},"DELETE /dashboard/reports/schedule":{"auth":"Bearer JWT","returns":"{ ok }"},"POST /dashboard/reports/schedule/test":{"auth":"Bearer JWT","body":"{ email? }","returns":"{ ok, message }","desc":"Rate limited: 5/hour/org"}},"realtime":{"GET /dashboard/events/stream":{"auth":"JWT via ?token=","returns":"text/event-stream (SSE)","desc":"Real-time: monitor_status, deploy, notification, usage_update, incident, error_spike"}},"api_analytics":{"GET /dashboard/analytics/api":{"auth":"Bearer JWT","query":"period=1h|6h|24h|7d|30d","returns":"{ summary, latency, top_endpoints, status_distribution, time_series }"}},"incidents":{"GET /incidents":{"auth":"Bearer JWT","returns":"{ incidents: [...] }"},"GET /incidents/:id":{"auth":"Bearer JWT","returns":"{ incident }"},"POST /incidents/:id/report":{"auth":"Bearer JWT","returns":"PDF binary (incident post-mortem)"},"GET /incidents/:id/report/preview":{"auth":"Bearer JWT","returns":"HTML preview of incident report"}},"notifications":{"GET /notifications":{"auth":"Bearer JWT","returns":"{ notifications: [...], unread_count }"},"POST /notifications/:id/read":{"auth":"Bearer JWT","returns":"{ read: true }"},"POST /notifications/read-all":{"auth":"Bearer JWT","returns":"{ count }"}},"status":{"GET /health":{"auth":"none","returns":"{ status: ok, timestamp }"},"GET /status/public":{"auth":"none","returns":"{ status, services: [...], uptime_sla, location }"}},"changelog":{"GET /changelog":{"auth":"none","returns":"{ changelog: [...], latest }"},"GET /changelog/latest":{"auth":"none","returns":"{ version, date, title, entries }"}}},"rate_limits":{"trial":"300 requests/minute","free":"30 requests/minute","solo":"120 requests/minute","startup":"300 requests/minute","team":"1000 requests/minute"},"quick_start":["0. Quick start: npx mojaq init (interactive setup wizard)","1. Register at https://mojaq.com/app/register","2. Create an API key in the dashboard","3. Use the API key in the X-API-Key header","4. Example: curl -H \"X-API-Key: mq_...\" https://api.mojaq.com/v1/monitors"]}