> ## Documentation Index
> Fetch the complete documentation index at: https://docs.unpod.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Tasks by Agent Handle

> Retrieve all tasks assigned to a specific agent using its handle

<ResponseExample>
  ```json Success Response (200) v2 theme={null}
  {
    "count": 38,
    "status_code": 200,
    "message": "Tasks Fetched Successfully",
    "data": [
      {
        "_id": "697debb84c27faa892bfa0cd",
        "space_id": "42",
        "thread_id": "",
        "user": "",
        "user_org_id": "101",
        "user_info": {},
        "created": "2026-02-07T05:51:51.607000",
        "modified": "2026-02-07T05:54:03.857000",
        "task_id": "T1a2b3c4dfe9a11f0878d43cd8a99e069",
        "run_id": "R1a2b3c4cfe9a11f0878d43cd8a99e069",
        "collection_ref": "collection_data_SPTKN4XQ7M2VB9YH3KD8WZ1L",
        "task": {},
        "input": {
          "contact_number": "+911234567890",
          "quality": "good",
          "name": "",
          "token": "SPTKN4XQ7M2VB9YH3KD8WZ1L",
          "space_token": "SPTKN4XQ7M2VB9YH3KD8WZ1L",
          "org_id": 101,
          "missing_space_context": false
        },
        "output": {
          "call_type": "inbound",
          "call_status": "connected",
          "call_end_reason": "USER_HUNG_UP_IN_CALL"
        },
        "attachments": [],
        "assignee": "space-agent-8qmk42nslp91wrh3dz7btxc4",
        "status": "in_progress",
        "execution_type": "call",
        "ref_id": "6902fb5840a736e125e80ebc",
        "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-02-07T05:51:51.606885",
        "scheduled_timestamp": null
      },
      {
        "_id": "697debb84c27faa892bfa0ce",
        "space_id": "42",
        "thread_id": "",
        "user": "",
        "user_org_id": "101",
        "user_info": {},
        "created": "2026-02-07T05:47:38.682000",
        "modified": "2026-02-07T05:51:28.673000",
        "task_id": "T5e6f7a8bfe9a11f0878d43cd8a99e069",
        "run_id": "R5e6f7a8afe9a11f0878d43cd8a99e069",
        "collection_ref": "collection_data_SPTKN4XQ7M2VB9YH3KD8WZ1L",
        "task": {},
        "input": {
          "contact_number": "+911234567890",
          "quality": "good",
          "name": "",
          "token": "SPTKN4XQ7M2VB9YH3KD8WZ1L",
          "space_token": "SPTKN4XQ7M2VB9YH3KD8WZ1L",
          "org_id": 101,
          "missing_space_context": false
        },
        "output": {
          "call_id": "Unpod Bridge_1234567890_jC8KHDuwGuBi",
          "customer": "",
          "contact_number": "+911234567890",
          "call_end_reason": "BLOCKED_USER",
          "recording_url": null,
          "transcript": [],
          "start_time": "2026-02-07T05:47:39.119969",
          "end_time": "2026-02-07T05:47:39.119980",
          "assistant_number": "+919876543210",
          "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": "T5e6f7a8bfe9a11f0878d43cd8a99e069",
              "room_name": "",
              "agent_id": "space-agent-8qmk42nslp91wrh3dz7btxc4",
              "org_id": null,
              "space_token": null,
              "call_start": "2026-02-07T05:51:28.326798Z",
              "call_end": "2026-02-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": "space-agent-8qmk42nslp91wrh3dz7btxc4",
        "status": "completed",
        "execution_type": "call",
        "ref_id": "6902fb5840a736e125e80ebc",
        "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-02-07T05:47:38.682017",
        "scheduled_timestamp": null
      }
    ]
  }
  ```

  ```json Success Response (200) v1 theme={null}
  {
    "count": 1,
    "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",
          "call_end_reason": "caller_hangup",
          "start_time": "2026-02-07T05:57:45Z",
          "end_time": "2026-02-07T06:02:30Z",
          "assistant_number": "+911234567890",
          "call_summary": "The agent successfully connected with John Doe and discussed project requirements. Lead expressed interest.",
          "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"
        },
        "attachments": [],
        "assignee": "space-agent-8qmk42nslp91wrh3dz7btxc4",
        "status": "completed",
        "execution_type": "call",
        "ref_id": "6902fb5840a736e125e80ebc",
        "failure_count": 0,
        "last_failure_reason": null,
        "retry_attempt": 0,
        "last_status_change": "2026-02-07T06:02:35Z",
        "scheduled_timestamp": null
      }
    ]
  }
  ```

  ```json Error Response (404) theme={null}
  {
    "message": "Agent not found"
  }
  ```
</ResponseExample>

# Get Tasks by Agent Handle

Fetch all tasks assigned to a specific agent/pilot using their handle. This returns full task metadata including user info, input payloads, call output, transcripts, and execution details.

<Note>
  **Prerequisites:** Make sure you have your API Token ready. See [Authentication](/api/get-started/authentication) for details.
</Note>

<Note>
  **Response versions:** the examples panel has two tabs. **v1** is the original legacy payload. **v2** is the current payload this endpoint returns — same envelope (`count`, `status_code`, `message`, `data`), but each task object carries extra fields and `output.post_call_data` uses `schema_version: 2`. Build new integrations against v2 and read `post_call_data.schema_version` before parsing analytics.
</Note>

### Path Parameters

| Name          | Type   | Required | Description                           |
| ------------- | ------ | -------- | ------------------------------------- |
| agent\_handle | string | Yes      | Unique handle/identifier of the agent |

<Note>
  You can get the `agent_handle` by hitting the [Get All Agents](/api/agent/get-all-agents) API. The `handle` field in the response is your Agent Handle.
</Note>

### Query Parameters

| Name       | Type    | Required | Description                                    |
| ---------- | ------- | -------- | ---------------------------------------------- |
| page       | integer | No       | Page number to fetch, 1-based. Defaults to `1` |
| page\_size | integer | No       | Tasks per page. Defaults to `20`               |

<Note>
  `count` is the **total** number of tasks for the agent, not the size of the current page — `data` holds at most `page_size` items. Page through until you have collected `count` tasks.
</Note>

### 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                 |
| attachments           | array   | List of attachments                           |
| assignee              | string  | Agent handle assigned to the task             |
| status                | string  | Task status: `pending`, `completed`, `failed` |
| execution\_type       | string  | Type of execution: `call`, `email`, etc.      |
| ref\_id               | string  | Reference ID linking to input data            |
| failure\_count        | integer | Number of failed attempts                     |
| last\_failure\_reason | string  | Reason for last failure (null if none)        |
| retry\_attempt        | integer | Current retry attempt number                  |
| last\_status\_change  | string  | Timestamp of last status change               |
| scheduled\_timestamp  | string  | Scheduled execution timestamp (null if now)   |

### Task Object Fields — v2 Additions

Present in v2 responses only. `status` also gains the `in_progress` value.

| Field                 | Type            | Description                                                         |
| --------------------- | --------------- | ------------------------------------------------------------------- |
| space\_id             | string          | Numeric id of the space the task belongs to                         |
| user                  | string          | User identifier that triggered the task (empty for inbound calls)   |
| user\_org\_id         | string          | Numeric id of the owning organisation                               |
| created               | string          | Task creation timestamp                                             |
| modified              | string          | Timestamp of the last write to the task document                    |
| collection\_ref       | string          | Collection holding the source rows: `collection_data_<space_token>` |
| provider              | string \| null  | Telephony provider used for the call (null if not resolved yet)     |
| referenced\_task      | string \| null  | `task_id` this task was spawned from (follow-ups, retries)          |
| follow\_up\_count     | integer \| null | Number of follow-up tasks created off this task                     |
| follow\_up\_chain\_id | string \| null  | Groups a task and all of its follow-ups into one chain              |

<Note>
  `user_info` and `task` are objects in both versions, but in v2 they come back empty (`{}`) for calls not created from a lead payload with an objective. Do not assume `task.objective` exists.
</Note>

### Output Object Fields

| Field             | Type   | Description                              |
| ----------------- | ------ | ---------------------------------------- |
| call\_id          | string | Unique call identifier                   |
| call\_end\_reason | string | Reason for call ending                   |
| start\_time       | string | Call start timestamp                     |
| end\_time         | string | Call end timestamp                       |
| assistant\_number | string | Outbound phone number used               |
| call\_summary     | string | AI-generated summary of the call         |
| duration          | number | Call duration in seconds                 |
| recording\_url    | string | URL to call recording                    |
| transcript        | array  | Array of conversation messages           |
| post\_call\_data  | object | Post-call analysis data                  |
| call\_type        | string | Direction of call: `outbound`, `inbound` |
| call\_status      | string | Status of the call: `completed`, etc.    |

<Note>
  `output` is only fully populated once the call finishes. While `status` is `in_progress`, v2 returns a partial `output` with just `call_type`, `call_status` and `call_end_reason`.
</Note>

### Output Object Fields — v2 Additions

| Field           | Type   | Description                                            |
| --------------- | ------ | ------------------------------------------------------ |
| customer        | string | Customer name resolved for the call (empty if unknown) |
| contact\_number | string | Number dialled, or that dialled in, in E.164           |
| cost            | number | Billed cost of the call                                |
| metadata        | object | `cost`, `type` and a `usage` map for the call          |

### post\_call\_data — v2 (`schema_version: 2`)

In v1 `post_call_data` was a flat `{summary, outcome, sentiment}` object. In v2 it is grouped:

| Field             | Type           | Description                                                                                          |
| ----------------- | -------------- | ---------------------------------------------------------------------------------------------------- |
| schema\_version   | integer        | Always `2` for this shape. Branch on this field                                                      |
| analytics         | object         | `sentiment`, `engagement`, `tone`, `contact_status`, `outcome`, `call_score`, `call_score_breakdown` |
| summary           | object         | `headline` plus a `key_points` array                                                                 |
| lead              | object         | `name`, `labels`, `objections`, `pain_points`, `questions_asked`                                     |
| structured\_data  | object         | Playbook-defined extraction fields — keys vary per agent                                             |
| next\_action      | object         | `label`, `callback_requested`, `scheduled_at`                                                        |
| follow\_up        | object         | `required`, `state`, `reason`, `next_at`, `attempt`, `attempts_remaining`, `policy`                  |
| evaluation        | object \| null | Playbook evaluation result (null when disabled)                                                      |
| call\_evaluation  | object \| null | Call-quality evaluation result (null when disabled)                                                  |
| redial            | object         | `status` of an automatic redial                                                                      |
| skipped           | array          | Post-call stages that did not run, each `{stage, reason}`                                            |
| post\_call\_usage | object         | Provider and token usage for billing — see below                                                     |

#### follow\_up.policy

| Field                       | Type    | Description                                 |
| --------------------------- | ------- | ------------------------------------------- |
| max\_call\_attempts         | integer | Total call attempts allowed for the contact |
| max\_followup\_attempts     | integer | Follow-up attempts allowed after a connect  |
| daily\_limit                | integer | Attempts allowed per day                    |
| next\_call\_attempt\_number | integer | Attempt number the next call will use       |

#### post\_call\_usage

| Field             | Type           | Description                                                                           |
| ----------------- | -------------- | ------------------------------------------------------------------------------------- |
| thread\_id        | string         | Thread the call ran on — matches `task_id`                                            |
| room\_name        | string         | Media room name (empty for calls that never connected)                                |
| agent\_id         | string         | Agent handle that served the call                                                     |
| org\_id           | string \| null | Organisation id resolved at billing time                                              |
| space\_token      | string \| null | Space token resolved at billing time                                                  |
| call\_start       | string         | Billing window start                                                                  |
| call\_end         | string         | Billing window end                                                                    |
| call\_duration\_s | string         | Billed duration in seconds, sent as a string                                          |
| providers         | object         | `llm_provider`, `llm_model`, `stt_provider`, `stt_model`, `tts_provider`, `tts_model` |
| raw\_counters     | object         | Raw meters: LLM prompt/completion/cached tokens, TTS characters, STT audio duration   |
| sku\_deltas       | array          | Billable units, each `{codename, raw, unit_scale}` — all values are strings           |

<Warning>
  Every numeric value under `post_call_usage` (`call_duration_s`, `raw_counters`, `sku_deltas`) is a **string**, not a number. Cast before doing arithmetic.
</Warning>

## 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 - Agent not found                     |
| 500         | Internal Server Error - Server-side error       |

## Code Examples

<CodeGroup>
  ```javascript Node.js theme={null}
  const axios = require('axios');

  const headers = {
    'Authorization': 'Token your-api-token',
    'Content-Type': 'application/json'
  };

  // Get tasks by agent handle
  const getTasksByAgentHandle = async (agentHandle) => {
    const response = await axios.get(
      `https://unpod.ai/api/v2/platform/agents/${agentHandle}/tasks/`,
      { headers }
    );
    console.log(`Total tasks: ${response.data.count}`);
    response.data.data.forEach(task => {
      console.log(`Task ${task.task_id}: ${task.status} (${task.execution_type})`);
    });
    return response.data.data;
  };

  // Example usage
  getTasksByAgentHandle('space-agent-8qmk42nslp91wrh3dz7btxc4');
  ```

  ```python Python theme={null}
  import requests

  headers = {
      'Authorization': 'Token your-api-token',
      'Content-Type': 'application/json'
  }

  def get_tasks_by_agent_handle(agent_handle: str):
      """Get all tasks assigned to a specific agent"""
      url = f'https://unpod.ai/api/v2/platform/agents/{agent_handle}/tasks/'
      response = requests.get(url, headers=headers)
      data = response.json()
      print(f"Total tasks: {data['count']}")
      for task in data['data']:
          print(f"Task {task['task_id']}: {task['status']} ({task['execution_type']})")
      return data['data']

  # Example usage
  get_tasks_by_agent_handle('space-agent-8qmk42nslp91wrh3dz7btxc4')
  ```

  ```bash cURL theme={null}
  # Get tasks by agent handle
  curl -X GET "https://unpod.ai/api/v2/platform/agents/space-agent-8qmk42nslp91wrh3dz7btxc4/tasks/" \
    -H "Authorization: Token your-api-token" \
    -H "Content-Type: application/json"
  ```
</CodeGroup>

## Best Practices

1. **Agent Handle**: Use the exact agent handle from the [Get All Agents](/api/agent/get-all-agents) response
2. **Transcript Analysis**: Use the `transcript` field in the output for detailed conversation analysis
3. **Retry Logic**: Check `failure_count` and `last_failure_reason` for failed tasks to understand issues
4. **Recording Access**: Store `recording_url` from output for compliance and quality review
5. **Security**: Keep API tokens secure and rotate them regularly


## OpenAPI

````yaml GET /api/v2/platform/agents/{agent_handle}/tasks/
openapi: 3.0.3
info:
  title: Unpod API
  description: REST API for Unpod Voice AI Platform
  version: 2.0.0
servers:
  - url: https://unpod.ai/
    description: QA
  - url: https://unpod.ai/
    description: Production
security: []
tags:
  - name: Organisation
  - name: Spaces
  - name: Agents
  - name: Tasks
  - name: Runs
  - name: Call Logs
  - name: Analytics
  - name: Providers
  - name: Bridges
  - name: Numbers
  - name: Trunks
  - name: Telephony
  - name: Billing
paths:
  /api/v2/platform/agents/{agent_handle}/tasks/:
    get:
      tags:
        - Agents
      summary: Get Tasks by Agent Handle
      operationId: getTasksByAgentHandle
      parameters:
        - name: agent_handle
          in: path
          required: true
          schema:
            type: string
            example: space-agent-8qmk42nslp91wrh3dz7btxc4
        - name: page
          in: query
          schema:
            type: integer
            example: 1
        - name: page_size
          in: query
          schema:
            type: integer
            example: 20
        - $ref: '#/components/parameters/OrgHandle'
      responses:
        '200':
          description: List of tasks for the agent
          content:
            application/json:
              examples:
                v1:
                  summary: Legacy response (v1)
                  value:
                    count: 1
                    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
                          call_end_reason: caller_hangup
                          start_time: '2026-02-07T05:57:45Z'
                          end_time: '2026-02-07T06:02:30Z'
                          assistant_number: '+911234567890'
                          call_summary: >-
                            The agent successfully connected with John Doe and
                            discussed project requirements.
                          duration: 285
                          recording_url: >-
                            https://cdn.unpod.dev/recordings/CALL_7dAb3kR9mXvQ2pLw.mp3
                          transcript:
                            - role: agent
                              content: >-
                                Hello, this is an AI assistant. Am I speaking
                                with John Doe?
                            - role: user
                              content: Yes, this is John.
                          post_call_data:
                            summary: >-
                              Agent connected with John Doe and discussed
                              project requirements.
                            outcome: interested
                            sentiment: positive
                          call_type: outbound
                          call_status: completed
                        attachments: []
                        assignee: space-agent-8qmk42nslp91wrh3dz7btxc4
                        status: completed
                        execution_type: call
                        ref_id: 6902fb5840a736e125e80ebc
                        failure_count: 0
                        last_failure_reason: null
                        retry_attempt: 0
                        last_status_change: '2026-02-07T06:02:35Z'
                        scheduled_timestamp: null
                v2:
                  summary: >-
                    Current response (v2) - grouped post_call_data,
                    schema_version 2
                  value:
                    count: 38
                    status_code: 200
                    message: Tasks Fetched Successfully
                    data:
                      - _id: 697debb84c27faa892bfa0cd
                        space_id: '42'
                        thread_id: ''
                        user: ''
                        user_org_id: '101'
                        user_info: {}
                        created: '2026-02-07T05:51:51.607000'
                        modified: '2026-02-07T05:54:03.857000'
                        task_id: T1a2b3c4dfe9a11f0878d43cd8a99e069
                        run_id: R1a2b3c4cfe9a11f0878d43cd8a99e069
                        collection_ref: collection_data_SPTKN4XQ7M2VB9YH3KD8WZ1L
                        task: {}
                        input:
                          contact_number: '+911234567890'
                          quality: good
                          name: ''
                          token: SPTKN4XQ7M2VB9YH3KD8WZ1L
                          space_token: SPTKN4XQ7M2VB9YH3KD8WZ1L
                          org_id: 101
                          missing_space_context: false
                        output:
                          call_type: inbound
                          call_status: connected
                          call_end_reason: USER_HUNG_UP_IN_CALL
                        attachments: []
                        assignee: space-agent-8qmk42nslp91wrh3dz7btxc4
                        status: in_progress
                        execution_type: call
                        ref_id: 6902fb5840a736e125e80ebc
                        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-02-07T05:51:51.606885'
                        scheduled_timestamp: null
                      - _id: 697debb84c27faa892bfa0ce
                        space_id: '42'
                        thread_id: ''
                        user: ''
                        user_org_id: '101'
                        user_info: {}
                        created: '2026-02-07T05:47:38.682000'
                        modified: '2026-02-07T05:51:28.673000'
                        task_id: T5e6f7a8bfe9a11f0878d43cd8a99e069
                        run_id: R5e6f7a8afe9a11f0878d43cd8a99e069
                        collection_ref: collection_data_SPTKN4XQ7M2VB9YH3KD8WZ1L
                        task: {}
                        input:
                          contact_number: '+911234567890'
                          quality: good
                          name: ''
                          token: SPTKN4XQ7M2VB9YH3KD8WZ1L
                          space_token: SPTKN4XQ7M2VB9YH3KD8WZ1L
                          org_id: 101
                          missing_space_context: false
                        output:
                          call_id: Unpod Bridge_1234567890_jC8KHDuwGuBi
                          customer: ''
                          contact_number: '+911234567890'
                          call_end_reason: BLOCKED_USER
                          recording_url: null
                          transcript: []
                          start_time: '2026-02-07T05:47:39.119969'
                          end_time: '2026-02-07T05:47:39.119980'
                          assistant_number: '+919876543210'
                          call_summary: null
                          duration: 0
                          cost: 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: T5e6f7a8bfe9a11f0878d43cd8a99e069
                              room_name: ''
                              agent_id: space-agent-8qmk42nslp91wrh3dz7btxc4
                              org_id: null
                              space_token: null
                              call_start: '2026-02-07T05:51:28.326798Z'
                              call_end: '2026-02-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
                            type: ''
                            usage: {}
                          call_type: inbound
                          call_status: failed
                        attachments: []
                        assignee: space-agent-8qmk42nslp91wrh3dz7btxc4
                        status: completed
                        execution_type: call
                        ref_id: 6902fb5840a736e125e80ebc
                        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-02-07T05:47:38.682017'
                        scheduled_timestamp: null
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - TokenAuth: []
components:
  parameters:
    OrgHandle:
      name: Org-Handle
      in: header
      required: true
      schema:
        type: string
        example: unpod.tv
      description: Organization domain handle
  responses:
    Unauthorized:
      description: Unauthorized - Invalid or missing API token
      content:
        application/json:
          example:
            status_code: 401
            message: Authentication credentials were not provided.
    NotFound:
      description: Resource not found
      content:
        application/json:
          example:
            status_code: 404
            message: Not found.
  securitySchemes:
    TokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'Format: Token <your-api-key>'

````