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

# List tasks



## OpenAPI

````yaml /openapi.json get /v1/tasks
openapi: 3.1.0
info:
  title: EnrichLoop API
  version: 0.1.0
  description: |
    Send us a company. We enrich it and send the result back — either to you
    directly, or to a webhook you register (a **Loop**). Built for teams
    enriching data as part of a pipeline: signups, CRM records, lead lists,
    anything that needs a company's firmographic data attached to it.

    ## How it works

    1. You send us something to enrich — a domain or a LinkedIn company URL.
    2. We check whether we already know it. If we do, the task settles
       immediately.
    3. If we don't, we go find it — resolving the domain, locating the
       company's LinkedIn page, and pulling structured data from it — and
       queue the result for you.
    4. You get the result by polling the task, or by registering a Loop and
       having it delivered to your webhook automatically.

    Every enqueue endpoint (`POST /v1/companies/enrich`, `POST
    /v1/loops/{id}/run`) always responds with a task id only — never the
    company data inline, even when the task settles instantly off the cache.
    `200` vs. `202` tells you whether it already settled; either way, fetch
    the result from `GET /v1/tasks/{id}` or via your Loop's webhook.
  contact:
    name: EnrichLoop support
servers:
  - url: https://api.enrichloop.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Companies
    description: Enqueue a company enrichment.
  - name: Tasks
    description: Poll or list the async tasks behind an enrichment.
  - name: Loops
    description: Webhook delivery — register a destination and send records to it.
paths:
  /v1/tasks:
    get:
      tags:
        - Tasks
      summary: List tasks
      operationId: listTasks
      parameters:
        - name: status
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/TaskStatus'
        - name: page
          in: query
          required: false
          description: Zero-indexed page number.
          schema:
            type: integer
            minimum: 0
            default: 0
        - name: pageSize
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 25
      responses:
        '200':
          description: A page of tasks belonging to the caller's organization.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Task'
                  total:
                    type: integer
                required:
                  - data
                  - total
        '400':
          description: Invalid `status` value.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  schemas:
    TaskStatus:
      type: string
      enum:
        - queued
        - running
        - succeeded
        - failed
        - canceled
    Task:
      type: object
      description: |
        `input` and `target` are dropped in future revisions to a single
        field; today `target` is the normalized domain or LinkedIn URL the
        task resolved to.
      properties:
        id:
          type: string
          format: uuid
        object_type:
          type: string
          enum:
            - company
        operation:
          type: string
          enum:
            - enrich
        status:
          $ref: '#/components/schemas/TaskStatus'
        input:
          type: object
          additionalProperties: true
        target:
          type: string
          description: >-
            The normalized input we resolved — the domain or LinkedIn URL you
            sent.
        credits_charged:
          type: integer
        loop_id:
          type:
            - string
            - 'null'
          format: uuid
        idempotency_key:
          type:
            - string
            - 'null'
        created_at:
          type: string
          format: date-time
        queued_at:
          type:
            - string
            - 'null'
          format: date-time
        started_at:
          type:
            - string
            - 'null'
          format: date-time
        finished_at:
          type:
            - string
            - 'null'
          format: date-time
        expires_at:
          type: string
          format: date-time
          description: >-
            If the task is still running past this time, it will be marked
            `failed`.
      required:
        - id
        - object_type
        - operation
        - status
        - target
        - credits_charged
        - created_at
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
      required:
        - error
  responses:
    Unauthorized:
      description: Missing or invalid API key.
      content:
        text/plain:
          schema:
            type: string
            example: Unauthorized
    TooManyRequests:
      description: |
        Rate limited. `Retry-After` gives the number of seconds to wait. A
        `code: "queue_full"` body means the organization's queued-task
        backlog is full rather than the per-IP request rate being exceeded.
      headers:
        Retry-After:
          schema:
            type: integer
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
              code:
                type: string
                enum:
                  - queue_full
              queuedTasks:
                type: integer
            required:
              - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |
        Pass your API key as a bearer token: `Authorization: Bearer
        YOUR_API_KEY`. Generate and manage keys from your dashboard under
        **Settings → API Keys**.

````