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

# List tasks in a space

> Changed: `external_id` exact-match filter, `has_more` on the reply, and `sort_by=activity_at`. The other filters are unchanged.



## OpenAPI

````yaml /api-reference/endpoint/workspaces/openapi.json get /workspaces/space/{space_id}/tasks
openapi: 3.1.0
info:
  title: Workspaces API
  version: 1.1.0
  description: >-
    Spaces, tasks, task actions, comments, folders and the task-sync routes.
    Task-sync routes also accept an integration token (`oauth2`); every other
    route needs a user session or API key.
servers:
  - url: https://api.quiva.ai
    description: Production API server
security:
  - bearerAuth: []
  - apiKeyAuth: []
tags:
  - name: Tasks
  - name: Files
  - name: Folders
  - name: Task Schedules
  - name: Distribution
paths:
  /workspaces/space/{space_id}/tasks:
    get:
      tags:
        - Spaces
      summary: List tasks in a space
      description: >-
        Changed: `external_id` exact-match filter, `has_more` on the reply, and
        `sort_by=activity_at`. The other filters are unchanged.
      operationId: listTasks
      parameters:
        - name: space_id
          in: path
          required: true
          schema:
            type: string
        - name: archived
          in: query
          schema:
            type: boolean
        - name: scheduled
          in: query
          schema:
            type: string
            enum:
              - 'true'
              - 'false'
              - any
          description: >-
            `true` lists only scheduled tasks; absent or `false` only
            unscheduled ones; `any` both.
        - name: limit
          in: query
          description: >-
            How many results to return at most, up to 999. `has_more` tells you
            whether another page exists.
          schema:
            type: integer
            default: 300
        - name: offset
          in: query
          description: >-
            If there are more results than the limit, offset can be used to get
            to the next batch of results
          schema:
            type: integer
            default: 0
        - name: sort_by
          in: query
          description: >-
            Name of the field used for sorting, such as `created_at`,
            `updated_at` or `activity_at`.
          schema:
            type: string
            default: created_at
        - name: sort_order
          in: query
          description: >-
            Should the results be sorted in ascending or descending order
            relative to sort_by field
          schema:
            type: string
            enum:
              - asc
              - desc
            default: asc
        - name: created_by
          in: query
          description: Exact match on the user ID of the task creator
          schema:
            type: string
        - name: priority
          in: query
          description: >-
            Exact match on priority; comma-separated values to filter by
            priority
          schema:
            type: string
        - name: status
          in: query
          description: >-
            Exact match on status; comma-separated values to filter by multiple
            statuses. See `with_no_status`.
          schema:
            type: string
        - name: title
          in: query
          description: Term search on task title
          schema:
            type: string
        - name: assignees
          in: query
          description: Comma-separated assignee IDs; at least one must match
          schema:
            type: string
        - name: reporter
          in: query
          schema:
            type: string
        - name: created_at
          in: query
          description: >-
            Filter by creation date. Use a single date or a range as
            `{start_date},{end_date}`
          schema:
            type: string
        - name: updated_at
          in: query
          description: >-
            Filter by last-updated date. Use a single date or a range as
            `{start_date},{end_date}`
          schema:
            type: string
        - name: scheduled_at
          in: query
          description: >-
            Filter by scheduled date. Use a single date or a range as
            `{start_date},{end_date}`
          schema:
            type: string
        - name: external_id
          in: query
          required: false
          description: Exact match.
          schema:
            type: string
        - name: folder
          in: query
          required: false
          description: Exact folder (every task for one base record).
          schema:
            type: string
        - name: tags
          in: query
          required: false
          description: Comma-separated; at least one must match.
          schema:
            type: string
        - name: parent
          in: query
          required: false
          description: >-
            Parent task id, to list subtasks; comma-separated to list several
            parents' subtasks.
          schema:
            type: string
        - name: source
          in: query
          required: false
          description: Exact source.
          schema:
            type: string
        - name: currency
          in: query
          required: false
          description: Exact currency.
          schema:
            type: string
        - name: due_date
          in: query
          required: false
          description: Due date filter.
          schema:
            type: string
        - name: exclude_subtasks
          in: query
          required: false
          description: >-
            `true` drops subtasks from the page after it is read; each parent
            still nests subtasks on the same page. Prefer `parents_only`, which
            pages and counts parents only.
          schema:
            type: string
        - name: parents_only
          in: query
          required: false
          description: >-
            `true` pages top-level tasks only, so `total_hits` counts parents;
            each parent carries all its subtasks in `subtasks`.
          schema:
            type: string
        - name: nest_subtasks
          in: query
          required: false
          description: >-
            `true` gives every listed parent all its subtasks in `subtasks`,
            while subtasks are still listed as rows of their own.
          schema:
            type: string
        - name: with_no_status
          in: query
          required: false
          description: >-
            `true` adds tasks with no status to the `status` filter; on its own,
            lists only tasks with no status.
          schema:
            type: string
        - name: q
          in: query
          required: false
          description: >-
            Search: any word of the title or description, the last word as a
            prefix, or a task id prefix (`OPS-12` finds OPS-120 to OPS-129).
          schema:
            type: string
        - name: ids
          in: query
          required: false
          description: Comma-separated task ids, read by key.
          schema:
            type: string
        - name: folders
          in: query
          required: false
          description: Comma-separated folders, each matched exactly.
          schema:
            type: string
        - name: under_folder
          in: query
          required: false
          description: >-
            A folder and every folder nested in it, absolute (`spaces.<id>.a`)
            or space-relative (`a`).
          schema:
            type: string
        - name: dated
          in: query
          required: false
          description: >-
            `true` lists tasks with a due date or scheduled time, `false` those
            with neither.
          schema:
            type: string
            enum:
              - 'true'
              - 'false'
        - name: counts
          in: query
          required: false
          description: >-
            `status` adds `counts.status`: the number of matching tasks per
            status, `""` for tasks with no status. A failed count leaves
            `counts` out rather than failing the page.
          schema:
            type: string
            enum:
              - status
        - name: count_due
          in: query
          required: false
          description: >-
            With `counts=status`, a `start,end` date range; adds `counts.due`,
            how many matching tasks are due in it.
          schema:
            type: string
      responses:
        '200':
          description: List of tasks
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskList'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          description: >-
            Not authenticated, or the integration token was revoked
            (`token_revoked`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            Forbidden: `scope_denied`, or `integration_not_allowed` for an
            integration bearer outside workspaces.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
        - apiKeyAuth: []
        - oauth2: []
components:
  schemas:
    TaskList:
      type: object
      properties:
        results:
          type: array
          items:
            $ref: '#/components/schemas/Task'
        results_total:
          type: integer
          description: Number of results on this page. It is not a total across pages.
        has_more:
          type: boolean
          description: True when another page exists. Left out when false.
        total_hits:
          type: integer
          description: Every match across all pages, as the index counts them.
        counts:
          type: object
          description: Present when `counts=status` was asked for and could be read.
          properties:
            status:
              type: object
              additionalProperties:
                type: integer
            due:
              type: integer
    Error:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
          description: Stable machine code. Branch on this, not on `error`.
      required:
        - error
    Task:
      type: object
      properties:
        id:
          type: string
          readOnly: true
        url:
          type: string
          readOnly: true
          description: UI URL to navigate directly to this task
        title:
          type: string
        description:
          type: string
          description: Markdown / rich-text content
        assignees:
          type:
            - array
            - 'null'
          items:
            type: string
          description: Assigned user IDs.
        attachments:
          type:
            - array
            - 'null'
          items:
            type: string
        created_at:
          type: string
          format: date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          readOnly: true
        created_by:
          type: string
          readOnly: true
        priority:
          type: string
        folder:
          type: string
        reporter:
          type: string
        status:
          type: string
          description: A status id of the space.
        space_id:
          type: string
        due_date:
          type: string
          format: date-time
        scheduled_at:
          type: string
          format: date-time
          description: >-
            RFC3339 date-time at which the task is scheduled. Archiving the task
            clears it.
        archived:
          type: boolean
          description: Whether the task is archived.
        order:
          type: number
          description: Sort order of the task within its column/board.
        tags:
          type: array
          items:
            type: string
          description: Free-form tag ids on the task.
        metadata:
          type: object
          additionalProperties: true
          description: Arbitrary metadata bag stored on the task.
        watchers:
          type: array
          items:
            type: string
          readOnly: true
          description: >-
            User ids watching the task. Only present on the get-task response,
            not stored on the task record.
        muted:
          type: array
          items:
            type: string
          readOnly: true
          description: User ids who muted the task. Only present on the get-task response.
        parent:
          type: string
          description: >-
            Id of the parent task, when this is a subtask. Setting it needs read
            access to the parent's space.
        source:
          type: string
        source_detail:
          type: string
        value:
          type: number
        currency:
          type: string
        expected_close:
          type: string
        time_tracking:
          $ref: '#/components/schemas/TimeTracking'
        version:
          type: integer
          readOnly: true
          description: >-
            1 on create, +1 on every task write. Comments, time logs and
            activity stamps never bump it.
        sync_key:
          type: string
          readOnly: true
          description: >-
            Set when the task is shared with a connected account. Its version
            then belongs to that shared lineage.
        sync_conflict:
          type: object
          additionalProperties: true
          readOnly: true
          description: >-
            Present when an incoming change from a connected account conflicted
            with a local edit.
        external_id:
          type: string
          maxLength: 256
          description: Your own id for the task, at most 256 bytes of UTF-8.
        activity_at:
          type: string
          format: date-time
          readOnly: true
          description: Moves on task, comment, time-log and action writes.
        subtasks:
          type: array
          items:
            type: object
            additionalProperties: true
          readOnly: true
          description: Present on list and get responses.
        task_actions:
          type: array
          items:
            $ref: '#/components/schemas/TaskAction'
          readOnly: true
        implementation_date:
          type: string
          description: Estimated go-live date, ISO. Stored only; nothing schedules on it.
        assigned_qa:
          type: string
          description: >-
            User id, offered from the Space's assigned QA users. Not validated
            against them.
    TimeTracking:
      type: object
      properties:
        estimate:
          type: object
          properties:
            time_in_seconds:
              type: integer
        logs:
          type: array
          items:
            $ref: '#/components/schemas/TimeLog'
        spent:
          type: object
          properties:
            time_in_seconds:
              type: integer
        remaining:
          type: object
          properties:
            time_in_seconds:
              type: integer
        progress_percent:
          type: number
    TaskAction:
      type: object
      required:
        - description
      description: >-
        A checklist item on a task. `description` is required on every write,
        not only on create — an update that only flips `done` still has to
        resend it.
      properties:
        id:
          type: string
          description: >-
            Action id. Omit on create and the server assigns one; pass an
            existing id to update that action.
          example: ta_a1b2c3
        description:
          type: string
          minLength: 1
          description: What the action is. Required on every write.
          example: Confirm the report has been proofread
        done:
          type: boolean
          description: Whether the item is ticked off.
        resources:
          type: array
          items:
            $ref: '#/components/schemas/TaskActionResource'
          description: >-
            Resources the action opens. Required (at least one) when the action
            is new.
        keep_status:
          type: boolean
          description: Leaves this action out of the task's status automation.
        suppress_events:
          type: boolean
          description: Request-only. Stops this write publishing a task event.
    TimeLog:
      type: object
      properties:
        id:
          type: string
          readOnly: true
          description: Server-minted, `tl_` followed by random characters.
        time_spent:
          type: object
          required:
            - time_in_seconds
          properties:
            time_in_seconds:
              type: integer
              minimum: 1
        started_at:
          type: string
          format: date-time
        description:
          type: string
        user:
          type: object
          readOnly: true
          properties:
            id:
              type: string
            name:
              type: string
        created_at:
          type: string
          format: date-time
          readOnly: true
      required:
        - time_spent
        - started_at
    TaskActionResource:
      type: object
      required:
        - resource_id
        - resource_type
      description: >-
        A platform resource a checklist action opens. A new action must carry at
        least one valid resource; an action without one is refused with 400 (a
        step with nothing to open takes a `todo` resource). Stored actions that
        predate this stay editable.
      properties:
        resource_type:
          type: string
          enum:
            - record
            - record_config
            - file
            - assistant_session
            - todo
            - flow_input
          description: >-
            `record` (id `{configId}.{recordId}`), `record_config` (id of a
            record config attached to the task's space), `file`,
            `assistant_session` (id `{agentSubject}.{sessionId}`), `todo` (id of
            your choice, with `metadata.todos`), or `flow_input` (added by a
            paused flow run, id is the run tracking id).
        resource_id:
          type: string
          example: customers.rec_123
          description: Required. Format depends on `resource_type`.
        metadata:
          type: object
          additionalProperties: true
          description: >-
            For `todo`: `{"todos":[{"text":"...","done":false}]}` with at least
            one item. Free-form for the other types.
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
    oauth2:
      type: oauth2
      description: >-
        API integration client credentials. Tokens only work on the task-sync
        routes in workspaces.
      flows:
        clientCredentials:
          tokenUrl: https://api.quiva.ai/oauth/token
          scopes: {}

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.