← Back to home

API reference

Programmatic access to Skalyn for AI agents and scripts. The same API key works on /api/v1/* and the endpoints the app uses.

OpenAPI 3.1 spec (openapi.json) · machine discovery (meta)

Authentication

Create an API key in your account (Account → API keys), or programmatically via signup + bootstrap (below). Send it as a bearer token on every request. Keys can do everything you can except delete your account or projects, manage billing, or use admin tools.

Authorization: Bearer wgtm_sk_...

Signing up (two doors)

The free tier is created in the browser (CAPTCHA-verified at /login). API signup — no CAPTCHA, ever — always succeeds but starts unactivated: zero entitlements until a paid plan is activated through checkout. GET /api/v1/me shows an activation block with the checkout pointer while the account is locked.

# Sign up (202 confirmation_required — never a key here)
curl -X POST https://skalyn.ai/api/v1/signup \
  -H "Content-Type: application/json" \
  -d '{"email":"agent@yourdomain.com","password":"...","acceptTerms":true}'

# Extract token_hash from the confirmation email link, then mint your key.
# The response is shown once; retries within 15 minutes replay it verbatim.
curl -X POST https://skalyn.ai/api/v1/keys/bootstrap \
  -H "Content-Type: application/json" \
  -d '{"tokenHash":"TOKEN_HASH","name":"my-agent"}'

Quickstart

The launch pipeline, end to end:

# 1. Discover the API (no auth)
curl https://skalyn.ai/api/v1/meta

# 2. Check your plan, limits, and remaining daily runs
curl -H "Authorization: Bearer wgtm_sk_..." https://skalyn.ai/api/v1/me

# 3. Create a project from onboarding answers
curl -X POST https://skalyn.ai/api/v1/projects \
  -H "Authorization: Bearer wgtm_sk_..." \
  -H "Content-Type: application/json" \
  -d '{"name":"Acme","onboarding":{"businessName":"Acme","productDescription":"...","problemSolved":"..."}}'

# 4. Confirm onboarding, then run each pipeline step (blocks up to ~5 min)
curl -X POST https://skalyn.ai/api/v1/projects/PROJECT_ID/confirm -H "Authorization: Bearer wgtm_sk_..."
curl -X POST https://skalyn.ai/api/v1/agents \
  -H "Authorization: Bearer wgtm_sk_..." -H "Content-Type: application/json" \
  -d '{"projectId":"PROJECT_ID","agentType":"market-strategist"}'

# 5. Approve the completed run to advance the pipeline
curl -X PATCH https://skalyn.ai/api/v1/agents \
  -H "Authorization: Bearer wgtm_sk_..." -H "Content-Type: application/json" \
  -d '{"runId":"RUN_ID","action":"approve"}'

# 6. After the last step, export the launch pack, then enter the weekly
#    growth loop (plan → generate → approve → retro).
curl -X POST https://skalyn.ai/api/v1/projects/PROJECT_ID/growth/start -H "Authorization: Bearer wgtm_sk_..."

Long calls (run / plan / generate) run synchronously and can take up to ~5 minutes. If your client times out, the work still completes server-side — poll GET /api/v1/projects/{id} until the run settles.

Plans & limits

PlanPriceProjectsRuns / dayExports
freeFree115No
pro$24/mo140Yes
studio$89/mo10100 / projectYes

Hitting a lock returns 402 with an upgrade block telling you exactly how to get a Stripe Checkout link — hand it to a human or drive the browser to complete the upgrade.

Errors & limits

Every non-2xx response is JSON with at least an error string, plus a machine code and retryable where relevant. Authenticated responses carry an X-Request-Id header.

StatusMeaning
400Invalid request body or parameters.
401Missing or invalid API key.
402Plan lock — body includes an upgrade/checkout pointer.
404Not found, or not yours.
409Conflict — an agent is already running, or the step isn't current.
429Rate / daily-run / hourly-write limit. See Retry-After + X-RateLimit-*.

A 402 lock body:

{
  "error": "Project limit reached. ...",
  "code": "upgrade_required",
  "feature": "projects",
  "upgrade": {
    "plans": ["studio"],
    "checkout": { "method": "POST", "path": "/api/v1/billing/checkout", "body": { "plan": "studio" } },
    "pricingUrl": "https://skalyn.ai/pricing",
    "docsUrl": "https://skalyn.ai/docs/api#billing"
  }
}

On a 429, Retry-After is the seconds to wait (to UTC midnight for the daily run cap, one hour for write limits).

MCP

The API is also exposed as a remote MCP server at https://skalyn.ai/api/mcp (streamable HTTP; private beta, API-key auth). Tools wrap the same service layer as the endpoints below — identical plan gates, caps, and replay behavior. Connect with claude mcp add --transport http skalyn https://skalyn.ai/api/mcp --header "Authorization: Bearer wgtm_sk_...".

Endpoints

All paths are under https://skalyn.ai. The full request/response schemas are in the OpenAPI spec.

GET/api/v1/metaProduct, pricing, endpoints, and auth instructions for agents. (public)
GET/api/v1/openapi.jsonThis OpenAPI 3.1 document. (public)
GET/api/v1/meThe caller's plan, limits, scope-aware usage, and billing state.
POST/api/v1/signupCreate an account. A valid CAPTCHA token yields a browser free-tier account; omitting it yields a paid-only API account. Always returns 202 confirmation_required — never a key. (public)
POST/api/v1/keys/bootstrapExchange the confirmation email's token_hash for an API key (shown once). Confirms the email in the same step; retries within 15 minutes replay the identical response. (public)
GET/api/v1/projectsList the caller's projects.
POST/api/v1/projectsCreate a project from onboarding data.
GET/api/v1/projects/{id}Get one owned project and its runs.
POST/api/v1/projects/{id}/confirmConfirm onboarding and enter the pipeline.
POST/api/v1/agentsRun a pipeline agent for a project.
PATCH/api/v1/agentsApprove or reject a completed run.
GET/api/v1/projects/{id}/contentList a project's content items.
GET/api/v1/projects/{id}/content/download-allDownload all of a project's content.
PATCH/api/v1/content/{itemId}Edit a content item.
GET/api/v1/content/{itemId}/downloadDownload one content item.
GET/api/v1/projects/{id}/brainRead a project's Marketing Playbook.
PATCH/api/v1/projects/{id}/decisionsUpdate a project's founder decisions.
GET/api/v1/exportExport a project's launch pack.
GET/api/v1/account/exportExport all of the caller's account data.
POST/api/v1/projects/{id}/growth/startEnter the Growth phase for a project.
GET/api/v1/projects/{id}/growth/cyclesList a project's growth cycles.
POST/api/v1/projects/{id}/growth/cyclesPlan a new weekly growth cycle.
POST/api/v1/growth/cycles/{cycleId}/approveApprove a weekly plan.
POST/api/v1/growth/cycles/{cycleId}/retroSubmit an end-of-week retro.
POST/api/v1/growth/items/{itemId}/generateGenerate a draft for a planned item.
PATCH/api/v1/growth/items/{itemId}Review a planned item (approve/skip/publish).
PATCH/api/v1/growth/tasks/{taskId}Update a founder task's status.
GET/api/v1/billingCurrent plan and billing state.
POST/api/v1/billing/checkoutCreate a Stripe Checkout link for an upgrade.