API tokens and REST API

Personal API tokens, scopes, and calling the REST API from scripts.

Personal API tokens

Create tokens in Settings → API & MCP. A token acts as you, with your current role, in one organization only: the one selected when it was created.

PropertyDetails
Formatseo_pat_ followed by a random secret. Only a hash is stored; the token is shown once.
AccessRead + start jobs (any request) or Read only (GET requests only).
Expiry30 days, 90 days (default), 1 year, or never. Up to 25 active tokens per person per organization.
RevocationRevoke any time. Tokens also stop working when your account is suspended or you leave the organization.
Tokens can't create or revoke tokens, accept invitations, or reach the platform admin console. Those need a signed-in browser session.

Calling the API

Send the token as a bearer token. The organization comes from the token, so you don't need an organization header.

terminal
curl -H "Authorization: Bearer seo_pat_…" https://ai-seo.vdev.web.id/api/sites
audit from a script
TOKEN=seo_pat_…
API=https://ai-seo.vdev.web.id/api

# start an audit
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d '{}' $API/sites/$SITE_ID/audits

# poll until status is completed or failed
curl -H "Authorization: Bearer $TOKEN" $API/audits/$AUDIT_ID

# download the results
curl -H "Authorization: Bearer $TOKEN" $API/audits/$AUDIT_ID/export.json

Useful endpoints

EndpointPurpose
GET /api/sitesYour sites
POST /api/sites/{id}/auditsStart an audit (optional crawl_config overrides)
GET /api/audits/{id}Status, stage, progress and score
GET /api/audits/{id}/scoreScore and subscores
GET /api/audits/{id}/findingsFindings, filter by check_id or severity
GET /api/audits/{id}/export.jsonThe whole audit
GET /api/audits/{id}/export.csv?part=issuesIssues (or part=recommendations) as CSV
GET /api/sites/{id}/issuesTracked issues, filter by status, severity, check_id
GET /api/sites/{id}/recommendationsRecommendations, filter by status, priority
GET /api/sites/{id}/report?days=28Period summary
StatusMeaning
401No valid token
403Read-only token on a write, or not allowed with a token
404Not found, including anything in another organization
409Conflict, e.g. an audit is already running
422Invalid input