Menu
Platform
AI
Alerts and status pages
App store purchases
Credits
Generated Assets
Knowledge
KV
Localization
Notifications
Organizations
Payments
Queues
Realtime
Sandboxes
Storage
Workflows
API reference
- Overview
- Access API keys
- Agent sessions API
- Agent versions API
- Agents API
- AI models API
- Artifact references API
- Artifacts API
- Assets API
- Auth configs API
- Bank receipts API
- Bank transfer accounts API
- Buckets API
- Builds API
- Catalogs API
- Chat profiles API
- Chat reports API
- Chat sticker packs API
- Checkout policies API
- Checkout sessions API
- Config changes API
- Config flags API
- Config segments API
- Connection providers API
- Connections API
- Connectors API
- Credit grants API
- Customer organizations API
- Customer subscriptions API
- Databases API
- Documents API
- Email domains API
- End users API
- Entities API
- Entitlement grants API
- Entries API
- Environments API
- Episodes API
- Error events API
- Error groups API
- Events API
- Exchange rates API
- Generations API
- Glossaries API
- Goals API
- Identities API
- Inbound emails API
- Inbound endpoints API
- Inbound messages API
- Inbound sms API
- Invitations API
- Job runs API
- Jobs API
- Knowledge schemas API
- KV API
- KV namespaces API
- Lease events API
- Leases API
- Licence keys API
- Licence tokens API
- Mail domains API
- Mail routes API
- Mailbox connect links API
- Mailbox OAUTH apps API
- Mailboxes API
- Memberships API
- Memories API
- Memory stores API
- Merchant accounts API
- Message topics API
- Messages API
- OAUTH clients API
- Objects API
- Organization roles API
- Orgs API
- Owner pools API
- Phone numbers API
- Portal sessions API
- Preferences API
- Price catalogs API
- Processor events API
- Projects API
- Queued executions API
- Queues API
- Realtime channels API
- Realtime members API
- Realtime messages API
- Recipients API
- Relations API
- Releases API
- Revenue API
- Revenue facts API
- Revenue sources API
- Runs API
- Sandbox shapes API
- Schedules API
- Scrubbing policies API
- Search API
- Search indexes API
- Secret versions API
- Secrets API
- Service enablements API
- Service observations API
- Services API
- Serving routes API
- Session events API
- Sessions API
- Signing key versions
- Signing keys
- Sms numbers API
- Source maps API
- Spaces API
- Store connections API
- Store consumption requests API
- Store purchases API
- Subscriptions API
- Suppressions API
- Tax threshold statuses API
- Templates API
- Test clocks API
- Token exchanges API
- Transfers API
- Trust policies API
- Trusted issuers API
- Uptime checks API
- Uptime manifests API
- Uptime sources API
- Usage events API
- Usage invoices API
- Usage meter prices API
- Usage meters API
- Usage reservations API
- Usage settings API
- Usage tiers API
- Volumes API
- Waits API
- Webhook deliveries API
- Webhook endpoints API
- Workflows API
Getting Started
Authentication
KV Store
Deploy & Infrastructure
Reference
Workflows
Declare a Workflow, start a Run, and read it back, with a handler of your own.
A Workflow names an HTTPS handler that your own service exposes. A Run is one execution of it: Sylphx calls the handler with a signed request, records what it answers, and retries it with backoff until the Run closes. A Run survives deploys and restarts, and a delayed start is a durable timer.
Everything is under
https://api.sylphx.com/v1/orgs/{org}/projects/{project}/envs/{env}/, and an
environment outside the key's scope answers 404.
#1. Declare the Workflow
curl -X POST "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/workflows?workflow_id=hire-screening" \
-H "Authorization: Bearer $SYLPHX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"spec":{"handlerUri":"https://app.example.com/api/sylphx/workflows","retryPolicy":{"maxAttempts":5},"timeouts":{"invocationTimeout":"120s"}}}'The handler must be https:// on port 443 and resolve to a public address.
By default a call is retried up to 10 times with a 1 second backoff that
doubles to 600 seconds, and a Run may last 30 days. A Run pins the handler it
started with, so later edits affect new Runs only.
#2. Start a Run
curl -X POST "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/workflows/hire-screening/runs?run_id=applicant-8f2c" \
-H "Authorization: Bearer $SYLPHX_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"input":{"applicantId":"8f2c"},"startDelay":"900s"}'const run = await sylphx.workflows.runs.create({
parent: 'orgs/acme/projects/shop/envs/production/workflows/hire-screening',
runId: 'applicant-8f2c',
run: { input: { applicantId: '8f2c' }, startDelay: '900s' },
})run_id is your business key. Starting the same run_id with the same input
returns the existing Run with 200 and Sylphx-Idempotent-Replay: true; a
different input under the same id is 409. startDelay (at most 365 days)
delays the first call to your handler.
#3. Answer the handler
Your handler receives a POST signed with a key you verify against
https://api.sylphx.com/.well-known/workflows-jwks.json. A plain 2xx answer
completes the Run, with a JSON body as its output, so a handler that just does
the work needs nothing more. A 400, 401, 403, 404, 410 or 422 fails
the Run with no retry. A 408, 409, 425, 429, a 5xx or a dropped
connection is retried under the Workflow's retry policy.
#4. Read the Run back
curl "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/workflows/hire-screening/runs/applicant-8f2c" \
-H "Authorization: Bearer $SYLPHX_API_KEY"state is running, succeeded, failed, cancelled or timed_out. To
block until it closes, call POST …/runs/{run}:wait with
{"timeout":"30s"}; to stop it, POST …/runs/{run}:cancel. A Run is
metered as workflows.actions: one for its start and one for each attempt
that reached your handler.