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

# Fetch a specific task

> Retrieve one Task and all of its attempts. When the Task has an associated room, chatRef links directly to its scoped Vida chat. attemptHistory includes each attempt’s channel, timing, disposition, evaluation, outcomes, experiment assignment, provider reference, voicemail or delivery details, and conversation UUID when available. The Task and each attempt include logsRef; conversationRef links directly to one available communication conversation and transcript.



## OpenAPI

````yaml get /api/v2/tasks/{taskId}
openapi: 3.0.0
info:
  version: 2.0.0
  title: Vida API
  description: Vida API Documentation
servers:
  - url: https://api.vida.dev
    description: Vida Production
    variables:
      baseUrl:
        default: api.vida.dev
        description: Production API Root
security: []
tags:
  - name: Agents
  - name: Inbound Email
    description: Control which senders may create inbound email work for an Agent.
  - name: Features
    description: Inspect capabilities available within an account hierarchy.
  - name: Conversation Logs
    description: Query conversation activity and calculate account-level metrics.
  - name: Computer Agents
    description: Set up, configure, inspect, and manage Vida Computer Agents.
  - name: Computer Agent Sessions
    description: View and reset Computer Agent sessions.
  - name: Accounts
  - name: Agent Templates
    description: Create, manage, and apply reusable Agent configurations.
paths:
  /api/v2/tasks/{taskId}:
    get:
      tags:
        - Tasks
      summary: Fetch a specific task
      description: >-
        Retrieve one Task and all of its attempts. When the Task has an
        associated room, chatRef links directly to its scoped Vida chat.
        attemptHistory includes each attempt’s channel, timing, disposition,
        evaluation, outcomes, experiment assignment, provider reference,
        voicemail or delivery details, and conversation UUID when available. The
        Task and each attempt include logsRef; conversationRef links directly to
        one available communication conversation and transcript.
      parameters:
        - name: taskId
          in: path
          required: true
          schema:
            type: string
          description: Task ID
        - name: targetAccountId
          description: Require the Task to belong to this agent account in the organization
          in: query
          schema:
            type: integer
      responses:
        '200':
          description: Task found
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  task:
                    type: object
                    properties:
                      id:
                        type: string
                        example: task1
                      batchId:
                        type: string
                        example: f52b1e01-5cbc-483c-9939-3bf7d37e1426
                      externalTaskId:
                        type: string
                        example: lead-42
                      type:
                        type: string
                        example: call
                      state:
                        type: string
                        example: finished
                      target:
                        type: string
                        example: '+15551234567'
                      goal:
                        type: object
                        properties:
                          completionCriteria:
                            type: string
                            example: The contact agrees to a meeting
                      retryPolicy:
                        type: object
                        properties:
                          delaysSeconds:
                            type: array
                            example:
                              - 86400
                            items:
                              type: number
                          retryOn:
                            type: array
                            example:
                              - no_answer
                              - goal_incomplete
                            items:
                              type: string
                      attemptHistory:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              example: attempt-id
                            number:
                              type: number
                              example: 1
                            state:
                              type: string
                              example: resolved
                            channel:
                              type: string
                              example: call
                            disposition:
                              type: string
                              example: goal_met
                            scheduledAt:
                              type: number
                              example: 1712345678
                            dispatchedAt:
                              type: number
                              example: 1712345680
                            resolvedAt:
                              type: number
                              example: 1712345900
                            convoUUID:
                              type: string
                              example: conversation-uuid
                            outcomes:
                              type: array
                              items:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    example: task_goal
                                  status:
                                    type: string
                                    example: evaluated
                                  value:
                                    type: boolean
                                    example: true
                                  terminal:
                                    type: boolean
                                    example: true
                            logsRef:
                              type: object
                              properties:
                                taskId:
                                  type: string
                                  example: task1
                                attemptId:
                                  type: string
                                  example: attempt-id
                                href:
                                  type: string
                                  example: >-
                                    /api/v2/tasks/task1/logs?attemptId=attempt-id
                      result:
                        type: object
                        properties:
                          disposition:
                            type: string
                            example: goal_met
                          terminalReason:
                            type: string
                            example: goal_met
                      chatRef:
                        type: object
                        properties:
                          roomId:
                            type: string
                            example: room-id
                          targetAccountId:
                            type: number
                            example: 3026480
                          href:
                            type: string
                            example: /api/v2/messages/room-id?targetAccountId=3026480
                      logsRef:
                        type: object
                        properties:
                          taskId:
                            type: string
                            example: task1
                          href:
                            type: string
                            example: /api/v2/tasks/task1/logs
                xml:
                  name: main
            application/xml:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  task:
                    type: object
                    properties:
                      id:
                        type: string
                        example: task1
                      batchId:
                        type: string
                        example: f52b1e01-5cbc-483c-9939-3bf7d37e1426
                      externalTaskId:
                        type: string
                        example: lead-42
                      type:
                        type: string
                        example: call
                      state:
                        type: string
                        example: finished
                      target:
                        type: string
                        example: '+15551234567'
                      goal:
                        type: object
                        properties:
                          completionCriteria:
                            type: string
                            example: The contact agrees to a meeting
                      retryPolicy:
                        type: object
                        properties:
                          delaysSeconds:
                            type: array
                            example:
                              - 86400
                            items:
                              type: number
                          retryOn:
                            type: array
                            example:
                              - no_answer
                              - goal_incomplete
                            items:
                              type: string
                      attemptHistory:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              example: attempt-id
                            number:
                              type: number
                              example: 1
                            state:
                              type: string
                              example: resolved
                            channel:
                              type: string
                              example: call
                            disposition:
                              type: string
                              example: goal_met
                            scheduledAt:
                              type: number
                              example: 1712345678
                            dispatchedAt:
                              type: number
                              example: 1712345680
                            resolvedAt:
                              type: number
                              example: 1712345900
                            convoUUID:
                              type: string
                              example: conversation-uuid
                            outcomes:
                              type: array
                              items:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    example: task_goal
                                  status:
                                    type: string
                                    example: evaluated
                                  value:
                                    type: boolean
                                    example: true
                                  terminal:
                                    type: boolean
                                    example: true
                            logsRef:
                              type: object
                              properties:
                                taskId:
                                  type: string
                                  example: task1
                                attemptId:
                                  type: string
                                  example: attempt-id
                                href:
                                  type: string
                                  example: >-
                                    /api/v2/tasks/task1/logs?attemptId=attempt-id
                      result:
                        type: object
                        properties:
                          disposition:
                            type: string
                            example: goal_met
                          terminalReason:
                            type: string
                            example: goal_met
                      chatRef:
                        type: object
                        properties:
                          roomId:
                            type: string
                            example: room-id
                          targetAccountId:
                            type: number
                            example: 3026480
                          href:
                            type: string
                            example: /api/v2/messages/room-id?targetAccountId=3026480
                      logsRef:
                        type: object
                        properties:
                          taskId:
                            type: string
                            example: task1
                          href:
                            type: string
                            example: /api/v2/tasks/task1/logs
                xml:
                  name: main
        '401':
          description: Unauthorized
        '403':
          description: Target account is outside the organization
        '404':
          description: Task not found
        '500':
          description: Internal Server Error
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: query
      name: token
      description: Vida API Token

````