API & Integrations

API Reference

Complete REST API reference for AI SEO Agents. Authentication, endpoints, request/response schemas, and rate limits.

Last updated: February 26, 2026

The AI SEO Agents API is a REST API hosted at https://api.aiagentssee.com/v1/. All endpoints require authentication via Cognito JWT or API key. Responses are JSON-encoded.

Platform settings page showing API configuration options
Configure API keys and integration settings from the platform settings

Authentication

The API supports two authentication methods. Include one of the following headers with every request:

MethodHeaderFormat
Cognito JWTAuthorizationBearer <id_token>
API KeyX-API-Keysak_<key_string>

API keys can be created and managed in Settings → API Keys. Each key is hashed with SHA-256 before storage — the raw key is shown only once at creation time.

Base URL

https://api.aiagentssee.com/v1/dashboard

Endpoints

Agents

MethodPathDescription
GET/agentsList all agents. Optional: ?status=active|paused
POST/agentsCreate a new agent (name, keywords, tone, word_target)
GET/agents/{id}Get a single agent by ID
PUT/agents/{id}Update agent fields (name, keywords, tone, status)
DELETE/agents/{id}Soft-delete an agent (sets status to "deleted")

Jobs

MethodPathDescription
POST/jobsTrigger a new job (create, enhance, optimize, publish)
GET/jobsList jobs. Optional: ?agent_id=&status=
GET/jobs/{id}/progressGet live progress events. Optional: ?since=timestamp

Articles

MethodPathDescription
GET/articlesList S3 articles with word counts and SEO scores
GET/preview?s3_key=...HTML preview of an S3 article

Sites

MethodPathDescription
POST/sitesRegister a new WordPress site
GET/sitesList connected sites
PUT/sites/{id}Update site configuration
DELETE/sites/{id}Remove a connected site
POST/sites/{id}/verifyTest site connectivity

Other

MethodPathDescription
GET/statsDashboard statistics (active agents, total articles, avg score)
GET/chart-dataChart data for activity and category visualizations
GET/healthHealth check (no auth required). Returns 200 OK.

Creating a Job — Example

curl -X POST https://api.aiagentssee.com/v1/dashboard/jobs \
  -H "Authorization: Bearer <id_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "agent-a1b2c3d4",
    "job_type": "create",
    "keyword": "best trade show booths 2026"
  }'

Response:

{
  "job_id": "content-a1b2c3d4",
  "status": "pending",
  "keyword": "best trade show booths 2026",
  "agent_id": "agent-a1b2c3d4",
  "created_at": "2026-02-26T10:30:00Z"
}

Rate Limits

PlanRequests/MinuteConcurrent Jobs
Starter602
Professional1205
Agency30015
EnterpriseCustomCustom

Rate-limited requests return 429 Too Many Requests with a Retry-After header. Implement exponential backoff in your client.

Error Handling

The API uses standard HTTP status codes to indicate the success or failure of requests. Error responses include a JSON body with a message field describing the problem and, where applicable, a code field with a machine-readable error identifier. Your client application should handle these error categories gracefully to provide a reliable integration.

Status CodeMeaningCommon CausesRecommended Action
400Bad RequestMissing required fields, invalid JSON, invalid parameter valuesCheck request body against the endpoint schema. Validate inputs before sending.
401UnauthorizedMissing or expired JWT token, invalid API keyRefresh the JWT token or verify the API key is correct and active.
403ForbiddenValid authentication but insufficient permissions for the requested resourceCheck that the authenticated user owns the requested agent, job, or site.
404Not FoundInvalid endpoint path, non-existent resource IDVerify the URL and resource ID. Check that the resource has not been deleted.
409ConflictDuplicate resource creation, status transition conflictThe operation conflicts with the current resource state. Read the resource and retry.
429Too Many RequestsRate limit exceededWait for the duration specified in the Retry-After header before retrying.
500Internal Server ErrorUnexpected server-side errorRetry with exponential backoff. If persistent, contact support.
// Example error response
{
  "message": "Agent not found: agent-xyz12345",
  "code": "RESOURCE_NOT_FOUND",
  "request_id": "req-a1b2c3d4-5678-90ab-cdef"
}

Always log the request_id from error responses. When contacting support, include this ID to help us quickly locate the specific request in our logs and diagnose the issue.

Pagination

List endpoints that return multiple items support cursor-based pagination. This is more efficient than offset-based pagination for large datasets because it avoids the performance degradation that occurs when skipping many records. Pagination parameters are passed as query string parameters and pagination metadata is returned in the response body.

ParameterTypeDefaultDescription
limitinteger25Maximum number of items to return per page (max: 100)
cursorstringnullOpaque cursor from the previous response to fetch the next page
sortstringcreated_at:descSort field and direction (e.g., created_at:asc, score:desc)
# First page
curl "https://api.aiagentssee.com/v1/dashboard/articles?limit=10" \
  -H "Authorization: Bearer <id_token>"

# Next page (using cursor from previous response)
curl "https://api.aiagentssee.com/v1/dashboard/articles?limit=10&cursor=eyJzayI6IjIwMjYtMDItMjUifQ" \
  -H "Authorization: Bearer <id_token>"

The response includes a next_cursor field when more results are available. When next_cursor is null, you have reached the end of the result set. Cursors are opaque strings that encode the position in the dataset — do not attempt to decode or construct them manually.

Webhook Callbacks

Instead of polling the API for job status updates, you can configure webhook callbacks to receive push notifications when events occur. Webhooks are the recommended approach for production integrations because they reduce API calls, provide lower latency, and eliminate the complexity of managing polling loops. See the dedicated Webhook Setup guide for complete configuration instructions.

  • Job completion: Triggered when a content, publish, or audit job reaches a terminal state (completed or failed). The payload includes the job ID, final status, result summary, and the S3 key for generated artifacts.
  • Article published: Triggered when an article is successfully published to WordPress. The payload includes the WordPress post ID, URL, publish status, and the SEO score at time of publication.
  • Rank alert: Triggered when a keyword ranking change exceeds your configured threshold. The payload includes the keyword, old position, new position, and the page URL that ranks.
  • Audit complete: Triggered when a site-wide audit finishes. The payload includes the overall site score, number of issues found by severity, and a presigned URL for the full report.

Code Examples for Common Operations

The following examples demonstrate the most common API operations. All examples use curl for clarity, but the API works with any HTTP client. Replace <id_token> with your Cognito JWT or use -H "X-API-Key: sak_your_key" for API key authentication.

Create an Agent

curl -X POST https://api.aiagentssee.com/v1/dashboard/agents \
  -H "Authorization: Bearer <id_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Trade Show Content Agent",
    "keywords": ["trade show booth cost", "custom trade show booth"],
    "tone": "professional",
    "word_target": 2500,
    "schedule": "weekly"
  }'

List Articles with Filtering

# List articles for a specific agent, sorted by SEO score
curl "https://api.aiagentssee.com/v1/dashboard/articles?agent_id=agent-a1b2c3d4&sort=score:desc&limit=20" \
  -H "X-API-Key: sak_your_api_key"

Poll Job Progress

# Get progress events since a specific timestamp
curl "https://api.aiagentssee.com/v1/dashboard/jobs/content-a1b2c3d4/progress?since=2026-02-26T10:30:00Z" \
  -H "Authorization: Bearer <id_token>"

Trigger a Publish Job

curl -X POST https://api.aiagentssee.com/v1/dashboard/jobs \
  -H "Authorization: Bearer <id_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "agent-a1b2c3d4",
    "job_type": "publish",
    "s3_key": "articles/agent-a1b2c3d4/trade-show-booth-cost.md",
    "publish_action": "elementor_publish",
    "status_on_publish": "draft"
  }'

For WebSocket-based real-time progress tracking (recommended for interactive applications), connect to wss://ws.aiagentssee.com/v1?token=<id_token> and send a subscribe message with the job ID. See the workflow documentation for details on the WebSocket protocol and event format.

CORS and Browser Requests

The API supports CORS (Cross-Origin Resource Sharing) for browser-based integrations. Allowed origins include your configured custom domains and localhost for development. All endpoints return appropriate CORS headers including Access-Control-Allow-Origin, Access-Control-Allow-Headers, and Access-Control-Allow-Methods. Preflight OPTIONS requests are handled automatically by the API Gateway.

Never expose your API key in client-side JavaScript code. For browser-based applications, use Cognito JWT authentication, which provides short-lived tokens that can be safely included in frontend code. API keys are intended for server-to-server integrations where the key can be stored securely as an environment variable.

Related Documentation

About AI SEO Agents: Built on AWS with Claude AI, our platform processes 10,000+ automated SEO fixes monthly across 500+ sites. Every recommendation follows Google's latest Search Quality Evaluator Guidelines and is validated by automated Lighthouse audits before deployment.

Need Help?

Our team provides onboarding support for all plans. Get personalized help setting up your agents.