Skip to main content
GET
/
v1
/
tasks
Get Tasks
curl --request GET \
  --url https://api.xpander.ai/v1/tasks \
  --header 'x-api-key: <api-key>'
{
  "items": [
    {
      "id": "c5f32594-2c4c-48ef-bb2e-045466353110",
      "agent_id": "033d3514-0064-4d79-a2a4-50688f24c26b",
      "status": "completed",
      "created_at": "2026-02-07T04:53:44.072660Z",
      "updated_at": "2026-02-07T04:55:43.097263Z",
      "result": "The contact Andy Pai (ID: 200154625643) was updated successfully with new platform subscription properties: platform_status set to ACTIVE, platform_subcription_activate_date set to 2026-02-07, platform_subscription_name set to Pending, and platform_trial_end_date left unset as it is not a trial subscription.",
      "organization_id": "91fbe9bc-35b3-41e8-b59d-922fb5a0f031",
      "parent_task_id": null
    },
    {
      "id": "4a66b076-e757-4955-984a-eb6965e0b32b",
      "agent_id": "83877353-ee28-4bf5-a1fb-fab87dd08af7",
      "status": "executing",
      "created_at": "2026-02-07T04:53:51.823553Z",
      "updated_at": "2026-02-07T04:55:39.934293Z",
      "result": "",
      "organization_id": "91fbe9bc-35b3-41e8-b59d-922fb5a0f031",
      "parent_task_id": null
    },
    {
      "id": "82faa021-c6a2-49c0-bc07-bb5a0093c3da",
      "agent_id": "93a1cd50-2af0-452a-99a0-6e1f1b14fb29",
      "status": "pending",
      "created_at": "2026-02-07T03:26:27.636921Z",
      "updated_at": "2026-02-07T03:26:27.636931Z",
      "result": null,
      "organization_id": "91fbe9bc-35b3-41e8-b59d-922fb5a0f031",
      "parent_task_id": null
    }
  ],
  "total": 4318,
  "page": 1,
  "per_page": 20,
  "total_pages": 216
}
Retrieve a paginated list of tasks with optional filtering by status, agent ID, or creation date. Useful for monitoring task execution across your organization or for specific agents.

Query Parameters

page
integer
default:1
Page number (starting from 1)
per_page
integer
default:20
Items per page (maximum 50)
status
string
Filter by task status: queued, running, completed, failed, cancelled
agent_id
string
Filter by specific agent UUID
created_after
string
Filter tasks created after ISO 8601 timestamp (e.g., 2026-02-01T00:00:00Z)
created_before
string
Filter tasks created before ISO 8601 timestamp

Response

items
array
Array of task objects
total
integer
Total number of tasks matching the filter across all pages
page
integer
Current page number
per_page
integer
Number of items returned per page
total_pages
integer
Total number of pages available

Example Requests

# List all tasks (first page)
curl -X GET -H "x-api-key: <your-api-key>" \
  "https://api.xpander.ai/v1/tasks?page=1&per_page=10"

# Filter by status
curl -X GET -H "x-api-key: <your-api-key>" \
  "https://api.xpander.ai/v1/tasks?status=completed&page=1&per_page=10"

# Filter by agent
curl -X GET -H "x-api-key: <your-api-key>" \
  "https://api.xpander.ai/v1/tasks?agent_id=<agent-id>&page=1"

# Filter by date range
curl -X GET -H "x-api-key: <your-api-key>" \
  "https://api.xpander.ai/v1/tasks?created_after=2026-02-01T00:00:00Z&created_before=2026-02-07T23:59:59Z"

Example Response

{
  "items": [
    {
      "id": "81250b20-e9d7-4b3b-9995-07dc72b4bb59",
      "agent_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "user_id": null,
      "parent_task_id": null,
      "triggering_agent_id": null,
      "organization_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
      "status": "completed",
      "created_at": "2026-02-07T02:13:27.228497Z",
      "updated_at": "2026-02-07T02:13:41.541072Z",
      "source_node_type": "sdk",
      "result": "{\"name\":\"xpander.ai\",\"notes\":\"Full-stack agent platform...\"}",
      "title": "What is xpander.ai?"
    }
  ],
  "total": 4300,
  "page": 1,
  "per_page": 2,
  "total_pages": 2150
}

Use Cases

  • Monitor task volume - Track total tasks and completion rates
  • Filter by agent - See tasks for a specific agent
  • Find completed work - Retrieve only successful task executions
  • Track recent activity - Filter by creation date range

Authorizations

x-api-key
string
header
required

API Key for authentication

Query Parameters

page
integer
default:1

Page number (starting from 1)

Required range: x >= 1
per_page
integer
default:20

Items per page (max 50)

Required range: 1 <= x <= 50
user_id
string

filter by user id (optional)

parent_task_id
string

filter by parent task id (optional)

agent_id
string

filter by agent id (optional)

triggering_agent_id
string

filter by triggering agent id (parent calling agent) (optional)

status
enum<string>

filter by task status (optional)

Available options:
pending,
executing,
paused,
error,
failed,
completed,
stopped

Response

Successful Response

items
TasksListItem · object[]
total
integer
page
integer
per_page
integer
total_pages
integer