These docs cover the S6S workflow engine — the developer playground layer underneath the product. For the main AI Visibility product (brand monitoring, the unified Report, fix actions), start at /docs/ai-visibility.
Connecting Workflows
Four ways to connect S6S workflows to your website, app, or service.
Webhooks
Your website 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 frontend or backend.
1. Deploy with a webhook trigger
curl -X POST https://s6s.ai/api/v1/workflows/deploy \
-H "Authorization: Bearer s6s_your_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": {
"model": "gpt-4o-mini",
"systemPrompt": "Classify as: sales, support, or spam.",
"userPrompt": "From: {{trigger.output.body.name}}\nMessage: {{trigger.output.body.message}}"
}
},
{
"ref": "notify",
"action": "slack.send_message",
"config": {
"channel": "#leads",
"text": "New {{classify.output.response}}: {{trigger.output.body.message}}"
},
"credential": "slack"
}
],
"flow": ["classify", "notify"]
}'2. Get your webhook URL
The deploy response includes your unique URL and a secret for authentication:
{
"ok": true,
"workflowId": "abc-123",
"webhookTrigger": {
"invokeUrl": "https://s6s.ai/api/webhooks/contact-form",
"secret": "whsec_a1b2c3..."
}
}3. Call it from your website
const response = await fetch(
"https://s6s.ai/api/webhooks/contact-form",
{
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Webhook-Token": "whsec_a1b2c3..."
},
body: JSON.stringify({
name: form.name,
email: form.email,
message: form.message
})
}
);Webhook authentication
Four methods supported (use any one):
| Method | Header | Description |
|---|---|---|
| Direct token | X-Webhook-Token | Simple comparison (constant-time) |
| HMAC signature | X-Webhook-Signature | HMAC-SHA256 of request body (hex) |
| Bearer | Authorization: Bearer | Standard Bearer token auth |
| Telegram | X-Telegram-Bot-Api-Secret-Token | Telegram bot webhook verification |
Data available to steps
{{trigger.output.body}} // Parsed JSON body
{{trigger.output.body.name}} // Specific field
{{trigger.output.headers}} // Request headers
{{trigger.output.query}} // Query string parameters
{{trigger.output.method}} // HTTP method
{{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_key" \
-H "Content-Type: application/json" \
-d '{ "input": { "company": "Acme Corp" } }'Getting results back
| Method | How it works |
|---|---|
| Polling | GET /api/runs/{runId} — check status and step outputs |
| Streaming | GET /api/runs/{runId}/stream — Server-Sent Events with real-time step progress |
| Callback | Pass callback_url on deploy — S6S POSTs results when done (3 retries) |
| Wait | Pass waitForCompletion: true on deploy — blocks up to 30s |
See the full API reference for all endpoints, parameters, and response formats.
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,
"model": "gpt-4o",
"systemPrompt": "Research competitor pricing changes...",
"tools": ["http_request"]
}
},
{
"ref": "send_report",
"action": "email",
"config": {
"to": "[email protected]",
"subject": "Daily Competitor Report",
"body": "{{research.output.response}}"
}
}
],
"flow": ["research", "send_report"]
}The worker daemon checks schedules every 60 seconds. Idempotent — won't double-fire in the same minute. Skips if the user 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: "s6s_your_key"
});
// Deploy and run
const result = await client.deployWorkflow(workflow, {
autoRun: true,
waitForCompletion: true
});
// Stream results
for await (const event of client.streamRun(result.runId!)) {
console.log(event.event, event.data);
}
// Manage
await client.cancelRun(runId);
await client.retryFailed(runId);
const status = await client.getRunStatus(runId);Full SDK docs: TypeScript SDK
MCP Server (for AI agents)
The MCP server exposes 14 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
Website form POSTs to webhook. AI classifies intent (sales/support/spam). Routes to Slack channel or auto-replies.
GitHub PR + Tests + Notify
GitHub sends webhook on PR open. Workflow validates metadata, runs checks, posts summary to Slack.
Daily competitor monitor
Runs 9 AM weekdays. AI agent scrapes competitor sites, formats digest, emails to team.
Lead enrichment API
Your CRM calls S6S API with lead email. Workflow enriches data, scores lead, returns result via callback.
Ready to connect?
Deploy your first workflow and get a webhook URL in seconds.