API

Seiton API

One token, one JSON envelope. Read health, the morning briefing, revenue, churn, traffic and search for any project you have access to. The CLI and the MCP server are wrappers around these same endpoints.

AI agent or LLM? Read this page as markdown

Authentication

Create a token in the dashboard under Settings → API / MCP. There is one token type; scope it to specific websites and permissions rather than minting a second kind.

curl https://www.seiton.online/api/v1/projects \
  -H "Authorization: Bearer sei_xxx"

Keep tokens out of frontend code and public repositories. Revoking a token in the dashboard kills it everywhere, immediately.

Entitlement

API access is part of the subscription, not a separate free tier. Creating a token costs nothing and the API answers for as long as your 14-day trial or your subscription is live. When neither is, every endpoint returns 402 with code: "trial_expired" rather than data.

Envelope

Every response has the same two shapes.

{ "status": "success", "data": { } }

{ "status": "error", "error": { "code": 401, "message": "Invalid or expired token." } }

Status codes

CodeMeaning
400Bad request — missing fields or invalid JSON
401Missing or invalid Bearer token
402Trial or subscription has ended — subscribe to continue
403Token lacks permission, or the action is dashboard-only
404Project, token or resource does not exist
409Conflict (for example a token revoking itself)
429Rate limited — check the X-RateLimit-* headers
500Unexpected server error

Rate limit: 60 requests per token per minute. A 429 body carries limit, remaining and reset.

Endpoints

GET    https://www.seiton.online/api/v1/projects
GET    https://www.seiton.online/api/v1/projects/{id}/health
GET    https://www.seiton.online/api/v1/projects/{id}/briefing
GET    https://www.seiton.online/api/v1/projects/{id}/signals
GET    https://www.seiton.online/api/v1/projects/{id}/analytics?period=7d
GET    https://www.seiton.online/api/v1/projects/{id}/revenue
GET    https://www.seiton.online/api/v1/projects/{id}/churn
GET    https://www.seiton.online/api/v1/projects/{id}/seo
GET    https://www.seiton.online/api/v1/projects/{id}/integrations
POST   https://www.seiton.online/api/v1/projects/{id}/integrations/{provider}/sync
GET    https://www.seiton.online/api/v1/projects/{id}/expenses
POST   https://www.seiton.online/api/v1/projects/{id}/expenses
DELETE https://www.seiton.online/api/v1/projects/{id}/expenses/{expenseId}
GET    https://www.seiton.online/api/v1/tokens
POST   https://www.seiton.online/api/v1/tokens
DELETE https://www.seiton.online/api/v1/tokens/{id}

Periods: today, yesterday, 7d, 30d, 3m, 12m, all. Minting and revoking tokens are behind a confirmation gate: without confirm: true you get a preview instead of a secret.

Deleting a website and connecting or disconnecting a payment provider are dashboard-only and answer 403.