> ## 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 all tasks

> Retrieve Tasks for the current organization. Each retry cadence remains one Task; attemptHistory contains its individual attempts. Exact filters may be combined, and meta.<path> filters nested metadata values.



## OpenAPI

````yaml get /api/v2/tasks
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:
    get:
      tags:
        - Tasks
      summary: Fetch all tasks
      description: >-
        Retrieve Tasks for the current organization. Each retry cadence remains
        one Task; attemptHistory contains its individual attempts. Exact filters
        may be combined, and meta.<path> filters nested metadata values.
      parameters:
        - name: targetAccountId
          description: Scope results to one agent account in the organization
          in: query
          schema:
            type: integer
        - name: limit
          description: Max number of tasks to return (1-1000)
          example: 100
          in: query
          schema:
            type: integer
        - name: offset
          description: Offset for pagination
          example: 0
          in: query
          schema:
            type: integer
        - name: since
          description: Filter by updatedAt >= since (unix seconds)
          example: 1712345678
          in: query
          schema:
            type: integer
        - name: until
          description: Filter by updatedAt <= until (unix seconds)
          example: 1712349999
          in: query
          schema:
            type: integer
        - name: sort
          description: Sort field (createdAt, updatedAt, scheduledFor)
          example: createdAt
          in: query
          schema:
            type: string
        - name: order
          description: Sort order (asc or desc)
          example: desc
          in: query
          schema:
            type: string
        - name: id
          description: Exact Task UUID
          in: query
          schema:
            type: string
        - name: type
          description: Exact Task type
          schema:
            type: string
            enum:
              - call
              - text
              - email
              - ping
              - computer
              - repeating
              - cronOneOff
          in: query
        - name: state
          description: Exact Task state
          schema:
            type: string
            enum:
              - pending
              - processing
              - running
              - finished
              - errored
              - canceled
              - active
              - paused
          in: query
        - name: contactId
          description: Exact Contact ID stored on the Task
          in: query
          schema:
            type: string
        - name: agentId
          description: Exact agent/campaign ID stored on the Task
          in: query
          schema:
            type: string
        - name: convoId
          description: Exact conversation UUID
          in: query
          schema:
            type: string
        - name: room
          description: Exact conversation room ID
          in: query
          schema:
            type: string
        - name: accountId
          description: Exact agent account ID
          in: query
          schema:
            type: integer
        - name: scheduledFor
          description: Exact scheduled Unix timestamp
          in: query
          schema:
            type: integer
        - name: createdAt
          description: Exact created Unix timestamp
          in: query
          schema:
            type: integer
        - name: updatedAt
          description: Exact updated Unix timestamp
          in: query
          schema:
            type: integer
        - name: batchId
          description: Exact server-generated submission batch UUID
          in: query
          schema:
            type: string
        - name: externalTaskId
          description: Exact reusable caller-defined correlation/grouping id
          in: query
          schema:
            type: string
        - name: contactListName
          description: Exact Contact List associated with the task
          in: query
          schema:
            type: string
        - name: meta.source
          description: >-
            Exact metadata match. Replace source with a nested metadata path
            such as meta.crm.leadId.
          example: crm
          in: query
          schema:
            type: string
        - name: outcome
          description: >-
            Task outcome (goal_met, terminal_negative, goal_incomplete, or
            retries_exhausted)
          example: goal_met
          in: query
          schema:
            type: string
        - name: q
          description: Search by phone number, externalTaskId, or task id
          example: '+12025550123'
          in: query
          schema:
            type: string
      responses:
        '200':
          description: List of tasks
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  total:
                    type: number
                    example: 123
                  tasks:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: task1
                        type:
                          type: string
                          example: call
                        state:
                          type: string
                          example: pending
                        target:
                          type: string
                          example: '+15551234567'
                        createdAt:
                          type: number
                          example: 1712345678
                xml:
                  name: main
            application/xml:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  total:
                    type: number
                    example: 123
                  tasks:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: task1
                        type:
                          type: string
                          example: call
                        state:
                          type: string
                          example: pending
                        target:
                          type: string
                          example: '+15551234567'
                        createdAt:
                          type: number
                          example: 1712345678
                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

````