API Reference
Base URL
https://your-hyphen.example.com
Most applications call the gateway origin (https://<gateway>) with an API key or publishable key. The gateway serves the runtime routes and adds the /sdk/*, /forms/*, and /process-studio/* browser surfaces. Self-hosted customers can also call the private runtime endpoint supplied with their deployment. The route lists below say which origin serves each group.
Authentication
Hyphen supports two public access patterns:
- Gateway mode:
Authorization: Bearer sk-hyp-*(gateway injects tenant context) - SDK mode: publishable key
pk_live_*(org resolved server-side, scoped access)
Private runtime integrations follow the access policy supplied with the self-hosted deployment. Requests include X-Org-Id as organization context.
Admin routes are available where platform-level administration is enabled.
Core Engine Endpoints
Health
GET /healthGET /health/readyGET /builtin-actions
Workflows and Runs
POST /workflowsGET /workflowsGET /workflows/:idPUT /workflows/:idDELETE /workflows/:idPOST /workflows/:id/execute(body must be{ "input": { ... } })
Workflow definitions accept the built-in step kinds matcher, nway_match, loop, PbotApproval, PbotForm, and custom-table; see Primitives.
Approvals and Forms
GET /approvals: List all pending approvals for the orgPOST /approvals/:runId/:stepIdGET /approvals/:runIdGET /forms/:runId/:stepId: The schema of a pausedPbotFormstepPOST /forms/:runId/:stepId/submit(body:{ "data": { ... } })GET /forms/pendingPOST /forms/generate: Build aform_schema_v1document from an intent; needs theagent_formsfeature
External Forms
POST /external-forms: Create an intake form.trigger_workflow_idstarts a workflow on submit;trigger_process_idstarts a published Process Studio case. Never bothGET /external-forms,GET /external-forms/:id,PUT /external-forms/:id,DELETE /external-forms/:idPOST /external-forms/:id/submit: Answers201withsubmission_id,triggered_run_id, andtriggered_execution_typeGET /external-forms/:id/submissions
Runs
GET /runs/:runId/statusGET /runs/:runId/evidence: The record: every step, decision, and receipt in order
Agents
POST /agents/execute: body accepts optionalprevious_run_idto inject prior run contextGET /agentsGET /agents/:id/status: response includesprevious_run_idwhen setGET /agents/:id/tracePOST /agents/:id/resumeDELETE /agents/:id
Actions
POST /actionsGET /actionsGET /actions/:idPUT /actions/:id
Custom Tables
POST /custom-tablesGET /custom-tables/:nameDELETE /custom-tables/:namePOST /custom-tables/:name/insertPOST /custom-tables/:name/bulk-insertPUT /custom-tables/:name/updateGET /custom-tables/:name/rows: List rows (SDK-compatible)POST /custom-tables/:name/rows: Insert a row (SDK-compatible)PATCH /custom-tables/:name/rows/:rowId: Update a row by ID (SDK-compatible)GET /custom-tables/:name/audit
Documents
POST /documentsPOST /documents/from-urlPOST /documents/bulk-uploadGET /documentsGET /documents/:idGET /documents/:id/downloadPATCH /documents/:idPOST /documents/:id/versionsDELETE /documents/:idGET /documents/:id/auditGET /documents/storage-usage
Webhooks (Registrations)
POST /webhooksGET /webhooksGET /webhooks/:idPATCH /webhooks/:idDELETE /webhooks/:id
OAuth
GET /oauth/providersPOST /oauth/:provider/app-credentialsGET /oauth/:provider/app-credentialsGET /oauth/:provider/authorizeGET /oauth/:provider/callbackGET /oauth/connectionsGET /oauth/connections/:provider/:accountIdDELETE /oauth/connections/:provider/:accountIdPOST /oauth/connections/:provider/:accountId/refresh
AI Generation
POST /process-studio/processes/create-from-prompt: One-shot creation for API-only tenants. Creates a project if needed, creates the process, drafts a workflow or agent from the prompt, and publishes by default. See Process Studio below.POST /ai/generate-workflowGET /ai/generate-workflow/:generation_id/statusGET /ai/generate-workflow/:generation_idPOST /workflows/create-from-ai: Legacy compatibility endpoint; not recommended for new integrations and may be unavailable on some deployments.GET /workflows/create-from-ai/:processIdGET /workflows/generation-status/:processId
For new API-only workflow and agent creation, prefer POST /process-studio/processes/create-from-prompt. Use the lower-level Process Studio routes only when you need explicit control over the intermediate steps.
Org Config and Schema
POST /org-configGET /org-configPOST /schemasGET /schemas/:idPOST /utils/generate-dag
Process Studio
Served by the engine under /process-studio/*, and forwarded by the gateway under the same path for SDK sessions. This is what the catalog screen, the hosted page, and the MCP server call.
Catalog
GET /process-studio/playbook-library: The catalog, paginated withlimitandcursorGET /process-studio/playbook-library/:key: One case with its inputs, approval behavior, and versionPOST /process-studio/processes: Create a process to hold the organization's copyPOST /process-studio/processes/:processId/apply-playbook: Prepare the copy of a case, with the organization's content, connections, and peoplePOST /process-studio/bundles/:bundleId/publish: Publish the prepared copyPOST /process-studio/processes/:processId/execute: Run the published copy; body{ "input": { ... } }. A sample run sends the case's sample rows as the input
Describe your own
POST /process-studio/playbook-requests: Send a description; the reply carries the request id and its first statusGET /process-studio/playbook-requests,GET /process-studio/playbook-requests/:id: Follow a request:drafting,checking,listed,returned,awaiting_admin,withdrawnPOST /process-studio/playbook-requests/:id/retry: Build it again after editing the wordsPOST /process-studio/playbook-requests/:id/withdrawPOST /process-studio/playbook-packages/:id/list,.../return,.../retire: An admin lists a held case, returns it with a note, or retires a listed oneGET /process-studio/org-policy/describe-your-own,PUT /process-studio/org-policy/describe-your-own: Whether described cases list on their own or wait for the organization's admin
API-only authoring
POST /process-studio/processes/create-from-prompt: Create and publish from a prompt in one call
SDK Endpoints
These endpoints are called by the Hyphen SDK using a publishable key (pk_live_*). They provide scoped access to tasks, tables, documents, and authentication for embedded UI components.
These are gateway routes. The gateway resolves the organization from the key and forwards to the engine.
Sessions
POST /sdk/auth/session: Create anonymous sessionGET /sdk/config: Get SDK configuration
Tasks
GET /sdk/tasks: List pending tasks; each carrieskind:approval,form, oragent_reviewPOST /sdk/tasks/:taskId/decide: Approve or reject a task
Runs
GET /sdk/runs/:runId/status: Status of a workflow runGET /sdk/runs/:runId/evidence: The record of a run
Forms
GET /sdk/forms/pending: Forms a running case is waiting onGET /sdk/forms/run/:runId/:stepId: The schema of a paused stepPOST /sdk/forms/run/:runId/:stepId/submit: Settle a paused step; needs a signed-in sessionPOST /sdk/forms/generate: Build a form from an intentGET /sdk/external-forms/:formId,POST /sdk/external-forms/:formId/submit: Intake forms under an SDK sessionGET /forms/public/:formId,POST /forms/public/:formId/submit: The public intake routes behind the hosted page, no session, rate-limited by IP;/forms/public/:formId/otp/requestand/otp/verifywhen the form requires sign-in
Tables
GET /sdk/tables/:name/rows: List table rows (paginated)POST /sdk/tables/:name/rows: Insert a rowPATCH /sdk/tables/:name/rows/:rowId: Update a row (inline editing)
Documents
GET /sdk/documents: List documentsPOST /sdk/documents: Upload a document
Authentication
POST /sdk/auth/otp/request: Send OTP code to registered emailPOST /sdk/auth/otp/verify: Verify OTP and upgrade session
Agents
POST /sdk/agents/execute: Launch an agent (async, returnsagent_run_id). Accepts optionalprevious_run_idfor cross-run contextGET /sdk/agents: List agent runsGET /sdk/agents/:agentId/status: Get agent status with reasoning traceGET /sdk/agents/:agentId/trace: Get the complete recorded agent tracePOST /sdk/agents/:agentId/resume: Resume a paused agent with human inputDELETE /sdk/agents/:agentId: Cancel a running agent
Discovery
GET /sdk/actions: List registered actions (for tool picker)GET /sdk/workflows: List workflows (for tool picker)
Events
GET /sdk/events: Server-sent event stream (real-time updates)
Gateway Endpoints
GET /healthPOST /gateway/signup- Hosted pages:
GET /process-studio/v5.html,GET /forms/:formId,GET /people(account holder, management token),GET /sdk/v1.js - People session (management token in):
POST /gateway/account/people-sessionreturns a fifteen-minuteps-hyp-…token accepted only on the SDK user routes below andGET /gateway/orgs;DELETErevokes it - SDK users (super admin key, the owning account's management token, or a people session):
POSTandGET /sdk/admin/publishable-keys/:keyId/users,PUT /sdk/admin/users/:userId,POST /sdk/admin/users/:userId/suspend,POST /sdk/admin/users/:userId/reactivate,DELETE /sdk/admin/users/:userId - Tenant (management token):
/gateway/account,/gateway/orgs,/gateway/orgs/:orgId/keys,/gateway/orgs/:orgId/usage,/gateway/licenses - Licensing:
POST /licensing/validate,GET /licensing/public-key
Error Shape
Typical error body:
{
"error": "Validation failed",
"message": "..."
}