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

# Recent task batches

> List recent server-generated submission batches. Single-task batches are excluded unless includeSingles is true.



## OpenAPI

````yaml get /api/v2/tasks/batches
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: []
paths:
  /api/v2/tasks/batches:
    get:
      tags:
        - Tasks
      summary: Recent task batches
      description: >-
        List recent server-generated submission batches. Single-task batches are
        excluded unless includeSingles is true.
      parameters:
        - name: targetAccountId
          description: Scope batches to one agent account in the organization
          in: query
          schema:
            type: integer
        - name: accountId
          description: Exact agent account ID
          in: query
          schema:
            type: integer
        - name: limit
          description: Maximum batches to return (1-100)
          example: 50
          in: query
          schema:
            type: integer
        - name: includeSingles
          description: Include batches containing one task
          example: false
          in: query
          schema:
            type: boolean
      responses:
        '200':
          description: Recent Task batches
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  batches:
                    type: array
                    items:
                      type: object
                      properties:
                        batchId:
                          type: string
                          example: f52b1e01-5cbc-483c-9939-3bf7d37e1426
                        submittedAt:
                          type: number
                          example: 1712345678
                        source:
                          type: string
                          example: api/tasks
                        total:
                          type: number
                          example: 100
                        byState:
                          type: object
                          properties:
                            pending:
                              type: number
                              example: 80
                            finished:
                              type: number
                              example: 20
                xml:
                  name: main
            application/xml:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  batches:
                    type: array
                    items:
                      type: object
                      properties:
                        batchId:
                          type: string
                          example: f52b1e01-5cbc-483c-9939-3bf7d37e1426
                        submittedAt:
                          type: number
                          example: 1712345678
                        source:
                          type: string
                          example: api/tasks
                        total:
                          type: number
                          example: 100
                        byState:
                          type: object
                          properties:
                            pending:
                              type: number
                              example: 80
                            finished:
                              type: number
                              example: 20
                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

````