ReferenceUpdated: 2026-11-03

REST API v1: API keys, authentication and endpoints

How to create an API key, send the Authorization header, the request limits, and every v1 endpoint, with parameters, the response envelope and error codes.

Open this screen in the panel

The REST API v1 lets you do most of what you do in the panel from code: list sites, start crawls, pull issues, open AI fixes, and manage Pixel rules, keywords, content, backlinks, outreach, competitors and social posts. Keys belong to an organization; a key only sees its own organization's data. The MCP server calls the same endpoints.

Prerequisites

  • Only the organization's owner or an admin can create and revoke keys. Other roles don't see the API keys tab.
  • API access is included in the Pro and Agency plans. If your plan doesn't include it, the tab shows a notice with a See plans link; you may still be able to create a key, but requests return 403 plan_required.

Creating an API key

  1. Open Settings → Profile → API keys.
  2. In Key name, describe where the key will be used (at least 2 characters, e.g. "CI").
  3. If the key needs to start crawls or create fixes, rules, keywords or content, tick write scope. Leave it unticked for a read-only key.
  4. Click Create key.
  5. Copy the key that starts with sa_live_ right away with Copy key. It is never shown again; the list only keeps its Prefix.
warning

An organization can have at most 20 active keys. If a key leaks, revoke it immediately with the trash icon (Revoke) in the list. Requests using a revoked key get 401 straight away.

Connections that AI apps set up with OAuth don't appear in this list; they are in the Connected assistants list on the Connect your AI assistant page.

Authentication and base URL

  • Base URL: https://seoasist.com/api/v1
  • Header: Authorization: Bearer sa_live_…
  • The key is accepted in the Authorization header only; an ?api_key= query parameter is not supported (keys in URLs end up in logs).

Scopes: a read key can call every GET endpoint. The write scope unlocks POST, PATCH and DELETE requests. A write request with a read-only key returns 403.

Limits: at most 240 requests per minute per organization, and at most 30 AI fixes per hour (POST /sites/{id}/fixes). Above that you get 429 rate_limited.

curl -H "Authorization: Bearer sa_live_..." \
  https://seoasist.com/api/v1/sites

Response envelope

Every successful JSON response looks like this:

{ "ok": true, "data": {}, "ms": 42 }

data holds the endpoint's result and ms is the request time in milliseconds. The one exception is llms.txt, which returns plain text (text/plain). Errors return { "ok": false, "error": "<code>", "message": "…" }.

Endpoints

All paths are relative to the base URL. {id} is a site ID, which you get from GET /sites.

Account and sites

MethodPathScopeWhat it does
GET/mereadThe key's organization and scopes: orgId, scopes
GET/sitesreadLists sites: id, name, domain, url, healthScore, lastCrawlAt, gscProperty, ga4PropertyId, repo, pixelKey … and the Search Console position movement (movement)
GET/sites/{id}readSite fields + lastCrawl (id, pages, finishedAt), issueTotals, issue groups (code, severity, title, count), code repos (repos), fix channels (fixChannels) and rising / falling queries
GET/sites/{id}/data-sourcesreadThe active data source and its state for each data type
POST/sites/{id}/crawlwriteStarts a crawl; returns { crawlId, status: "queued" }. 402 limit_reached when the monthly page quota is used up

Issues, fixes and rules

MethodPathScopeWhat it does
GET/sites/{id}/issuesreadGrouped issues (totals, groups). With ?code= you get that group and sample urls; ?limit= defaults to 200, max 1000
POST/sites/{id}/issues/{code}/rule-fixwriteFixes one issue code on every affected URL with rules (needs the Site API, WordPress plugin or Pixel)
POST/sites/{id}/fixeswriteOpens an AI fix (PR / MR job). Body: issueCode or instructions (one is required), optional repo and model. Returns { jobId, status: "queued" }
GET/sites/{id}/fixesreadThe last 50 fix jobs: status, model, repo, prUrl, summary, error …
GET/sites/{id}/pixel/rulesreadRules
POST/sites/{id}/pixel/ruleswriteAdds a rule. Body: kind, matchType (default exact), matchPath (default /), payload, optional note
DELETE/sites/{id}/pixel/rules/{ruleId}writeDeletes the rule; { deleted: true }

Keywords and content

MethodPathScopeWhat it does
GET/sites/{id}/keywordsreadavgPosition, buckets and keywords (position, prevPosition, change, best, url, volume, kd, intent, aiOverview, aiCited …) plus Search Console movers
POST/sites/{id}/keywordswriteBody: { keywords: string[] } (max 200 per request). Returns { added }; keywords already tracked are skipped
GET/sites/{id}/keywords/opportunitiesreadThe keyword pool with an opportunity score (0–100) and action (new / strengthen); ?limit= defaults to 50, max 300
POST/sites/{id}/keywords/ideaswriteBody: { keywords: string[], note? } (2–60 keywords). Clusters the keywords and creates blog ideas with status idea
GET/sites/{id}/contentreadThe last 100 content items; filter with ?status=
POST/sites/{id}/contentwriteCreates a blog idea. Body: title (required), targetKeywords?, angle?, generate? (true queues the writing)
GET/sites/{id}/content/{itemId}readOne content item with all its fields (including HTML)
PATCH/sites/{id}/content/{itemId}writeEdits a blog post that isn't live: title, html, faq, metaTitle, metaDescription, excerpt, slug, targetKeywords. An approved or scheduled post goes back to review. Page rewrites and live posts return 422 / 409 not_editable
POST/sites/{id}/content/{itemId}/approvewriteApproves it. With scheduledFor (YYYY-MM-DD) the status becomes scheduled; scheduling must pass the auto-publish checks
POST/sites/{id}/content/{itemId}/publishwriteQueues a publish job. Body: channel (wordpress, github, siteapi, manual), live?. A live publish must pass the auto-publish checks; page rewrites can't be published live
GET / POST/sites/{id}/content/{itemId}/briefread / writeThe stored research brief / a new brief (keyword, urls?); uses the monthly brief quota
POST/sites/{id}/scorereadScores article HTML 0–100 (html, itemId?, keyword?, title?, metaDescription?)
POST/sites/{id}/articleswriteSends an article your own AI wrote to review (HTML sanitized, max 300 KB, not counted against the monthly content quota)
GET/sites/{id}/brandreadBrand profile: tone, audience, forbidden words, author
MethodPathScopeWhat it does
GET/sites/{id}/backlinksreadBacklink profile: summary, trend, top domains and anchors
GET/sites/{id}/backlinks/linksreadIndividual backlinks; ?status= (active, new, lost, toxic, broken), ?limit= defaults to 200, max 1000
POST/sites/{id}/backlinks/opportunitieswriteDomains linking to competitors but not to the site; spends DataForSEO credits
GET / POST/sites/{id}/outreachread / writeOutreach entries / a new prospect (domain, url?, contactName?, contactEmail?, notes?, rank?)
PATCH/sites/{id}/outreach/{outreachId}writeStatus (idea, contacted, replied, won, lost), contact details or notes
GET / POST/sites/{id}/competitorsread / writeCompetitors / a new competitor domain (max 20 per site)
GET/sites/{id}/competitors/gapreadContent gap; ?competitorId=, ?minVolume=, ?maxKd=, ?limit=
GET/sites/{id}/competitors/{competitorId}/keywordsreadKeywords both the site and the competitor rank for

Monitoring and AI

MethodPathScopeWhat it does
GET/sites/{id}/georeadAI visibility summary; ?days= defaults to 90
GET/sites/{id}/monitorsreaduptime (30 days), index counts and changes30d
GET/sites/{id}/ai-accessreadThe last AI bot access check: checkedAt, result, policy
GET/sites/{id}/llms.txtreadThe generated llms.txt as plain text

Organization

MethodPathScopeWhat it does
GET/notificationsread{ unread, items }; ?unread=1 returns unread ones only, ?limit= defaults to 50, max 200
POST/notifications/readwriteBody: { ids?: string[] }; without ids, all are marked read
GET/todoreadWhat waits for a human and what automation did; ?siteId=, ?days= (default 7)
GET/agent/tasksreadDue manual tasks from the plans; ?siteId=
POST/agent/tasks/{taskId}/completewriteCloses a manual task with a note (note, at least 10 characters)
POST/agent/activitywriteWrites a line to the activity feed (message, siteId?)
GET/reportsreadThe last 50 reports and their public urls; filter with ?siteId=
GET/social/accounts, /social/posts, /social/insightsreadSocial accounts, posts and account analytics (from the shared social media engine)
POST/social/posts, /social/posts/{postId}/schedule, /social/campaignwriteCreating posts, setting dates and campaign series; posts land in review

Content statuses: idea, planned, generating, draft, review, approved, scheduled, published, failed, archived. Rule kind values: title, meta_description, canonical, robots, h1, img_alt, og, json_ld, hreflang, redirect, lang, attr, link, meta. matchType: exact, prefix, regex, all.

note

In organizations billed through CoSuite, sites outside the site allowance are read-only. Every request that writes to them returns 403 site_read_only; read requests keep working.

Examples

Start an AI fix:

curl -X POST https://seoasist.com/api/v1/sites/SITE_ID/fixes \
  -H "Authorization: Bearer sa_live_..." \
  -H "Content-Type: application/json" \
  -d '{"issueCode":"missing_meta_description"}'

Add keywords to tracking:

curl -X POST https://seoasist.com/api/v1/sites/SITE_ID/keywords \
  -H "Authorization: Bearer sa_live_..." \
  -H "Content-Type: application/json" \
  -d '{"keywords":["seo tool","site audit"]}'

Jobs such as crawls and fixes are queued. Follow the result on the matching GET endpoint (/sites/{id}, /sites/{id}/fixes).

Error codes

HTTPerrorWhen
400bad_requestA body field is missing or invalid (e.g. title, kind, keywords[])
401unauthorizedThe key is missing, invalid or revoked
402limit_reachedA plan quota is used up (e.g. monthly pages crawled, tracked keywords, research briefs)
403plan_requiredThe plan has no API access (Pro or Agency needed)
403forbiddenA write request with a read-only key
403site_read_onlyThe site is outside the CoSuite site allowance; writes are disabled
404not_foundThe site or record doesn't belong to this organization, doesn't exist, or the endpoint is unknown
409conflictFor example the site has no code repository, the code host isn't connected, no AI model is available, AI-marked claims aren't verified yet, or a page rewrite was sent to go live
409publish_gateThe post failed the auto-publish checks; it went back to review and the owner was notified
409 / 422not_editableContent that can't be edited (a live post or a page rewrite)
413too_largeThe body is too large (e.g. article HTML over 300 KB)
422no_aiNo AI is available for the action
429rate_limitedThe 240 requests per minute or 30 fixes per hour limit was exceeded
500internalUnexpected error. Details are not returned, for security

FAQ

I lost my key. Can I see it again?

No. Keys are stored only as a hash. Revoke the old one and create a new key.

Can I use the same key in an MCP client?

Yes. There are two ways:

  • Remote MCP (no install, recommended): https://seoasist.com/api/mcp. Add this URL as a connector in claude.ai, Claude Desktop, ChatGPT, Cursor or VS Code; a SEOAsist sign-in opens, you pick the organization and permissions, and you don't copy a key. Step-by-step instructions and one-click install links are in the panel on Settings → Integrations → Connect your AI assistant. In Claude Code, run claude mcp add --transport http seoasist https://seoasist.com/api/mcp and sign in with /mcp on first use. Where no sign-in window can open (servers, CI), send the API key with --header "Authorization: Bearer sa_live_...".
  • Local (stdio): the MCP server view in the API keys tab gives a ready-made config for Claude Desktop, Claude Code and Cursor; you put the key in the SEOASIST_API_KEY variable.

Once connected, the ready commands seo_round, content_from_gap, backlink_outreach, agent_tasks and weekly_report appear in the AI app's command menu. MCP tools call the same endpoints; write tools need a key with the write scope. Page rewrites (page_update) can't be published live through the API; only blog posts are published. For all tools, scopes and error codes, see the MCP reference; for setup per app, see Connect your AI.

Can I call it straight from the browser?

The API returns an Access-Control-Allow-Origin: * header. Still, never embed a key in a public page; anyone who sees the key can reach your organization's data.

Was this article helpful?
Didn't find what you need?
Describe the problem and our team will reply by email.
Contact us