Developer section: these pages cover the S6S workflow engine for self-hosted installs and developers. On s6s.ai, API keys and MCP access are issued by S6S on request (contact us); on a self-hosted install, an admin creates them on the API Keys page. For the AI Visibility product, start at the AI Visibility docs.
Connecting Workflows
Four ways to connect S6S workflows to your website, app, or service.
Webhooks
Your website's backend POSTs data to a unique URL. Best for forms, notifications, and event-driven flows.
REST API
Programmatically deploy and trigger workflows from any backend. Best for server-to-server integration.
Scheduled (Cron)
Run workflows on a recurring schedule. Best for reports, monitors, and data syncs.
SDK & MCP
TypeScript SDK for apps, MCP server for AI agents (Claude, Cursor). Best for developers.
Webhooks
The simplest way to connect a workflow to a website. Deploy a workflow with a webhook trigger, get a unique URL, and POST data to it from your backend.
1. Deploy with a webhook trigger
curl -X POST https://s6s.ai/api/v1/workflows/deploy \
-H "Authorization: Bearer s6s_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Contact Form Handler",
"trigger": {
"type": "webhook",
"path": "/contact-form",
"method": "POST"
},
"steps": [
{
"ref": "classify",
"action": "ai",
"config": {
"systemPrompt": "Classify the message as sales, support, or spam. Reply with one word.",
"prompt": "From: {{trigger.output.body.name}}\nMessage: {{trigger.output.body.message}}"
}
},
{
"ref": "notify",
"action": "slack",
"config": {
"channel": "#leads",
"textTemplate": "New {{classify.output.text}} message: {{trigger.output.body.message}}"
},
"credential": "default"
}
],
"flow": ["classify", "notify"]
}'2. Get your webhook URL
The deploy response includes your unique URL and a secret for authentication (abridged):
{
"ok": true,
"workflowId": "8c1f2a4e-5b6d-4e7f-9a0b-1c2d3e4f5a6b",
"runId": null,
"webhookTrigger": {
"path": "/contact-form",
"invokeUrl": "https://s6s.ai/api/webhooks/contact-form",
"secret": "3f9a1c7e5b2d8f4a6c0e9b3d7f1a5c8e2b6d0f4a9c3e7b1d"
}
}The secret is 48 hex characters. It is returned only on the first deploy; later deploys return "secret_hint": "previously_generated" instead, so store it. Deploying a webhook workflow does not start a run. If a credential is missing (here, Slack), the response lists it under missing_credentials and has no webhook details yet; connect it and deploy again.
3. Call it from your website's backend
The secret lets anyone start runs, so send it from your server, not from front-end code that visitors can read.
const response = await fetch(
"https://s6s.ai/api/webhooks/contact-form",
{
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Webhook-Token": process.env.S6S_WEBHOOK_SECRET
},
body: JSON.stringify({
name: form.name,
email: form.email,
message: form.message
})
}
);Webhook authentication
Five methods are supported (use any one). All compare against the secret in constant time.
| Method | Where | Description |
|---|---|---|
| Direct token | X-Webhook-Token | The secret as the header value |
| Query parameter | ?token= | The secret in the URL, for callers that cannot set headers. URLs can end up in logs, so prefer a header |
| HMAC signature | X-Webhook-Signature | HMAC-SHA256 of the raw request body, keyed with the secret (hex) |
| Bearer | Authorization: Bearer | The secret as a Bearer token |
| Telegram | X-Telegram-Bot-Api-Secret-Token | The secret set as Telegram's webhook secret_token |
Data available to steps
// Any step after a webhook trigger can read:
{{trigger.output.body}} // Parsed JSON body
{{trigger.output.body.name}} // Specific field
{{trigger.output.headers}} // Request headers, minus Authorization, Proxy-Authorization, Cookie, X-Webhook-Token, X-Webhook-Signature and X-Telegram-Bot-Api-Secret-Token
{{trigger.output.query}} // Query string parameters (token removed)
{{trigger.output.method}} // HTTP method
{{trigger.output.path}} // Webhook path
{{trigger.output.receivedAt}} // ISO timestampREST API
For backends and scripts. Deploy a workflow, trigger it programmatically, and get results back via polling, streaming, or callbacks.
Run an existing workflow
curl -X POST https://s6s.ai/api/v1/workflows/{workflowId}/run \
-H "Authorization: Bearer s6s_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "input": { "company": "Acme Corp" } }'The response returns the new runId with status running. The input becomes {{trigger.output.body}} for webhook workflows and {{trigger.output.payload}} for manual ones. A raw JSON body without the input wrapper also works.
Getting results back
| Method | How it works |
|---|---|
| Polling | GET /api/v1/runs/{runId} — status, timing and step outputs |
| Streaming | GET /api/runs/{runId}/stream — Server-Sent Events with real-time step progress (Bearer API key accepted) |
| Callback | Pass callback_url on deploy — if the deploy starts a run, S6S POSTs { run_id, status, timestamp } when it ends (up to 3 attempts). Outputs are not included; poll for them |
| Wait | Pass waitForCompletion: true on deploy — if the deploy starts a run, the response waits up to 30s and includes run_result |
Deploy starts a run right away only for a manual trigger (pass autoRun: true to run a webhook or telegram workflow on deploy; a schedule never runs on deploy), and not while a credential is missing. See API Keys for authentication and rate limits.
Scheduled (Cron)
For recurring jobs like daily reports, periodic monitors, or data syncs. No external trigger needed — S6S runs the workflow on your schedule.
{
"name": "Daily Competitor Report",
"trigger": {
"type": "schedule",
"cron": "0 9 * * 1-5",
"timezone": "America/New_York"
},
"steps": [
{
"ref": "research",
"action": "ai",
"config": {
"agentMode": true,
"systemPrompt": "You research competitor pricing pages and summarize what they offer.",
"prompt": "Read https://example.com/pricing and summarize the current plans and prices."
}
},
{
"ref": "send_report",
"action": "email",
"config": {
"to": "[email protected]",
"subject": "Daily Competitor Report",
"bodyTemplate": "{{research.output.text}}"
},
"credential": "default"
}
],
"flow": ["research", "send_report"]
}With agentMode on, the AI step gets an http_request tool automatically, so it can read web pages. Its answer is in {{research.output.text}}. The email step uses your connected email (SMTP) credential.
Deploying a schedule workflow does not start a run. S6S checks schedules every 60 seconds and fires each schedule at most once per minute. It skips a run when the workflow still has an active run or the account has insufficient credits.
See Triggers for cron expression syntax and timezone details.
SDK & MCP Server
TypeScript SDK
import { S6SClient } from "@s6s/sdk";
const client = new S6SClient({
baseUrl: "https://s6s.ai",
apiKey: process.env.S6S_API_KEY!,
});
const recipe = {
name: "Hello",
trigger: { type: "manual" },
steps: [{ ref: "greet", action: "transform", config: { template: { message: "Hello" } } }],
flow: ["greet"],
};
// Deploy: a manual-trigger workflow starts a run right away
const result = await client.deployWorkflow(recipe, { waitForCompletion: true });
console.log(result.runId, result.run_result);
// Run it again with input, then stream progress
const { runId } = await client.runWorkflow(result.workflowId, { name: "Ada" });
for await (const event of client.streamRun(runId)) {
console.log(event.event, event.data);
}
// Manage runs
const status = await client.getRunStatus(runId);
await client.cancelRun(runId); // active runs only
await client.retryFailed(runId); // failed runs onlyThe SDK is not on npm yet; the SDK page shows how to use it from the repository. Full SDK docs: TypeScript SDK
MCP Server (for AI agents)
The MCP server exposes 15 tools so Claude, Cursor, or any MCP-compatible agent can deploy and manage workflows directly.
npx @s6s/mcp-server
Full MCP docs: MCP Server
Practical Examples
Contact form + AI + Slack
Your website's backend POSTs the form to a webhook. An AI step classifies it (sales, support or spam) and posts it to Slack.
GitHub PR + Notify
GitHub sends a webhook when a PR opens (put the secret in the URL as ?token=). The workflow checks the PR details and posts a summary to Slack.
Daily competitor monitor
Runs at 9 AM on weekdays. An AI agent reads competitor pricing pages, writes a digest, and emails it to the team.
Lead enrichment API
Your CRM calls the run endpoint with the lead's email. The workflow enriches and scores the lead; your CRM polls or streams the run for the result.