Spaces
Get Tasks by Space Token
Retrieve all tasks within a specific space using its token
GET
/
api
/
v2
/
platform
/
spaces
/
{space_token}
/
tasks
/
Get Tasks by Space Token
curl --request GET \
--url https://unpod.ai/api/v2/platform/spaces/{space_token}/tasks/ \
--header 'Authorization: <api-key>' \
--header 'Org-Handle: <org-handle>'import requests
url = "https://unpod.ai/api/v2/platform/spaces/{space_token}/tasks/"
headers = {
"Org-Handle": "<org-handle>",
"Authorization": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Org-Handle': '<org-handle>', Authorization: '<api-key>'}
};
fetch('https://unpod.ai/api/v2/platform/spaces/{space_token}/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://unpod.ai/api/v2/platform/spaces/{space_token}/tasks/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Org-Handle: <org-handle>"
],
]);
$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://unpod.ai/api/v2/platform/spaces/{space_token}/tasks/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Org-Handle", "<org-handle>")
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://unpod.ai/api/v2/platform/spaces/{space_token}/tasks/")
.header("Org-Handle", "<org-handle>")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://unpod.ai/api/v2/platform/spaces/{space_token}/tasks/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Org-Handle"] = '<org-handle>'
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"count": 38,
"status_code": 200,
"message": "Tasks Fetched Successfully",
"data": [
{
"_id": "6a9e50f7066c0e4516a22a07",
"space_id": "593",
"thread_id": "",
"user": "",
"user_org_id": "263",
"user_info": {},
"created": "2026-09-07T05:51:51.607000",
"modified": "2026-09-07T05:54:03.857000",
"task_id": "T3901cb27aa8011f1a814c5566158eaa5",
"run_id": "R3901cb26aa8011f1a814c5566158eaa5",
"collection_ref": "collection_data_EK6PB1ZXX1FT2TB8FNZPE39V",
"task": {},
"input": {
"contact_number": "+918109687225",
"quality": "good",
"name": "",
"token": "EK6PB1ZXX1FT2TB8FNZPE39V",
"space_token": "EK6PB1ZXX1FT2TB8FNZPE39V",
"org_id": 263,
"missing_space_context": false
},
"output": {
"call_type": "inbound",
"call_status": "connected",
"call_end_reason": "USER_HUNG_UP_IN_CALL"
},
"attachments": [],
"assignee": "sarvdhan-used-vehicle-finance-and-secured-loans-assistant-6kj8v0siouhg",
"status": "in_progress",
"execution_type": "call",
"ref_id": "6a88371afc539da073151bec",
"failure_count": 0,
"last_failure_reason": null,
"provider": null,
"retry_attempt": 0,
"referenced_task": null,
"follow_up_count": null,
"follow_up_chain_id": null,
"last_status_change": "2026-09-07T05:51:51.606885",
"scheduled_timestamp": null
},
{
"_id": "6a9e4ffa0d0f156912b9047b",
"space_id": "593",
"thread_id": "",
"user": "",
"user_org_id": "263",
"user_info": {},
"created": "2026-09-07T05:47:38.682000",
"modified": "2026-09-07T05:51:28.673000",
"task_id": "Ta25dc889aa7f11f1a814c5566158eaa5",
"run_id": "Ra25dc888aa7f11f1a814c5566158eaa5",
"collection_ref": "collection_data_EK6PB1ZXX1FT2TB8FNZPE39V",
"task": {},
"input": {
"contact_number": "+918109687225",
"quality": "good",
"name": "",
"token": "EK6PB1ZXX1FT2TB8FNZPE39V",
"space_token": "EK6PB1ZXX1FT2TB8FNZPE39V",
"org_id": 263,
"missing_space_context": false
},
"output": {
"call_id": "SarvDhan Bridge_08109687225_jC8KHDuwGuBi",
"customer": "",
"contact_number": "+918109687225",
"call_end_reason": "BLOCKED_USER",
"recording_url": null,
"transcript": [],
"start_time": "2026-09-07T05:47:39.119969",
"end_time": "2026-09-07T05:47:39.119980",
"assistant_number": "+918071539260",
"call_summary": null,
"duration": 0,
"cost": 0.0,
"post_call_data": {
"schema_version": 2,
"analytics": {
"sentiment": null,
"engagement": null,
"tone": null,
"contact_status": "active",
"outcome": "NotConnected",
"call_score": null,
"call_score_breakdown": null
},
"summary": {
"headline": null,
"key_points": []
},
"lead": {
"name": null,
"labels": [],
"objections": [],
"pain_points": [],
"questions_asked": []
},
"structured_data": {
"outcome": null,
"payment_release_choice": null
},
"next_action": {
"label": [],
"callback_requested": false,
"scheduled_at": null
},
"follow_up": {
"required": true,
"state": "skipped_inbound_call",
"reason": "not-connected retry",
"next_at": null,
"attempt": 1,
"attempts_remaining": 2,
"policy": {
"max_call_attempts": 3,
"max_followup_attempts": 2,
"daily_limit": 3,
"next_call_attempt_number": 2
}
},
"evaluation": null,
"call_evaluation": null,
"redial": {
"status": null
},
"skipped": [
{
"stage": "call_evaluation",
"reason": "policy:disabled_in_config"
},
{
"stage": "critic",
"reason": "no_invariant_violations"
}
],
"post_call_usage": {
"thread_id": "Ta25dc889aa7f11f1a814c5566158eaa5",
"room_name": "",
"agent_id": "sarvdhan-used-vehicle-finance-and-secured-loans-assistant-6kj8v0siouhg",
"org_id": null,
"space_token": null,
"call_start": "2026-09-07T05:51:28.326798Z",
"call_end": "2026-09-07T05:51:28.326798Z",
"call_duration_s": "0.00",
"providers": {
"llm_provider": "Unpod",
"llm_model": "google/gemma-4-31b-it",
"stt_provider": "soniox",
"stt_model": "stt-rt-v5",
"tts_provider": "cartesia",
"tts_model": "sonic-3.5"
},
"raw_counters": {
"llm_prompt_tokens": "1508",
"llm_completion_tokens": "127",
"llm_cached_tokens": "0",
"tts_characters_count": "0",
"stt_audio_duration": "0"
},
"sku_deltas": [
{
"codename": "llm.unpod.google/gemma_4_31b_it.input",
"raw": "1508",
"unit_scale": "1"
},
{
"codename": "llm.unpod.google/gemma_4_31b_it.output",
"raw": "127",
"unit_scale": "1"
}
]
}
},
"metadata": {
"cost": 0.0,
"type": "",
"usage": {}
},
"call_type": "inbound",
"call_status": "failed"
},
"attachments": [],
"assignee": "sarvdhan-used-vehicle-finance-and-secured-loans-assistant-6kj8v0siouhg",
"status": "completed",
"execution_type": "call",
"ref_id": "6a88371afc539da073151bec",
"failure_count": 0,
"last_failure_reason": null,
"provider": null,
"retry_attempt": 0,
"referenced_task": null,
"follow_up_count": null,
"follow_up_chain_id": null,
"last_status_change": "2026-09-07T05:47:38.682017",
"scheduled_timestamp": null
}
]
}
{
"count": 45,
"status_code": 200,
"message": "Tasks Fetched Successfully",
"data": [
{
"_id": "697debb84c27faa892bfa0cc",
"thread_id": "thread_9xkL2mQpR7vNwY4sZ3cJ8hF1",
"user_info": {
"email": "user@example.com",
"full_name": "John Doe"
},
"task_id": "T8ff2ccdffe9a11f0878d43cd8a99e069",
"run_id": "R8ff2ccdefe9a11f0878d43cd8a99e069",
"task": {
"objective": "Call the lead and discuss the project requirements."
},
"input": {
"name": "John Doe",
"contact_number": "1234567890",
"email": "john@example.com",
"context": "Follow up on proposal"
},
"output": {
"call_id": "CALL_7dAb3kR9mXvQ2pLw",
"start_time": "2026-02-07T05:57:45Z",
"end_time": "2026-02-07T06:02:30Z",
"duration": 285,
"recording_url": "https://cdn.unpod.ai/recordings/CALL_7dAb3kR9mXvQ2pLw.mp3",
"transcript": [
{
"role": "agent",
"content": "Hello, this is an AI assistant calling on behalf of Unpod. Am I speaking with John Doe?"
},
{
"role": "user",
"content": "Yes, this is John."
}
],
"post_call_data": {
"summary": "The agent successfully connected with John Doe and discussed project requirements.",
"outcome": "interested",
"sentiment": "positive"
},
"call_type": "outbound",
"call_status": "completed"
},
"assignee": "space-agent-8qmk42nslp91wrh3dz7btxc4",
"status": "completed",
"execution_type": "call",
"run_mode": "prod",
"created": "2026-02-07T05:57:45Z",
"modified": "2026-02-07T06:02:35Z"
}
]
}
{
"message": "Error fetching tasks",
"errors": "Detailed error description"
}
{
"count": 38,
"status_code": 200,
"message": "Tasks Fetched Successfully",
"data": [
{
"_id": "6a9e50f7066c0e4516a22a07",
"space_id": "593",
"thread_id": "",
"user": "",
"user_org_id": "263",
"user_info": {},
"created": "2026-09-07T05:51:51.607000",
"modified": "2026-09-07T05:54:03.857000",
"task_id": "T3901cb27aa8011f1a814c5566158eaa5",
"run_id": "R3901cb26aa8011f1a814c5566158eaa5",
"collection_ref": "collection_data_EK6PB1ZXX1FT2TB8FNZPE39V",
"task": {},
"input": {
"contact_number": "+918109687225",
"quality": "good",
"name": "",
"token": "EK6PB1ZXX1FT2TB8FNZPE39V",
"space_token": "EK6PB1ZXX1FT2TB8FNZPE39V",
"org_id": 263,
"missing_space_context": false
},
"output": {
"call_type": "inbound",
"call_status": "connected",
"call_end_reason": "USER_HUNG_UP_IN_CALL"
},
"attachments": [],
"assignee": "sarvdhan-used-vehicle-finance-and-secured-loans-assistant-6kj8v0siouhg",
"status": "in_progress",
"execution_type": "call",
"ref_id": "6a88371afc539da073151bec",
"failure_count": 0,
"last_failure_reason": null,
"provider": null,
"retry_attempt": 0,
"referenced_task": null,
"follow_up_count": null,
"follow_up_chain_id": null,
"last_status_change": "2026-09-07T05:51:51.606885",
"scheduled_timestamp": null
},
{
"_id": "6a9e4ffa0d0f156912b9047b",
"space_id": "593",
"thread_id": "",
"user": "",
"user_org_id": "263",
"user_info": {},
"created": "2026-09-07T05:47:38.682000",
"modified": "2026-09-07T05:51:28.673000",
"task_id": "Ta25dc889aa7f11f1a814c5566158eaa5",
"run_id": "Ra25dc888aa7f11f1a814c5566158eaa5",
"collection_ref": "collection_data_EK6PB1ZXX1FT2TB8FNZPE39V",
"task": {},
"input": {
"contact_number": "+918109687225",
"quality": "good",
"name": "",
"token": "EK6PB1ZXX1FT2TB8FNZPE39V",
"space_token": "EK6PB1ZXX1FT2TB8FNZPE39V",
"org_id": 263,
"missing_space_context": false
},
"output": {
"call_id": "SarvDhan Bridge_08109687225_jC8KHDuwGuBi",
"customer": "",
"contact_number": "+918109687225",
"call_end_reason": "BLOCKED_USER",
"recording_url": null,
"transcript": [],
"start_time": "2026-09-07T05:47:39.119969",
"end_time": "2026-09-07T05:47:39.119980",
"assistant_number": "+918071539260",
"call_summary": null,
"duration": 0,
"cost": 0.0,
"post_call_data": {
"schema_version": 2,
"analytics": {
"sentiment": null,
"engagement": null,
"tone": null,
"contact_status": "active",
"outcome": "NotConnected",
"call_score": null,
"call_score_breakdown": null
},
"summary": {
"headline": null,
"key_points": []
},
"lead": {
"name": null,
"labels": [],
"objections": [],
"pain_points": [],
"questions_asked": []
},
"structured_data": {
"outcome": null,
"payment_release_choice": null
},
"next_action": {
"label": [],
"callback_requested": false,
"scheduled_at": null
},
"follow_up": {
"required": true,
"state": "skipped_inbound_call",
"reason": "not-connected retry",
"next_at": null,
"attempt": 1,
"attempts_remaining": 2,
"policy": {
"max_call_attempts": 3,
"max_followup_attempts": 2,
"daily_limit": 3,
"next_call_attempt_number": 2
}
},
"evaluation": null,
"call_evaluation": null,
"redial": {
"status": null
},
"skipped": [
{
"stage": "call_evaluation",
"reason": "policy:disabled_in_config"
},
{
"stage": "critic",
"reason": "no_invariant_violations"
}
],
"post_call_usage": {
"thread_id": "Ta25dc889aa7f11f1a814c5566158eaa5",
"room_name": "",
"agent_id": "sarvdhan-used-vehicle-finance-and-secured-loans-assistant-6kj8v0siouhg",
"org_id": null,
"space_token": null,
"call_start": "2026-09-07T05:51:28.326798Z",
"call_end": "2026-09-07T05:51:28.326798Z",
"call_duration_s": "0.00",
"providers": {
"llm_provider": "Unpod",
"llm_model": "google/gemma-4-31b-it",
"stt_provider": "soniox",
"stt_model": "stt-rt-v5",
"tts_provider": "cartesia",
"tts_model": "sonic-3.5"
},
"raw_counters": {
"llm_prompt_tokens": "1508",
"llm_completion_tokens": "127",
"llm_cached_tokens": "0",
"tts_characters_count": "0",
"stt_audio_duration": "0"
},
"sku_deltas": [
{
"codename": "llm.unpod.google/gemma_4_31b_it.input",
"raw": "1508",
"unit_scale": "1"
},
{
"codename": "llm.unpod.google/gemma_4_31b_it.output",
"raw": "127",
"unit_scale": "1"
}
]
}
},
"metadata": {
"cost": 0.0,
"type": "",
"usage": {}
},
"call_type": "inbound",
"call_status": "failed"
},
"attachments": [],
"assignee": "sarvdhan-used-vehicle-finance-and-secured-loans-assistant-6kj8v0siouhg",
"status": "completed",
"execution_type": "call",
"ref_id": "6a88371afc539da073151bec",
"failure_count": 0,
"last_failure_reason": null,
"provider": null,
"retry_attempt": 0,
"referenced_task": null,
"follow_up_count": null,
"follow_up_chain_id": null,
"last_status_change": "2026-09-07T05:47:38.682017",
"scheduled_timestamp": null
}
]
}
{
"count": 45,
"status_code": 200,
"message": "Tasks Fetched Successfully",
"data": [
{
"_id": "697debb84c27faa892bfa0cc",
"thread_id": "thread_9xkL2mQpR7vNwY4sZ3cJ8hF1",
"user_info": {
"email": "user@example.com",
"full_name": "John Doe"
},
"task_id": "T8ff2ccdffe9a11f0878d43cd8a99e069",
"run_id": "R8ff2ccdefe9a11f0878d43cd8a99e069",
"task": {
"objective": "Call the lead and discuss the project requirements."
},
"input": {
"name": "John Doe",
"contact_number": "1234567890",
"email": "john@example.com",
"context": "Follow up on proposal"
},
"output": {
"call_id": "CALL_7dAb3kR9mXvQ2pLw",
"start_time": "2026-02-07T05:57:45Z",
"end_time": "2026-02-07T06:02:30Z",
"duration": 285,
"recording_url": "https://cdn.unpod.ai/recordings/CALL_7dAb3kR9mXvQ2pLw.mp3",
"transcript": [
{
"role": "agent",
"content": "Hello, this is an AI assistant calling on behalf of Unpod. Am I speaking with John Doe?"
},
{
"role": "user",
"content": "Yes, this is John."
}
],
"post_call_data": {
"summary": "The agent successfully connected with John Doe and discussed project requirements.",
"outcome": "interested",
"sentiment": "positive"
},
"call_type": "outbound",
"call_status": "completed"
},
"assignee": "space-agent-8qmk42nslp91wrh3dz7btxc4",
"status": "completed",
"execution_type": "call",
"run_mode": "prod",
"created": "2026-02-07T05:57:45Z",
"modified": "2026-02-07T06:02:35Z"
}
]
}
{
"message": "Error fetching tasks",
"errors": "Detailed error description"
}
Get Tasks by Space Token
Fetch all tasks for a specific space using the space token. Supports pagination withpage and page_size query parameters for efficient data retrieval.
Prerequisites: Make sure you have your API Token ready. See Authentication for details.
Get Tasks by Space Token
Retrieve all tasks associated with a specific space, with optional pagination.GET /api/v2/platform/spaces/{space_token}/tasks/
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| space_token | string | Yes | Public token identifying the workspace |
You can get the
space_token by hitting the Get All Spaces API. The token field in the response is your Space Token.Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| page | integer | No | Page number for pagination (default = 1) |
| page_size | integer | No | Number of tasks per page (default = 20) |
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | API Key format: Token <token> |
| Content-Type | string | Yes | application/json |
Response Fields
| Field | Type | Description |
|---|---|---|
| count | integer | Total number of tasks |
| status_code | integer | HTTP status code |
| message | string | Response message |
| data | array | Array of task objects |
Task Object Fields
| Field | Type | Description |
|---|---|---|
| _id | string | Internal task document ID |
| thread_id | string | Thread identifier |
| user_info | object | User details (email, full_name) |
| task_id | string | Unique task identifier |
| run_id | string | Parent run identifier |
| task | object | Task definition with objective |
| input | object | Input data for the task |
| output | object | Task output with call details |
| assignee | string | Agent handle assigned to the task |
| status | string | Task status: pending, completed, failed |
| execution_type | string | Type of execution: call, email, etc. |
| run_mode | string | Execution mode: dev, prod, etc. |
| created | string | Task creation timestamp |
| modified | string | Last modified timestamp |
Common Error Codes
| Status Code | Description |
|---|---|
| 200 | Success - Data fetched successfully |
| 206 | Partial Content - Business logic error occurred |
| 400 | Bad Request - Invalid parameters provided |
| 401 | Unauthorized - Invalid or missing API token |
| 403 | Forbidden - Access denied to the resource |
| 404 | Not Found - Space not found |
| 500 | Internal Server Error - Server-side error |
Code Examples
const axios = require('axios');
const headers = {
'Authorization': 'Token your-api-token',
'Content-Type': 'application/json'
};
// Get tasks by space token with pagination
const getTasksBySpace = async (spaceToken, page = 1, pageSize = 20) => {
const response = await axios.get(
`https://unpod.ai/api/v2/platform/spaces/${spaceToken}/tasks/`,
{
headers,
params: { page, page_size: pageSize }
}
);
console.log(`Total tasks: ${response.data.count}`);
response.data.data.forEach(task => {
console.log(`Task ${task.task_id}: ${task.status}`);
});
return response.data.data;
};
// Example usage
getTasksBySpace('your-space-token', 1, 20);
import requests
headers = {
'Authorization': 'Token your-api-token',
'Content-Type': 'application/json'
}
def get_tasks_by_space(space_token: str, page: int = 1, page_size: int = 20):
"""Get tasks by space token with pagination"""
url = f'https://unpod.ai/api/v2/platform/spaces/{space_token}/tasks/'
params = {'page': page, 'page_size': page_size}
response = requests.get(url, headers=headers, params=params)
data = response.json()
print(f"Total tasks: {data['count']}")
for task in data['data']:
print(f"Task {task['task_id']}: {task['status']}")
return data['data']
# Example usage
get_tasks_by_space('your-space-token', page=1, page_size=20)
# Get tasks by space token with pagination
curl -X GET "https://unpod.ai/api/v2/platform/spaces/your-space-token/tasks/?page=1&page_size=20" \
-H "Authorization: Token your-api-token" \
-H "Content-Type: application/json"
Best Practices
- Pagination: Use
pageandpage_sizeparameters for efficient data retrieval in large datasets - Space Token: Ensure you are using a valid space token from your organization
- Error Handling: Always handle potential errors and edge cases
- Status Filtering: Filter tasks by status in your application logic to focus on relevant tasks
- Security: Keep API tokens secure and rotate them regularly
Authorizations
Format: Token
Headers
Organization domain handle
Example:
"unpod.tv"
Path Parameters
Example:
"8KZAMRAHSXXXXXXMAYNASMJC"
Response
List of tasks in the space
Was this page helpful?
⌘I
Get Tasks by Space Token
curl --request GET \
--url https://unpod.ai/api/v2/platform/spaces/{space_token}/tasks/ \
--header 'Authorization: <api-key>' \
--header 'Org-Handle: <org-handle>'import requests
url = "https://unpod.ai/api/v2/platform/spaces/{space_token}/tasks/"
headers = {
"Org-Handle": "<org-handle>",
"Authorization": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Org-Handle': '<org-handle>', Authorization: '<api-key>'}
};
fetch('https://unpod.ai/api/v2/platform/spaces/{space_token}/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://unpod.ai/api/v2/platform/spaces/{space_token}/tasks/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Org-Handle: <org-handle>"
],
]);
$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://unpod.ai/api/v2/platform/spaces/{space_token}/tasks/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Org-Handle", "<org-handle>")
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://unpod.ai/api/v2/platform/spaces/{space_token}/tasks/")
.header("Org-Handle", "<org-handle>")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://unpod.ai/api/v2/platform/spaces/{space_token}/tasks/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Org-Handle"] = '<org-handle>'
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"count": 38,
"status_code": 200,
"message": "Tasks Fetched Successfully",
"data": [
{
"_id": "6a9e50f7066c0e4516a22a07",
"space_id": "593",
"thread_id": "",
"user": "",
"user_org_id": "263",
"user_info": {},
"created": "2026-09-07T05:51:51.607000",
"modified": "2026-09-07T05:54:03.857000",
"task_id": "T3901cb27aa8011f1a814c5566158eaa5",
"run_id": "R3901cb26aa8011f1a814c5566158eaa5",
"collection_ref": "collection_data_EK6PB1ZXX1FT2TB8FNZPE39V",
"task": {},
"input": {
"contact_number": "+918109687225",
"quality": "good",
"name": "",
"token": "EK6PB1ZXX1FT2TB8FNZPE39V",
"space_token": "EK6PB1ZXX1FT2TB8FNZPE39V",
"org_id": 263,
"missing_space_context": false
},
"output": {
"call_type": "inbound",
"call_status": "connected",
"call_end_reason": "USER_HUNG_UP_IN_CALL"
},
"attachments": [],
"assignee": "sarvdhan-used-vehicle-finance-and-secured-loans-assistant-6kj8v0siouhg",
"status": "in_progress",
"execution_type": "call",
"ref_id": "6a88371afc539da073151bec",
"failure_count": 0,
"last_failure_reason": null,
"provider": null,
"retry_attempt": 0,
"referenced_task": null,
"follow_up_count": null,
"follow_up_chain_id": null,
"last_status_change": "2026-09-07T05:51:51.606885",
"scheduled_timestamp": null
},
{
"_id": "6a9e4ffa0d0f156912b9047b",
"space_id": "593",
"thread_id": "",
"user": "",
"user_org_id": "263",
"user_info": {},
"created": "2026-09-07T05:47:38.682000",
"modified": "2026-09-07T05:51:28.673000",
"task_id": "Ta25dc889aa7f11f1a814c5566158eaa5",
"run_id": "Ra25dc888aa7f11f1a814c5566158eaa5",
"collection_ref": "collection_data_EK6PB1ZXX1FT2TB8FNZPE39V",
"task": {},
"input": {
"contact_number": "+918109687225",
"quality": "good",
"name": "",
"token": "EK6PB1ZXX1FT2TB8FNZPE39V",
"space_token": "EK6PB1ZXX1FT2TB8FNZPE39V",
"org_id": 263,
"missing_space_context": false
},
"output": {
"call_id": "SarvDhan Bridge_08109687225_jC8KHDuwGuBi",
"customer": "",
"contact_number": "+918109687225",
"call_end_reason": "BLOCKED_USER",
"recording_url": null,
"transcript": [],
"start_time": "2026-09-07T05:47:39.119969",
"end_time": "2026-09-07T05:47:39.119980",
"assistant_number": "+918071539260",
"call_summary": null,
"duration": 0,
"cost": 0.0,
"post_call_data": {
"schema_version": 2,
"analytics": {
"sentiment": null,
"engagement": null,
"tone": null,
"contact_status": "active",
"outcome": "NotConnected",
"call_score": null,
"call_score_breakdown": null
},
"summary": {
"headline": null,
"key_points": []
},
"lead": {
"name": null,
"labels": [],
"objections": [],
"pain_points": [],
"questions_asked": []
},
"structured_data": {
"outcome": null,
"payment_release_choice": null
},
"next_action": {
"label": [],
"callback_requested": false,
"scheduled_at": null
},
"follow_up": {
"required": true,
"state": "skipped_inbound_call",
"reason": "not-connected retry",
"next_at": null,
"attempt": 1,
"attempts_remaining": 2,
"policy": {
"max_call_attempts": 3,
"max_followup_attempts": 2,
"daily_limit": 3,
"next_call_attempt_number": 2
}
},
"evaluation": null,
"call_evaluation": null,
"redial": {
"status": null
},
"skipped": [
{
"stage": "call_evaluation",
"reason": "policy:disabled_in_config"
},
{
"stage": "critic",
"reason": "no_invariant_violations"
}
],
"post_call_usage": {
"thread_id": "Ta25dc889aa7f11f1a814c5566158eaa5",
"room_name": "",
"agent_id": "sarvdhan-used-vehicle-finance-and-secured-loans-assistant-6kj8v0siouhg",
"org_id": null,
"space_token": null,
"call_start": "2026-09-07T05:51:28.326798Z",
"call_end": "2026-09-07T05:51:28.326798Z",
"call_duration_s": "0.00",
"providers": {
"llm_provider": "Unpod",
"llm_model": "google/gemma-4-31b-it",
"stt_provider": "soniox",
"stt_model": "stt-rt-v5",
"tts_provider": "cartesia",
"tts_model": "sonic-3.5"
},
"raw_counters": {
"llm_prompt_tokens": "1508",
"llm_completion_tokens": "127",
"llm_cached_tokens": "0",
"tts_characters_count": "0",
"stt_audio_duration": "0"
},
"sku_deltas": [
{
"codename": "llm.unpod.google/gemma_4_31b_it.input",
"raw": "1508",
"unit_scale": "1"
},
{
"codename": "llm.unpod.google/gemma_4_31b_it.output",
"raw": "127",
"unit_scale": "1"
}
]
}
},
"metadata": {
"cost": 0.0,
"type": "",
"usage": {}
},
"call_type": "inbound",
"call_status": "failed"
},
"attachments": [],
"assignee": "sarvdhan-used-vehicle-finance-and-secured-loans-assistant-6kj8v0siouhg",
"status": "completed",
"execution_type": "call",
"ref_id": "6a88371afc539da073151bec",
"failure_count": 0,
"last_failure_reason": null,
"provider": null,
"retry_attempt": 0,
"referenced_task": null,
"follow_up_count": null,
"follow_up_chain_id": null,
"last_status_change": "2026-09-07T05:47:38.682017",
"scheduled_timestamp": null
}
]
}
{
"count": 45,
"status_code": 200,
"message": "Tasks Fetched Successfully",
"data": [
{
"_id": "697debb84c27faa892bfa0cc",
"thread_id": "thread_9xkL2mQpR7vNwY4sZ3cJ8hF1",
"user_info": {
"email": "user@example.com",
"full_name": "John Doe"
},
"task_id": "T8ff2ccdffe9a11f0878d43cd8a99e069",
"run_id": "R8ff2ccdefe9a11f0878d43cd8a99e069",
"task": {
"objective": "Call the lead and discuss the project requirements."
},
"input": {
"name": "John Doe",
"contact_number": "1234567890",
"email": "john@example.com",
"context": "Follow up on proposal"
},
"output": {
"call_id": "CALL_7dAb3kR9mXvQ2pLw",
"start_time": "2026-02-07T05:57:45Z",
"end_time": "2026-02-07T06:02:30Z",
"duration": 285,
"recording_url": "https://cdn.unpod.ai/recordings/CALL_7dAb3kR9mXvQ2pLw.mp3",
"transcript": [
{
"role": "agent",
"content": "Hello, this is an AI assistant calling on behalf of Unpod. Am I speaking with John Doe?"
},
{
"role": "user",
"content": "Yes, this is John."
}
],
"post_call_data": {
"summary": "The agent successfully connected with John Doe and discussed project requirements.",
"outcome": "interested",
"sentiment": "positive"
},
"call_type": "outbound",
"call_status": "completed"
},
"assignee": "space-agent-8qmk42nslp91wrh3dz7btxc4",
"status": "completed",
"execution_type": "call",
"run_mode": "prod",
"created": "2026-02-07T05:57:45Z",
"modified": "2026-02-07T06:02:35Z"
}
]
}
{
"message": "Error fetching tasks",
"errors": "Detailed error description"
}