Create a new task and start background execution
Documentation Index
Fetch the complete documentation index at: https://docs.sigmic.ai/llms.txt
Use this file to discover all available pages before exploring further.
sigmic_...) or a JWT token (eyJ...) from Widget Authentication.| Field | Type | Required | Default | Description |
|---|---|---|---|---|
message | string | Yes | - | The task instruction or prompt |
systemPrompt | string | No | null | Custom system prompt to prepend |
showInHistory | boolean | No | true | Whether to show this task in conversation history |
autoExecute | boolean | No | true | Automatically approve tool executions |
files | file[] | No | - | Files to upload (max 20 files, 50MB each) |
env | object | No | null | Non-sensitive environment variables (stored with task) |
secrets | object | No | null | Sensitive environment variables (never stored, never logged) |
env and secrets accept key-value string maps. They are injected into the sandbox as process.env variables and as MCP server context for {{mcp.KEY}} template resolution.
env — Non-sensitive config (tenant IDs, feature flags). Stored with the task and returned in GET responses for debugging.secrets — Sensitive credentials (API tokens, database URLs). Never stored, never logged, never returned in any response.secrets takes precedence.env or secrets, send the request as application/json instead of multipart/form-data. File uploads require multipart/form-data and cannot be combined with env/secrets in the same request.uploads/ directory| Field | Type | Description |
|---|---|---|
id | string | Unique task identifier |
status | string | Initial status (pending) |
GET /api/v1/tasks/:id/stream to receive real-time execution events including history replay and live streaming.
autoExecute=false to review tool calls before they execute:
tool_call event with status: awaiting_approval. You can also poll GET /api/v1/tasks/:id and check the pendingApprovals array. Use the Approve Tool Call endpoint to approve or reject it.
TENANT_ID, REPORT_FORMAT, and DATABASE_URL available as process.env variables. MCP servers configured with {{mcp.DATABASE_URL}} in their headers will have the value resolved automatically.
| Code | Description |
|---|---|
AUTH_REQUIRED | No authentication provided |
INVALID_API_KEY | Invalid or expired API key |
VALIDATION_ERROR | Missing or invalid message field, or invalid env var name |
EXECUTION_ERROR | Task execution failed |