Developer
API Reference
Complete reference for the SEAES REST API. All endpoints require authentication via NextAuth session cookies unless otherwise noted.
Authentication
Session-based: Most endpoints require an authenticated NextAuth session. The session cookie is automatically included by the browser.
Cron Secret: Internal cron endpoints require Authorization: Bearer CRON_SECRET header.
Base URL: https://seaes-seo-platform.vercel.app
Example request:
fetch('/api/clients', {
method: 'GET',
credentials: 'include', // includes session cookie
})
.then(res => res.json())
.then(data => console.log(data));
// Response: { success: true, data: [...] }Clients
2 endpointsGET
/api/clientsList all clients for the authenticated userSessionPOST
/api/clientsCreate a new client (5-step onboarding data)SessionSEO Audits
2 endpointsGET
/api/auditsGet audit history for a clientSessionPOST
/api/auditsTrigger a new SEO audit for a clientSessionRankings
1 endpointGET
/api/rankingsGet keyword rankings for a clientSessionRecommendations
1 endpointGET
/api/recommendationsGet AI-generated recommendations for a clientSessionReports
1 endpointGET
/api/reportsGet generated reports for a clientSessionAlerts
2 endpointsGET
/api/alertsGet alerts for a client (ranking drops, GEO changes, etc.)SessionPATCH
/api/alertsMark alerts as readSessionGEO (Generative Engine Optimization)
6 endpointsGET
/api/geo/scoreGet GEO visibility score and historySessionGET
/api/geo/mentionsGet AI platform mentions with filtersSessionGET
/api/geo/citationsGet citation records from AI platformsSessionGET
/api/geo/competitorsGet share of voice / competitor GEO dataSessionGET
/api/geo/crawlersGet AI bot visit logs and statsSessionPOST
/api/geo/scanManually trigger a GEO scan for a clientSessionAutomation
2 endpointsGET
/api/automation/configGet automation config for a clientSessionPUT
/api/automation/configUpdate automation settings (schedules, toggles)SessionContent Optimization
1 endpointPOST
/api/content/optimizeGenerate AI-optimized meta tags and content suggestionsSessionLegal Documents
1 endpointGET
/api/legalGenerate Privacy Policy and Terms of Service for a clientSessionCron Jobs (Internal)
5 endpointsGET
/api/cron/daily-rankingsDaily ranking check + alert generation (6 AM UTC)Cron SecretGET
/api/cron/weekly-auditsWeekly SEO audit + auto-optimization (Mon 2 AM UTC)Cron SecretGET
/api/cron/weekly-geo-scanWeekly GEO visibility scan (Wed 3 AM UTC)Cron SecretGET
/api/cron/monthly-reportsMonthly report generation + email (1st 8 AM UTC)Cron SecretGET
/api/cron/competitor-scanWeekly competitor audit (Sun 4 AM UTC)Cron SecretRate Limits
API endpoints: 100 requests per minute per authenticated user
GEO scan trigger: 1 scan per client per hour
Audit trigger: 1 audit per client per 30 minutes
Content optimization: 10 requests per hour per client
Response Format
All API responses follow a consistent format:
// Success
{
"success": true,
"data": { ... }
}
// Error
{
"success": false,
"error": "Error message description"
}
// Paginated responses include:
{
"success": true,
"data": [...],
"total": 42,
"page": 1,
"limit": 20
}