> ## 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.

# Task statistics

> Get Task counts by state and conversion results for each attempt number.



## OpenAPI

````yaml get /api/v2/tasks/stats
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/stats:
    get:
      tags:
        - Tasks
      summary: Task statistics
      description: Get Task counts by state and conversion results for each attempt number.
      parameters:
        - name: targetAccountId
          description: Scope statistics to one agent account in the organization
          in: query
          schema:
            type: integer
        - name: batchId
          description: Limit counts to one server-generated submission batch UUID
          in: query
          schema:
            type: string
        - name: contactListName
          description: Limit counts to tasks associated with one Contact List
          in: query
          schema:
            type: string
      responses:
        '200':
          description: Stats
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  total:
                    type: number
                    example: 10
                  byState:
                    type: object
                    properties:
                      pending:
                        type: number
                        example: 2
                      running:
                        type: number
                        example: 3
                      finished:
                        type: number
                        example: 5
                  attemptCohortSize:
                    type: number
                    example: 8
                  byAttempt:
                    type: array
                    items:
                      type: object
                      properties:
                        attemptNumber:
                          type: number
                          example: 1
                        reached:
                          type: number
                          example: 8
                        goalMet:
                          type: number
                          example: 2
                        conditionalGoalMetRate:
                          type: number
                          example: 0.25
                        incrementalGoalMetRate:
                          type: number
                          example: 0.25
                        cumulativeGoalMetRate:
                          type: number
                          example: 0.25
                        byChannel:
                          type: object
                          properties:
                            call:
                              type: number
                              example: 8
                        byDisposition:
                          type: object
                          properties:
                            no_answer:
                              type: number
                              example: 6
                            goal_met:
                              type: number
                              example: 2
                        byOutcome:
                          type: object
                          properties:
                            not_evaluated:
                              type: number
                              example: 6
                            goal_met:
                              type: number
                              example: 2
                xml:
                  name: main
            application/xml:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  total:
                    type: number
                    example: 10
                  byState:
                    type: object
                    properties:
                      pending:
                        type: number
                        example: 2
                      running:
                        type: number
                        example: 3
                      finished:
                        type: number
                        example: 5
                  attemptCohortSize:
                    type: number
                    example: 8
                  byAttempt:
                    type: array
                    items:
                      type: object
                      properties:
                        attemptNumber:
                          type: number
                          example: 1
                        reached:
                          type: number
                          example: 8
                        goalMet:
                          type: number
                          example: 2
                        conditionalGoalMetRate:
                          type: number
                          example: 0.25
                        incrementalGoalMetRate:
                          type: number
                          example: 0.25
                        cumulativeGoalMetRate:
                          type: number
                          example: 0.25
                        byChannel:
                          type: object
                          properties:
                            call:
                              type: number
                              example: 8
                        byDisposition:
                          type: object
                          properties:
                            no_answer:
                              type: number
                              example: 6
                            goal_met:
                              type: number
                              example: 2
                        byOutcome:
                          type: object
                          properties:
                            not_evaluated:
                              type: number
                              example: 6
                            goal_met:
                              type: number
                              example: 2
                xml:
                  name: main
        '401':
          description: Unauthorized
        '403':
          description: Target account is outside the organization
        '500':
          description: Internal Server Error
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: query
      name: token
      description: Vida API Token

````