API Reference
Trigger workflow executions and retrieve execution traces from your own applications, backend services, or CI pipelines using the CipherSense Agents REST API.
Authentication
All API requests must be authenticated with an API key passed as a Bearer token in the Authorization header. API keys are scoped to an organisation — a key can only trigger workflows that belong to the same organisation it was created in.
Keep your key secret
API keys are shown in full only once, immediately after creation. They are stored as a one-way hash — if you lose the key you must revoke it and generate a new one. Never embed keys in client-side code or commit them to source control.
Generating a key
Navigate to Organisation Settings → API Keys and click New API Key. Only organisation Admins can create and revoke keys. Keys follow the format cs_live_<48 hex chars>.
Request header
Authorization: Bearer cs_live_3f9a...c2d1
List Workflows
Returns a paginated list of all active (non-archived, non-deleted) workflows that belong to the organisation associated with your API key. Useful for discovering workflow IDs before triggering a run.
Query parameters
Example request
curl "https://agents.ciphersense.ai/api/workflows/list?limit=10&offset=0" \ -H "Authorization: Bearer cs_live_3f9a...c2d1"
200 Response
{
"workflows": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Nightly Report Generator",
"description": "Generates and emails a usage summary each night.",
"status": "active",
"schedule_type": "daily",
"webhook_enabled": false,
"created_at": "2025-01-10T09:00:00Z",
"updated_at": "2025-03-02T14:30:00Z",
"last_executed_at": "2025-03-17T00:05:00Z",
"project": {
"id": "proj_9f1e...",
"name": "Data Ops"
}
}
],
"total": 42,
"limit": 10,
"offset": 0
}Response fields
Run a Workflow
Triggers a new execution of the specified workflow. Execution is asynchronous — the request returns immediately with an executionId while the workflow runs in the background. Use the execution ID to poll for status or retrieve the trace.
Request body
Example request
curl -X POST https://agents.ciphersense.ai/api/workflows/run \
-H "Authorization: Bearer cs_live_3f9a...c2d1" \
-H "Content-Type: application/json" \
-d '{
"workflowId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}'202 Response
{
"executionId": "exec_7f3a91bc-...",
"status": "running",
"message": "Workflow execution started in background."
}Get Execution Trace
Retrieves the full execution record and step-level trace for a given execution ID. Poll this endpoint after calling Run a Workflow to check whether execution has completed and to inspect per-node results, durations, and any errors.
Path parameter
Example request
curl https://agents.ciphersense.ai/api/workflows/executions/exec_7f3a91bc-... \ -H "Authorization: Bearer cs_live_3f9a...c2d1"
200 Response
{
"id": "exec_7f3a91bc-...",
"workflow_id": "a1b2c3d4-...",
"status": "success",
"created_at": "2025-03-17T10:22:00Z",
"duration_ms": 4821,
"total_tokens": 1340,
"steps": [
{
"id": "step_001",
"node_id": "node-abc",
"node_type": "integration",
"status": "success",
"duration_ms": 312,
"output_data": { "content": "...", "data": "..." }
},
{
"id": "step_002",
"node_id": "node-xyz",
"node_type": "agent",
"status": "success",
"duration_ms": 4509,
"input_data": {
"prompt": "Analyse the following data: ...",
"resolved_variables": { "data": "..." }
},
"output_data": { "content": "Here are the key trends..." }
}
]
}Execution status values
runningWorkflow is actively executing.
successAll nodes completed successfully.
failedOne or more nodes encountered an error.
awaiting_inputPaused at a Human-in-the-Loop node, waiting for approval.
cancelledExecution was cancelled manually before completion.
Ready to integrate?
Generate your first API key from Organisation Settings and trigger a workflow run from your own service in minutes.