Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.cognerd.in/llms.txt

Use this file to discover all available pages before exploring further.

The CogNerd REST API gives you programmatic access to everything the platform can do — brand analysis, GEO file generation, AI-optimized content creation, and AEO audits. All requests go to a single base URL, use JSON bodies, and follow a consistent response format. You authenticate with a Bearer token obtained at login.

Base URL

All API requests use this base URL in production:
https://api.cognerd.in
Every endpoint path below is relative to this base. For example, the full URL for the login endpoint is https://api.cognerd.in/api/auth/login.
The sandbox and staging environments use different base URLs. Contact support to obtain a non-production base URL if you need one.

Request format

Send all request bodies as JSON and include the Content-Type: application/json header.
curl -X POST https://api.cognerd.in/api/brand-monitor/scrape \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{"url": "https://acme.com"}'

Response format

Successful responses return a JSON object with a 2xx status code. The shape of the body varies by endpoint and is documented on each endpoint’s page. Error responses always follow this structure:
{
  "error": {
    "message": "Human-readable description of the error",
    "code": "ERROR_CODE",
    "statusCode": 401,
    "timestamp": "2024-01-15T10:30:00.000Z"
  }
}
FieldTypeDescription
error.messagestringA plain-English explanation suitable for logging or display
error.codestringA machine-readable error code (see common codes below)
error.statusCodenumberThe HTTP status code
error.timestampstringISO 8601 timestamp of when the error occurred

Common error codes

CodeHTTP statusMeaning
UNAUTHORIZED401Missing or invalid authentication token
FORBIDDEN403Token is valid but you lack permission for this resource
NOT_FOUND404The requested resource does not exist
INVALID_REQUEST400The request body failed validation
INSUFFICIENT_CREDITS402You do not have enough credits to complete this operation
AI_SERVICE_ERROR503The AI service is temporarily unavailable
INTERNAL_ERROR500An unexpected server-side error occurred

Credits

Several API operations consume credits from your account balance. Credits are validated before the operation starts — if your balance is too low, the request is rejected immediately with a 402 status.
OperationCredit cost
Brand analysis (POST /api/brand-monitor/analyze)30 credits
GEO assets generation (POST /api/geo-assets/generate)20 credits
Blog creation (POST /content-studio/create-blog)10–30 credits
AEO report (POST /aeo-reports/generate)50 credits
Check your credit balance in the CogNerd dashboard under Settings → Credits, or retrieve it programmatically via GET /api/auth/me which includes your active plan details.

Quick example

Here is a complete round-trip: authenticate, then fetch your current user profile. Step 1 — log in and get a token
curl -X POST https://api.cognerd.in/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email": "you@example.com", "password": "your-password"}'
{
  "token": "eyJhbGci...",
  "user": {
    "id": "usr_123",
    "email": "you@example.com"
  }
}
Step 2 — use the token in subsequent requests
curl https://api.cognerd.in/api/auth/me \
  -H "Authorization: Bearer eyJhbGci..."
{
  "user": {
    "id": 42,
    "name": "Jane Smith",
    "email": "you@example.com",
    "plan": "monitor"
  }
}

Endpoint groups

Authentication

Manage accounts and session tokens.
MethodPathDescription
POST/api/auth/registerCreate a new account
POST/api/auth/loginLog in and receive a session token
GET/api/auth/meGet the authenticated user’s profile
See the Authentication page for full details and code examples.

Brand Monitor

Scrape brand data and run AI-powered visibility analyses.
MethodPathAuthCredits
POST/api/brand-monitor/scrapeRequired
POST/api/brand-monitor/analyzeRequired30
GET/api/brand-monitor/analysesRequired
POST/api/brand-monitor/analysesRequired
GET/api/brand-monitor/analyses/:idRequired
DELETE/api/brand-monitor/analyses/:idRequired
The analyze endpoint streams results in real time using Server-Sent Events (SSE). See Brand Monitor — Analyze for details.

GEO assets

Generate AI-ready GEO files for your website and manage reports.
MethodPathAuthCredits
POST/api/geo-assets/generateRequired20
GET/api/geo-assets/job/:jobId/statusRequired
GET/api/geo-assets/reportsRequired
GET/api/geo-assets/reports/:jobIdRequired
GET/api/geo-assets/reports/:jobId/downloadRequired
Generation is asynchronous: POST /generate returns a jobId immediately. Poll GET /job/:jobId/status to track progress, then fetch the report when complete. See GEO Assets for the full workflow.

Content Studio

Create AI-optimized blog posts.
MethodPathAuthCredits
POST/content-studio/create-blogRequired10–30
Credit cost depends on the requested content length. See Content Studio — Create Blog.

AEO reports

Run Answer Engine Optimization audits.
MethodPathAuthCredits
POST/aeo-reports/generateRequired50
See AEO Report.