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

# Get a task by ID

> The reply carries `version`, `external_id` and `activity_at`. Subtasks the caller cannot read are left out.



## OpenAPI

````yaml /api-reference/endpoint/workspaces/openapi.json get /workspaces/task/{id}
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/task/{id}:
    get:
      tags:
        - Spaces
      summary: Get a task by ID
      description: >-
        The reply carries `version`, `external_id` and `activity_at`. Subtasks
        the caller cannot read are left out.
      operationId: getTask
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Task
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task'
        '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'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - bearerAuth: []
        - apiKeyAuth: []
        - oauth2: []
components:
  schemas:
    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.
    Error:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
          description: Stable machine code. Branch on this, not on `error`.
      required:
        - error
    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:
    NotFound:
      description: Not Found
      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.