List Tasks
curl --request GET \
--url https://api.example.com/api/v1/tasksimport requests
url = "https://api.example.com/api/v1/tasks"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/tasks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/tasks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/tasks"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/tasks")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/tasks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyTask API
List Tasks
List all tasks for the authenticated API key with pagination
GET
/
api
/
v1
/
tasks
List Tasks
curl --request GET \
--url https://api.example.com/api/v1/tasksimport requests
url = "https://api.example.com/api/v1/tasks"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/tasks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/tasks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/tasks"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/tasks")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/tasks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyList Tasks
Retrieve a paginated list of all tasks created with your API key, sorted by most recent activity.Request
GET /api/v1/tasks
Authorization: Bearer {api_key}
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | number | 50 | Maximum number of tasks to return (max 100) |
offset | number | 0 | Number of tasks to skip (for pagination) |
Response
{
"success": true,
"data": [
{
"id": "c37c1d78-4d23-4e53-949a-ddd775f25e01",
"apiKeyId": "82344182-b81e-4f9a-8e7f-c14d8324caac",
"username": "testuser",
"sessionId": "80513b3f-9030-4776-a209-f2d96b1abce1",
"conversationId": "1769442659997-70avfyadp",
"status": "completed",
"message": "What is 2+2?",
"systemPrompt": null,
"showInHistory": true,
"autoExecute": true,
"env": null,
"error": null,
"createdAt": "2026-01-26T15:50:54.870Z",
"startedAt": "2026-01-26T15:50:59.998Z",
"completedAt": "2026-01-26T15:56:03.070Z",
"lastActivityAt": "2026-01-26T15:56:03.070Z",
"messageCount": 2
}
],
"pagination": {
"total": 42,
"limit": 50,
"offset": 0,
"hasMore": false
}
}
Response Fields
Each task item includes all standard task fields plus enrichment fields:| Field | Type | Description |
|---|---|---|
id | string | Unique task identifier |
apiKeyId | string | ID of the API key used to create the task |
username | string | Username associated with the API key |
sessionId | string | ID of the agent session |
conversationId | string | ID of the conversation for history |
status | string | Current task status |
message | string | Original task message |
systemPrompt | string | null | Custom system prompt if provided |
showInHistory | boolean | Whether task appears in conversation history |
autoExecute | boolean | Whether tools auto-execute |
env | object | null | Non-sensitive env vars provided at creation |
error | string | null | Error message if task failed |
createdAt | string | ISO timestamp when task was created |
startedAt | string | null | ISO timestamp when execution started |
completedAt | string | null | ISO timestamp when task completed |
lastActivityAt | string | ISO timestamp of most recent activity (latest of completedAt, startedAt, createdAt) |
messageCount | number | Number of messages in the conversation (0 if no conversation yet) |
Pagination Object
| Field | Type | Description |
|---|---|---|
total | number | Total number of tasks for this user |
limit | number | Number of tasks requested |
offset | number | Number of tasks skipped |
hasMore | boolean | Whether more tasks exist beyond this page |
Task Status Values
| Status | Description |
|---|---|
pending | Task created, not yet started |
running | Task is currently executing |
awaiting_approval | Waiting for tool call approval |
completed | Task finished successfully |
failed | Task failed with an error |
cancelled | Task was cancelled |
Tasks are sorted by
lastActivityAt descending — the most recently active task appears first. This is ideal for building a conversation list sidebar. For real-time progress (output) or the final response, use Get Task. For real-time streaming, use Stream Events.Examples
curl -s https://api.sigmic.ai/api/v1/tasks \
-H "Authorization: Bearer sigmic_your_key_here"
const response = await fetch('https://api.sigmic.ai/api/v1/tasks', {
headers: {
'Authorization': 'Bearer sigmic_your_key_here'
}
});
const { data: tasks, pagination } = await response.json();
console.log(`Found ${pagination.total} tasks (showing ${tasks.length})`);
import requests
response = requests.get(
'https://api.sigmic.ai/api/v1/tasks',
headers={'Authorization': 'Bearer sigmic_your_key_here'}
)
result = response.json()
tasks = result['data']
pagination = result['pagination']
print(f'Found {pagination["total"]} tasks (showing {len(tasks)})')
With Pagination
# Get the second page of 10 tasks
curl -s "https://api.sigmic.ai/api/v1/tasks?limit=10&offset=10" \
-H "Authorization: Bearer sigmic_your_key_here"
Paginate All Tasks
async function getAllTasks(apiKey) {
const tasks = [];
let offset = 0;
const limit = 50;
while (true) {
const response = await fetch(
`https://api.sigmic.ai/api/v1/tasks?limit=${limit}&offset=${offset}`,
{ headers: { 'Authorization': `Bearer ${apiKey}` } }
);
const { data, pagination } = await response.json();
tasks.push(...data);
if (!pagination.hasMore) break;
offset += limit;
}
return tasks;
}
Errors
| Code | Description |
|---|---|
AUTH_REQUIRED | No authentication provided |
INVALID_API_KEY | Invalid or expired API key |