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

# List tasks

> Returns a list of tasks. Uses cursor pagination.



## OpenAPI

````yaml /api-reference/openapi.json get /tasks
openapi: 3.1.0
info:
  title: Spott API Reference
  version: '0.1'
servers:
  - url: https://api.gospott.com
security: []
tags: []
paths:
  /tasks:
    get:
      tags:
        - Tasks
      summary: List tasks
      description: Returns a list of tasks. Uses cursor pagination.
      operationId: getTasks
      parameters:
        - name: limit
          required: false
          in: query
          description: 'Number of tasks to return per page (min: 1, max: 50, default: 25).'
          schema:
            minimum: 1
            maximum: 50
            default: 25
            example: 25
            type: integer
        - name: cursor
          required: false
          in: query
          description: >-
            Base64-encoded cursor for pagination. Use the nextCursor value from
            a previous response to fetch the next page. Omit for the first page.
          schema:
            type: string
        - name: modifiedSince
          required: false
          in: query
          description: >-
            Filter tasks modified on or after this date. Useful for incremental
            synchronization. Defaults to beginning of time if not provided.
          schema:
            $ref: '#/components/schemas/DateISO'
            default: '1970-01-01T00:00:00.000Z'
            example: '2024-11-01T00:00:00.000Z'
        - name: modifiedUntil
          required: false
          in: query
          description: >-
            Filter tasks modified on or before this date. Useful for bounded
            synchronization snapshots. If omitted, no upper bound is applied.
          schema:
            $ref: '#/components/schemas/DateISO'
            example: '2024-11-30T23:59:59.999Z'
        - name: candidateIds
          required: false
          in: query
          description: >-
            Filter tasks linked to any of these candidates. Provide 1 to 10
            items.
          schema:
            minItems: 1
            maxItems: 10
            example:
              - candidate-123
              - candidate-456
            type: array
            items:
              type: string
        - name: clientContactIds
          required: false
          in: query
          description: >-
            Filter tasks linked to any of these client contacts. Provide 1 to 10
            items.
          schema:
            minItems: 1
            maxItems: 10
            example:
              - client-contact-123
              - client-contact-456
            type: array
            items:
              type: string
        - name: vacancyIds
          required: false
          in: query
          description: Filter tasks linked to any of these jobs. Provide 1 to 10 items.
          schema:
            minItems: 1
            maxItems: 10
            example:
              - job-123
              - job-456
            type: array
            items:
              type: string
        - name: companyIds
          required: false
          in: query
          description: >-
            Filter tasks linked to any of these companies. Provide 1 to 10
            items.
          schema:
            minItems: 1
            maxItems: 10
            example:
              - company-123
              - company-456
            type: array
            items:
              type: string
        - name: opportunityIds
          required: false
          in: query
          description: >-
            Filter tasks linked to any of these opportunities. Provide 1 to 10
            items.
          schema:
            minItems: 1
            maxItems: 10
            example:
              - opportunity-123
              - opportunity-456
            type: array
            items:
              type: string
        - name: sources
          required: false
          in: query
          description: Filter tasks by source. Provide 1 to 10 items.
          schema:
            minItems: 1
            maxItems: 10
            example:
              - MANUAL
              - AUTOMATION
            type: array
            items:
              type: string
              enum:
                - MANUAL
                - AI_SUGGESTION
                - OUTREACH_SEQUENCE_STEP
                - AUTOMATION
        - name: labelIds
          required: false
          in: query
          description: >-
            Filter tasks that have any of the given label IDs. Provide 1 to 10
            items.
          schema:
            minItems: 1
            maxItems: 10
            example:
              - label-123
              - label-456
            type: array
            items:
              type: string
      responses:
        '200':
          description: >-
            Successfully retrieved tasks. Returns items array with pagination
            info containing cursor for the next page.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetTasksResponseDto'
        '400':
          description: >-
            Bad request - invalid query parameters (e.g., limit out of range,
            invalid date format)
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ExceptionBaseDto'
                  - type: object
                    properties:
                      statusCode:
                        type: number
                        example: 400
                      message:
                        type: string
                        example: Limit must be between 1 and 50
                      error:
                        type: string
                        example: Bad Request
        '401':
          description: Unauthorized - invalid or missing authentication
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExceptionBaseDto'
        '500':
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExceptionBaseDto'
      security:
        - x-api-key: []
components:
  schemas:
    DateISO:
      id: DateISO
      format: date-time
      anyOf:
        - type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        - type: string
          format: date
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
    GetTasksResponseDto:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/GetTaskDto'
        pageInfo:
          $ref: '#/components/schemas/CursorPageInfoDto'
      required:
        - items
        - pageInfo
      id: PrivateGetTasksResponseDto
    ExceptionBaseDto:
      type: object
      properties:
        status:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        message:
          type: string
        requestId:
          type: string
      required:
        - status
        - message
        - requestId
      id: ExceptionBaseDto
    GetTaskDto:
      type: object
      properties:
        id:
          type: string
        content:
          type: string
        dueDate:
          anyOf:
            - $ref: '#/components/schemas/DateISO'
            - type: 'null'
        isCompleted:
          type: boolean
        completedAt:
          anyOf:
            - $ref: '#/components/schemas/DateISO'
            - type: 'null'
        createdAt:
          $ref: '#/components/schemas/DateISO'
        createdBy:
          anyOf:
            - $ref: '#/components/schemas/UserBadgeDto'
            - type: 'null'
          description: >-
            The user who created the task, or null if the task was created by
            the system.
        assignedTo:
          anyOf:
            - $ref: '#/components/schemas/UserBadgeDto'
            - type: 'null'
          description: The user assigned to complete the task, or null if unassigned.
        source:
          type: string
          enum:
            - MANUAL
            - AI_SUGGESTION
            - OUTREACH_SEQUENCE_STEP
            - AUTOMATION
        metadata:
          anyOf:
            - $ref: '#/components/schemas/TaskMetadataDto'
            - type: 'null'
        labels:
          type: array
          items:
            $ref: '#/components/schemas/TaskLabelDto'
        links:
          $ref: '#/components/schemas/GetTaskLinksDto'
          description: Linked entity IDs grouped by entity type.
      required:
        - id
        - content
        - dueDate
        - isCompleted
        - completedAt
        - createdAt
        - createdBy
        - assignedTo
        - source
        - metadata
        - labels
        - links
      id: PrivateGetTaskDto
    CursorPageInfoDto:
      type: object
      properties:
        nextCursor:
          anyOf:
            - type: string
            - type: 'null'
          deprecated: true
          description: 'Deprecated: use pagination.cursor instead.'
        hasNextPage:
          type: boolean
          deprecated: true
          description: 'Deprecated: use the presence of pagination.cursor instead.'
      required:
        - nextCursor
        - hasNextPage
      id: CursorPageInfoDto
    UserBadgeDto:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        avatarUrl:
          anyOf:
            - type: string
            - type: 'null'
        deactivatedAt:
          anyOf:
            - $ref: '#/components/schemas/DateISO'
            - type: 'null'
      required:
        - id
        - name
        - avatarUrl
        - deactivatedAt
      id: PrivateUserBadgeDto
    TaskMetadataDto:
      oneOf:
        - $ref: '#/components/schemas/GenericTaskMetadataDto'
        - $ref: '#/components/schemas/PhoneCallTaskMetadataDto'
        - $ref: '#/components/schemas/LinkedInConnectionRequestTaskMetadataDto'
        - $ref: '#/components/schemas/LinkedInMessageTaskMetadataDto'
        - $ref: '#/components/schemas/WhatsAppMessageTaskMetadataDto'
      id: PrivateTaskMetadataDto
    TaskLabelDto:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        colorHex:
          type: string
      required:
        - id
        - name
        - colorHex
      id: PrivateTaskLabelDto
    GetTaskLinksDto:
      type: object
      properties:
        candidates:
          type: array
          items:
            $ref: '#/components/schemas/TaskLinkIdDto'
        vacancies:
          type: array
          items:
            $ref: '#/components/schemas/TaskLinkIdDto'
        clients:
          type: array
          items:
            $ref: '#/components/schemas/TaskLinkIdDto'
        users:
          type: array
          items:
            $ref: '#/components/schemas/TaskLinkIdDto'
        teams:
          type: array
          items:
            $ref: '#/components/schemas/TaskLinkIdDto'
        clientContacts:
          type: array
          items:
            $ref: '#/components/schemas/TaskLinkIdDto'
        opportunities:
          type: array
          items:
            $ref: '#/components/schemas/TaskLinkIdDto'
      required:
        - candidates
        - vacancies
        - clients
        - users
        - teams
        - clientContacts
        - opportunities
      id: PrivateGetTaskLinksDto
    GenericTaskMetadataDto:
      type: object
      properties:
        outreachSequenceId:
          type: string
        outreachSequenceName:
          type: string
        outreachSequenceRunId:
          type: string
        type:
          type: string
          enum:
            - GENERIC_TASK
      required:
        - outreachSequenceId
        - outreachSequenceName
        - outreachSequenceRunId
        - type
      id: PrivateGenericTaskMetadataDto
    PhoneCallTaskMetadataDto:
      type: object
      properties:
        outreachSequenceId:
          type: string
        outreachSequenceName:
          type: string
        outreachSequenceRunId:
          type: string
        type:
          type: string
          enum:
            - PHONE_CALL_TASK
        phoneNumber:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - outreachSequenceId
        - outreachSequenceName
        - outreachSequenceRunId
        - type
        - phoneNumber
      id: PrivatePhoneCallTaskMetadataDto
    LinkedInConnectionRequestTaskMetadataDto:
      type: object
      properties:
        outreachSequenceId:
          type: string
        outreachSequenceName:
          type: string
        outreachSequenceRunId:
          type: string
        type:
          type: string
          enum:
            - LINKEDIN_CONNECTION_REQUEST_TASK
        linkedInUrl:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - outreachSequenceId
        - outreachSequenceName
        - outreachSequenceRunId
        - type
        - linkedInUrl
      id: PrivateLinkedInConnectionRequestTaskMetadataDto
    LinkedInMessageTaskMetadataDto:
      type: object
      properties:
        outreachSequenceId:
          type: string
        outreachSequenceName:
          type: string
        outreachSequenceRunId:
          type: string
        type:
          type: string
          enum:
            - LINKEDIN_MESSAGE_TASK
        linkedInUrl:
          anyOf:
            - type: string
            - type: 'null'
        messageBody:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - outreachSequenceId
        - outreachSequenceName
        - outreachSequenceRunId
        - type
        - linkedInUrl
        - messageBody
      id: PrivateLinkedInMessageTaskMetadataDto
    WhatsAppMessageTaskMetadataDto:
      type: object
      properties:
        outreachSequenceId:
          type: string
        outreachSequenceName:
          type: string
        outreachSequenceRunId:
          type: string
        type:
          type: string
          enum:
            - WHATSAPP_MESSAGE_TASK
        phoneNumber:
          anyOf:
            - type: string
            - type: 'null'
        messageBody:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - outreachSequenceId
        - outreachSequenceName
        - outreachSequenceRunId
        - type
        - phoneNumber
        - messageBody
      id: PrivateWhatsAppMessageTaskMetadataDto
    TaskLinkIdDto:
      type: object
      properties:
        id:
          type: string
      required:
        - id
      id: PrivateTaskLinkIdDto
  securitySchemes:
    x-api-key:
      type: apiKey
      name: x-api-key
      in: header
      description: >-
        API key for authentication. Get your API key from Settings → API Keys in
        your Spott dashboard.

````